公開 API v1
將電子簽名整合到您的技術棧
傳送信封、追蹤簽名、接收 webhooks。簡單的 REST API、OpenAPI 3.0、curl/Node/Python 範例 — 在幾小時內將 Certyneo 連接到您的 HRIS、CRM 或業務軟體所需的一切。
快速開始
三個步驟:從設定中建立 API 金鑰、將您的 PDF 編碼為 base64、傳送。回應包含 `signUrl`,您可以直接與收件者共用。
cURLbash
curl -X POST https://certyneo.com/api/v1/envelopes \
-H "Authorization: Bearer ck_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"subject": "Contrat de prestation",
"signers": [
{ "email": "[email protected]", "name": "Marie Dubois" }
],
"documents": [
{ "name": "contrat.pdf", "base64Pdf": "<base64>" }
]
}'JavaScript / Nodets
// npm install @certyneo/sdk (or call fetch directly)
const r = await fetch("https://certyneo.com/api/v1/envelopes", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CERTYNEO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
subject: "Contrat de prestation",
signers: [{ email: "[email protected]", name: "Marie Dubois" }],
documents: [{ name: "contrat.pdf", base64Pdf }],
}),
});
const envelope = await r.json();
console.log(envelope.id, envelope.signers[0].signUrl);Pythonpython
import requests, base64, os
with open("contrat.pdf", "rb") as f:
base64_pdf = base64.b64encode(f.read()).decode()
r = requests.post(
"https://certyneo.com/api/v1/envelopes",
headers={"Authorization": f"Bearer {os.environ['CERTYNEO_API_KEY']}"},
json={
"subject": "Contrat de prestation",
"signers": [{"email": "[email protected]", "name": "Marie Dubois"}],
"documents": [{"name": "contrat.pdf", "base64Pdf": base64_pdf}],
},
)
envelope = r.json()
print(envelope["id"], envelope["signers"][0]["signUrl"])信封
建立、傳送、狀態追蹤、取消。一個信封可以包含多份文件和多個簽署人(並行或順序)。
Webhooks
在您選擇的 URL 上接收 `envelope.created`、`envelope.completed`、`envelope.declined`。針對每個 payload 使用 HMAC SHA-256 驗證來源。
簡單驗證
Bearer token。每個環境一個金鑰(測試/生產)。可立即撤銷。限制:每分鐘 100 個請求/金鑰,突發 200 個,429 回應搭配 Retry-After 標頭。
可用端點
12 條路由涵蓋完整週期:envelopes、documents、webhooks、API 金鑰。所有路由接受 Bearer token 並返回 JSON。
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/envelopes | List envelopes |
| POST | /api/v1/envelopes | Create + send |
| GET | /api/v1/envelopes/{id} | Fetch state |
| DELETE | /api/v1/envelopes/{id} | Void |
| POST | /api/v1/envelopes/{id}/send | Re-trigger send |
| GET | /api/v1/documents | List documents |
| 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 |
速率限制
速率限制確保所有客戶的服務品質穩定。如需提高限制,請與我們聯繫。
- • 每個 API 金鑰每分鐘 100 個請求
- • 允許突發最多 200 個請求(少於 10 秒內)
- • 429 回應搭配 Retry-After 標頭,指示以秒為單位的延遲