Webhooks
Webhooks 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 webhook endpoints
GET /webhook-endpoints
Permission: webhooks:manage
Every endpoint of the account. Ones this key made are shown in full; others with a masked address.
Response 200
data: WebhookEndpointList
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/webhook-endpoints" \
-H "Authorization: Bearer $DOCUDETECT_API_KEY"Add a webhook endpoint (subscribe)
POST /webhook-endpoints
Permission: webhooks:manage
DocuDetect POSTs each chosen document.* event to the address, signed in the DocuDetect-Signature header with the secret this returns once. Payloads carry ids, types and times only. Counts against the plan's webhook endpoints (Free 1). Not idempotent: a retry after a timeout may add a second endpoint, so list first. Revoking the key turns its endpoints off.
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
url | string | yes | A public https:// address on the standard port. Local and private addresses are refused. |
description | string | no | |
events | array: ["*"] or array of one of document.created, document.sent, document.viewed, document.reminded, document.email_bounced, document.link_renewed, document.recipient_changed, document.signed, document.completed, document.canceled, document.declined, document.reopened, document.expired, document.held_for_review, document.duplicated, document.deleted, document.copy_emailed, document.source_replaced, document.signers_changed, document.link_requested, document.verified, document.reminders_paused, document.reminders_resumed, document.cancel_notified, document.step_started, document.signer_activated, document.expiry_extended, document.in_person_started, document.in_person_ended, document.signers_suggested_accepted, document.approval_requested, document.approved, document.sent_back, document.approval_withdrawn, document.embedded_session_opened | yes | ["*"] for every event (including ones added later), or a list of document.* names. |
Response 201
data: WebhookEndpointCreated
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. |
503 | Temporarily unavailable (unavailable); retry shortly with the same Idempotency-Key. |
Example
curl -X POST "https://docudetect.com/api/public/v1/webhook-endpoints" \
-H "Authorization: Bearer $DOCUDETECT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/webhooks/docudetect","events":["document.completed","document.declined"],"description":"Order system"}'Delete a webhook endpoint (unsubscribe)
DELETE /webhook-endpoints/{id}
Permission: webhooks:manage
Only an endpoint this key made, or one a revoked or expired key left behind (403 not_yours otherwise).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A webhook endpoint id. |
Response 200
data: WebhookEndpointDeleted
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). |
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 DELETE "https://docudetect.com/api/public/v1/webhook-endpoints/$ENDPOINT_ID" \
-H "Authorization: Bearer $DOCUDETECT_API_KEY"