Documents
Documents operations of the REST API, generated from the OpenAPI document.
Source: apps/api/openapi/public-v1.json. Base address https://docudetect.com/api/public/v1.
List documents
GET /documents
Permission: documents:read
Newest first. With updatedSince, oldest change first, so a poller can keep the last updatedAt it saw and ask again.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
status | query | one of draft, sent, completed, canceled | no | Only documents in this state. |
updatedSince | query | string (date-time) | no | Only documents changed at or after this time, oldest change first: poll with the last updatedAt you saw. |
limit | query | integer | no | Items per page, 1 to 100. Default 50. |
cursor | query | string | no | The nextCursor of the previous page. |
Response 200
data: DocumentPage
Errors
| Status | When |
|---|---|
400 | Invalid input (invalid_request), or a document that isn't ready for this (the message says what to fix). |
401 | Missing, unknown, expired or revoked key (invalid_api_key). |
403 | The key lacks a permission (insufficient_scope), the account is suspended (account_suspended), a plan limit is reached (limit_*), or the abuse guard refused a send (held_for_review, email_unverified). |
404 | Not found in this account (not_found). |
429 | Too many calls (rate_limited), a reminder sent less than 10 minutes ago, the new-account or daily email limit (new_account_limit, email_limit). Every 429 carries Retry-After: wait that many seconds. |
Example
curl "https://docudetect.com/api/public/v1/documents" \
-H "Authorization: Bearer $DOCUDETECT_API_KEY"Make a draft from a PDF
POST /documents
Permission: documents:write · accepts an Idempotency-Key
multipart/form-data with the PDF as file (up to 20 MB). Optionally name the signer and place fields; otherwise finish the draft in the app. Nothing is emailed. Counts against the account's new documents an hour, like the app.
Request body (multipart/form-data)
| Field | Type | Required | Description |
|---|---|---|---|
file | file | yes | The PDF, up to 20 MB. |
title | string | no | Defaults to the file name. |
signerName | string | no | The signer's name (with signerEmail). |
signerEmail | string | no | The signer's email (with signerName). |
fields | string | no | A JSON array of fields, as the editor saves them: { id, type: signature|initials|text|date|checkbox, page, x, y, width, height, required?, label?, value? }, positions as fractions of the page (0 to 1, from the top left). Leave it out to place fields in the app. |
Response 201
data: Document
Errors
| Status | When |
|---|---|
400 | Invalid input (invalid_request), or a document that isn't ready for this (the message says what to fix). |
401 | Missing, unknown, expired or revoked key (invalid_api_key). |
403 | The key lacks a permission (insufficient_scope), the account is suspended (account_suspended), a plan limit is reached (limit_*), or the abuse guard refused a send (held_for_review, email_unverified). |
404 | Not found in this account (not_found). |
409 | Not possible in the document's current state, or it changed meanwhile (conflict, several_signers, template_not_ready, idempotency_in_progress with Retry-After, idempotency_replay_unavailable). |
413 | The body is too large (too_large). |
422 | This Idempotency-Key was used for a different call (idempotency_mismatch). |
429 | Too many calls (rate_limited), a reminder sent less than 10 minutes ago, the new-account or daily email limit (new_account_limit, email_limit). Every 429 carries Retry-After: wait that many seconds. |
Example
curl -X POST "https://docudetect.com/api/public/v1/documents" \
-H "Authorization: Bearer $DOCUDETECT_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-F "file=@lease.pdf" \
-F "signerName=Alex Example" \
-F "signerEmail=alex@example.com"Get a document
GET /documents/{id}
Permission: documents:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A document or template id. |
Response 200
data: Document
Errors
| Status | When |
|---|---|
400 | Invalid input (invalid_request), or a document that isn't ready for this (the message says what to fix). |
401 | Missing, unknown, expired or revoked key (invalid_api_key). |
403 | The key lacks a permission (insufficient_scope), the account is suspended (account_suspended), a plan limit is reached (limit_*), or the abuse guard refused a send (held_for_review, email_unverified). |
404 | Not found in this account (not_found). |
429 | Too many calls (rate_limited), a reminder sent less than 10 minutes ago, the new-account or daily email limit (new_account_limit, email_limit). Every 429 carries Retry-After: wait that many seconds. |
Example
curl "https://docudetect.com/api/public/v1/documents/$DOCUMENT_ID" \
-H "Authorization: Bearer $DOCUDETECT_API_KEY"A document's history
GET /documents/{id}/events
Permission: documents:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A document or template id. |
Response 200
data: DocumentEvents
Errors
| Status | When |
|---|---|
400 | Invalid input (invalid_request), or a document that isn't ready for this (the message says what to fix). |
401 | Missing, unknown, expired or revoked key (invalid_api_key). |
403 | The key lacks a permission (insufficient_scope), the account is suspended (account_suspended), a plan limit is reached (limit_*), or the abuse guard refused a send (held_for_review, email_unverified). |
404 | Not found in this account (not_found). |
429 | Too many calls (rate_limited), a reminder sent less than 10 minutes ago, the new-account or daily email limit (new_account_limit, email_limit). Every 429 carries Retry-After: wait that many seconds. |
Example
curl "https://docudetect.com/api/public/v1/documents/$DOCUMENT_ID/events" \
-H "Authorization: Bearer $DOCUDETECT_API_KEY"Download the signed or the original PDF
GET /documents/{id}/pdf
Permission: documents:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A document or template id. |
version | query | one of signed, original | no | signed: the completed PDF (409 until the document is completed). original: the PDF as uploaded. Default "signed". |
Response 200
The file, as application/pdf.
Errors
| Status | When |
|---|---|
400 | Invalid input (invalid_request), or a document that isn't ready for this (the message says what to fix). |
401 | Missing, unknown, expired or revoked key (invalid_api_key). |
403 | The key lacks a permission (insufficient_scope), the account is suspended (account_suspended), a plan limit is reached (limit_*), or the abuse guard refused a send (held_for_review, email_unverified). |
404 | Not found in this account (not_found). |
409 | Not possible in the document's current state, or it changed meanwhile (conflict, several_signers, template_not_ready, idempotency_in_progress with Retry-After, idempotency_replay_unavailable). |
429 | Too many calls (rate_limited), a reminder sent less than 10 minutes ago, the new-account or daily email limit (new_account_limit, email_limit). Every 429 carries Retry-After: wait that many seconds. |
Example
curl "https://docudetect.com/api/public/v1/documents/$DOCUMENT_ID/pdf" \
-H "Authorization: Bearer $DOCUDETECT_API_KEY" \
-o document.pdfDownload the certificate of completion
GET /documents/{id}/certificate
Permission: documents:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A document or template id. |
Response 200
The file, as application/pdf.
Errors
| Status | When |
|---|---|
400 | Invalid input (invalid_request), or a document that isn't ready for this (the message says what to fix). |
401 | Missing, unknown, expired or revoked key (invalid_api_key). |
403 | The key lacks a permission (insufficient_scope), the account is suspended (account_suspended), a plan limit is reached (limit_*), or the abuse guard refused a send (held_for_review, email_unverified). |
404 | Not found in this account (not_found). |
409 | Not possible in the document's current state, or it changed meanwhile (conflict, several_signers, template_not_ready, idempotency_in_progress with Retry-After, idempotency_replay_unavailable). |
429 | Too many calls (rate_limited), a reminder sent less than 10 minutes ago, the new-account or daily email limit (new_account_limit, email_limit). Every 429 carries Retry-After: wait that many seconds. |
Example
curl "https://docudetect.com/api/public/v1/documents/$DOCUMENT_ID/certificate" \
-H "Authorization: Bearer $DOCUDETECT_API_KEY" \
-o document.pdfSend a draft to its signers
POST /documents/{id}/send
Permission: documents:send · accepts an Idempotency-Key
Emails each signer of the first step their signing request. Goes through the same checks as the app: account standing, a verified email, young-account limits, the daily email limit and scam-title review; a refused send answers with its code (held_for_review, email_unverified, new_account_limit, ...). Sending a document that is already out returns it as it is.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A document or template id. |
Request body (application/json)
Optional. Send an empty object or no body.
| Field | Type | Required | Description |
|---|---|---|---|
revision | integer | no | Send only if the document is still at this revision (409 otherwise). |
delivery | one of email, embedded | no | email (the default) emails the signer their signing request. embedded (one signer, embedded signing on) emails nobody and sends no automatic reminders: the signer signs inside your app through an embedded session. |
Response 200
data: Document
Errors
| Status | When |
|---|---|
400 | Invalid input (invalid_request), or a document that isn't ready for this (the message says what to fix). |
401 | Missing, unknown, expired or revoked key (invalid_api_key). |
403 | The key lacks a permission (insufficient_scope), the account is suspended (account_suspended), a plan limit is reached (limit_*), or the abuse guard refused a send (held_for_review, email_unverified). |
404 | Not found in this account (not_found). |
409 | Not possible in the document's current state, or it changed meanwhile (conflict, several_signers, template_not_ready, idempotency_in_progress with Retry-After, idempotency_replay_unavailable). |
413 | The body is too large (too_large). |
422 | This Idempotency-Key was used for a different call (idempotency_mismatch). |
429 | Too many calls (rate_limited), a reminder sent less than 10 minutes ago, the new-account or daily email limit (new_account_limit, email_limit). Every 429 carries Retry-After: wait that many seconds. |
503 | Temporarily unavailable (unavailable); retry shortly with the same Idempotency-Key. |
Example
curl -X POST "https://docudetect.com/api/public/v1/documents/$DOCUMENT_ID/send" \
-H "Authorization: Bearer $DOCUDETECT_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{}'Remind the signers whose turn it is
POST /documents/{id}/remind
Permission: documents:send · accepts an Idempotency-Key
At most once every 10 minutes per document (429 recently_reminded otherwise).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A document or template id. |
Request body (application/json)
No fields. Send an empty object or no body.
| Field | Type | Required | Description |
|---|
Response 200
data: Document
Errors
| Status | When |
|---|---|
400 | Invalid input (invalid_request), or a document that isn't ready for this (the message says what to fix). |
401 | Missing, unknown, expired or revoked key (invalid_api_key). |
403 | The key lacks a permission (insufficient_scope), the account is suspended (account_suspended), a plan limit is reached (limit_*), or the abuse guard refused a send (held_for_review, email_unverified). |
404 | Not found in this account (not_found). |
409 | Not possible in the document's current state, or it changed meanwhile (conflict, several_signers, template_not_ready, idempotency_in_progress with Retry-After, idempotency_replay_unavailable). |
413 | The body is too large (too_large). |
422 | This Idempotency-Key was used for a different call (idempotency_mismatch). |
429 | Too many calls (rate_limited), a reminder sent less than 10 minutes ago, the new-account or daily email limit (new_account_limit, email_limit). Every 429 carries Retry-After: wait that many seconds. |
503 | Temporarily unavailable (unavailable); retry shortly with the same Idempotency-Key. |
Example
curl -X POST "https://docudetect.com/api/public/v1/documents/$DOCUMENT_ID/remind" \
-H "Authorization: Bearer $DOCUDETECT_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"Cancel a document that is waiting for signatures
POST /documents/{id}/cancel
Permission: documents:send · accepts an Idempotency-Key
Every signing link stops working. Signers who were already emailed a link are told it was canceled.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A document or template id. |
Request body (application/json)
No fields. Send an empty object or no body.
| Field | Type | Required | Description |
|---|
Response 200
data: Document
Errors
| Status | When |
|---|---|
400 | Invalid input (invalid_request), or a document that isn't ready for this (the message says what to fix). |
401 | Missing, unknown, expired or revoked key (invalid_api_key). |
403 | The key lacks a permission (insufficient_scope), the account is suspended (account_suspended), a plan limit is reached (limit_*), or the abuse guard refused a send (held_for_review, email_unverified). |
404 | Not found in this account (not_found). |
409 | Not possible in the document's current state, or it changed meanwhile (conflict, several_signers, template_not_ready, idempotency_in_progress with Retry-After, idempotency_replay_unavailable). |
413 | The body is too large (too_large). |
422 | This Idempotency-Key was used for a different call (idempotency_mismatch). |
429 | Too many calls (rate_limited), a reminder sent less than 10 minutes ago, the new-account or daily email limit (new_account_limit, email_limit). Every 429 carries Retry-After: wait that many seconds. |
503 | Temporarily unavailable (unavailable); retry shortly with the same Idempotency-Key. |
Example
curl -X POST "https://docudetect.com/api/public/v1/documents/$DOCUMENT_ID/cancel" \
-H "Authorization: Bearer $DOCUDETECT_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"Make a one-time embedded signing link for a signer whose turn it is
POST /documents/{id}/signers/{signerId}/embedded-session
Permission: embedding:sessions
For signing inside your own app: show url in an iframe on origin, which must be a verified domain under Settings → Developers → Embedded signing. Whoever opens the link signs as that signer, so put it only in front of them. The link opens once, within 5 minutes, and then works for 60 minutes in that frame. Nothing is emailed. Each call makes a new link; opening one ends the earlier ones.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A document id. |
signerId | path | string | yes | The signer: s1 on a one-signer document, otherwise the signer's id. |
Request body (application/json)
Where the session will be framed.
| Field | Type | Required | Description |
|---|---|---|---|
origin | string | yes | The domain of the page that frames the signing page, such as app.example.com (or https://app.example.com). It must be a verified domain. |
Response 201
data: EmbeddedSession
Errors
| Status | When |
|---|---|
400 | Invalid input (invalid_request), or a document that isn't ready for this (the message says what to fix). |
401 | Missing, unknown, expired or revoked key (invalid_api_key). |
403 | The key lacks a permission (insufficient_scope), the account is suspended (account_suspended), a plan limit is reached (limit_*), or the abuse guard refused a send (held_for_review, email_unverified). |
404 | Not found in this account (not_found). |
409 | Not possible in the document's current state, or it changed meanwhile (conflict, several_signers, template_not_ready, idempotency_in_progress with Retry-After, idempotency_replay_unavailable). |
413 | The body is too large (too_large). |
429 | Too many calls (rate_limited), a reminder sent less than 10 minutes ago, the new-account or daily email limit (new_account_limit, email_limit). Every 429 carries Retry-After: wait that many seconds. |
Example
curl -X POST "https://docudetect.com/api/public/v1/documents/$DOCUMENT_ID/signers/$SIGNER_ID/embedded-session" \
-H "Authorization: Bearer $DOCUDETECT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"origin":"app.example.com"}'