امضای الکترونیکی را در پشته خود ادغام کنید
پاکتها را ارسال کنید، امضاها را دنبال کنید، webhooks دریافت کنید. API REST ساده، OpenAPI 3.0، نمونههای curl/Node/Python — همه چیز برای اتصال Certyneo به HRIS، CRM یا نرمافزار تجاری خود در چند ساعت.
شروع سریع
سه مرحله: یک کلید API از تنظیمات ایجاد کنید، PDF خود را به base64 رمزگذاری کنید، ارسال کنید. پاسخ شامل `signUrl` است که میتوانید مستقیماً با گیرنده به اشتراک بگذارید.
# 1. Upload the PDF (multipart) and capture the returned document id.
DOC_ID=$(curl -s -X POST https://certyneo.com/api/v1/documents \
-H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
-F "file=@contrat.pdf" | jq -r .id)
# 2. Create a DRAFT envelope referencing the uploaded document.
ENV_ID=$(curl -s -X POST https://certyneo.com/api/v1/envelopes \
-H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d "{
\"subject\": \"Contrat de prestation\",
\"documentIds\": [\"$DOC_ID\"],
\"recipients\": [
{ \"email\": \"client@example.com\", \"name\": \"Marie Dubois\", \"role\": \"SIGNER\" }
]
}" | jq -r .id)
# 3. Dispatch the envelope — this sends the invitation email/SMS.
curl -X POST https://certyneo.com/api/v1/envelopes/$ENV_ID/send \
-H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxx"// npm install @certyneo/sdk (or call fetch directly)
const auth = { Authorization: `Bearer ${process.env.CERTYNEO_API_KEY}` };
// 1. Upload the PDF (multipart).
const fd = new FormData();
fd.append("file", new Blob([pdfBuffer], { type: "application/pdf" }), "contrat.pdf");
const doc = await fetch("https://certyneo.com/api/v1/documents", {
method: "POST", headers: auth, body: fd,
}).then((r) => r.json());
// 2. Create the DRAFT envelope.
const envelope = await fetch("https://certyneo.com/api/v1/envelopes", {
method: "POST",
headers: { ...auth, "Content-Type": "application/json" },
body: JSON.stringify({
subject: "Contrat de prestation",
documentIds: [doc.id],
recipients: [
{ email: "client@example.com", name: "Marie Dubois", role: "SIGNER" },
],
}),
}).then((r) => r.json());
// 3. Dispatch — this triggers the invitation channel for every recipient.
await fetch(`https://certyneo.com/api/v1/envelopes/${envelope.id}/send`, {
method: "POST", headers: auth,
});
console.log(envelope.id);import os, requests
auth = {"Authorization": f"Bearer {os.environ['CERTYNEO_API_KEY']}"}
# 1. Upload the PDF (multipart).
with open("contrat.pdf", "rb") as f:
doc = requests.post(
"https://certyneo.com/api/v1/documents",
headers=auth,
files={"file": ("contrat.pdf", f, "application/pdf")},
).json()
# 2. Create the DRAFT envelope.
envelope = requests.post(
"https://certyneo.com/api/v1/envelopes",
headers={**auth, "Content-Type": "application/json"},
json={
"subject": "Contrat de prestation",
"documentIds": [doc["id"]],
"recipients": [
{"email": "client@example.com", "name": "Marie Dubois", "role": "SIGNER"},
],
},
).json()
# 3. Dispatch — this triggers the invitation channel for every recipient.
requests.post(
f"https://certyneo.com/api/v1/envelopes/{envelope['id']}/send",
headers=auth,
)
print(envelope["id"])پاکتها
ایجاد، ارسال، پیگیری وضعیت، لغو. یک پاکت میتواند شامل چندین سند و چندین امضاکننده (موازی یا متوالی) باشد.
Webhooks
`envelope.created`، `envelope.completed`، `envelope.declined` را در URL انتخابشده خود دریافت کنید. HMAC SHA-256 روی هر payload برای تأیید منشأ.
احراز هویت ساده
Bearer token. یک کلید در هر محیط (test / prod). فوری قابل لغو. حد 100 درخواست/دقیقه/کلید، burst تا 200، 429 تمیز با سرصحافه Retry-After.
نقاط انتهایی موجود
12 مسیر پوشش دهنده چرخه کامل: پاکتها، اسناد، webhooks، کلیدهای API. تمام مسیرها یک Bearer token را میپذیرند و JSON را برمیگردانند.
| Method | Path | Description |
|---|---|---|
| POST | /api/v1/documents | Upload a PDF (multipart) — returns document id |
| GET | /api/v1/documents | List documents |
| GET | /api/v1/documents/{id} | Fetch document metadata |
| DELETE | /api/v1/documents/{id} | Delete document |
| GET | /api/v1/envelopes | List envelopes |
| POST | /api/v1/envelopes | Create envelope (status: DRAFT) |
| GET | /api/v1/envelopes/{id} | Fetch envelope state |
| PATCH | /api/v1/envelopes/{id} | Update DRAFT envelope |
| DELETE | /api/v1/envelopes/{id} | Void / delete DRAFT envelope |
| POST | /api/v1/envelopes/{id}/send | Dispatch DRAFT — sends invitations |
| GET | /api/v1/envelopes/{id}/audit-trail | Download eIDAS audit-trail PDF |
| GET | /api/v1/envelopes/{id}/signed-document | Download signed PDF (once COMPLETED) |
| GET | /api/v1/webhooks | List webhooks |
| POST | /api/v1/webhooks | Register webhook |
| DELETE | /api/v1/webhooks/{id} | Unregister |
| GET | /api/v1/keys | List API keys |
| POST | /api/v1/keys | Create API key |
| DELETE | /api/v1/keys/{id} | Revoke key |
محدودیتهای نرخ
محدودیتها کیفیت خدمات پایدار را برای تمام مشتریان تضمین میکنند. اگر بیشتر نیاز دارید، با ما تماس بگیرید.
- • 100 درخواست در دقیقه در هر کلید API
- • Burst تا 200 درخواست در کمتر از 10 ثانیه مجاز است
- • پاسخ 429 با سرصحافه Retry-After که تأخیر را در ثانیه نشان میدهد