API Reference
API reference
Generated from the OpenAPI 3.1 file (version 2026-10-07). Every request needs Authorization: Bearer $DOCUSTAY_KEY; writes take an Idempotency-Key. Download openapi.json.
Documents
Templates you can send
/api/v1/documents/templatesAnswers
200Approved, current templates.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
List documents
/api/v1/documentsFilter by your own reference: `externalId=…`, and `metadata[key]=value` (repeat for more keys; a document must match all).
Parameters
statestring · querylimitinteger · querycursorstring · queryexternalIdstring · queryAnswers
200A page of documents, newest first.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Make a document from words and people
/api/v1/documentsPeople first: each person has a name, an email and (optionally) a role word from the text. The document is left as a **draft** unless `sendNow` is true. Needs an `Idempotency-Key`.
Request body (JSON)
emailobjectmetadataobjectexternalIdstringtitlestringrequiredsourceobjectrequiredpeoplearray of objectrequiredfactsobjectvariableValuesobjectpaperletter | a4sendobjectdescriptionstringsendNowbooleanAnswers
201The document.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
One document and where each person is
/api/v1/documents/{id}Parameters
idstring · pathrequiredAnswers
200The document.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).404No such document.429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Download the signed copy
/api/v1/documents/{id}/signed.pdfParameters
idstring · pathrequiredAnswers
200The sealed PDF, with its certificate.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).404Not signed yet, or no such document.429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Send a template to people to sign
/api/v1/documents/sendMakes a document from the template, puts each person on their seat and sends it. Needs an `Idempotency-Key` header (8–200 characters): a retry with the same key and body does not send again.
Request body (JSON)
templateIdstringrequiredemailobjectmetadataobjectexternalIdstringtitlestringmessagestring or nullsubjectstringlanguageen | es | fr | de | pt | it | nl | pl | tr | ru | ar | ja | zh | koexpiryDaysintegerembeddedarray of stringpartiesarray of objectrequiredAnswers
201Sent.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Ask for an AI-written draft
/api/v1/documents/ai/draftStarts a draft and answers at once with a job id; poll `GET /api/v1/documents/ai/jobs/{id}`. The draft is a suggestion for a person to read; nothing is saved or sent. Refused plainly when AI drafting is switched off for the workspace or a limit is reached.
Request body (JSON)
promptstringbriefobjectmodetemplate | documentAnswers
202Started.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Read an AI draft job
/api/v1/documents/ai/jobs/{id}Parameters
idstring · pathrequiredAnswers
200The job. When `state` is `done`, `source` is the draft and `patches.notes` lists what to check.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).404No such job.429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
The document's audit log as CSV
/api/v1/documents/{id}/audit-log.csvParameters
idstring · pathrequiredAnswers
200One row per event: time (UTC), event, description, person, document, detail.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).404No such document.429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Remind the people who still have to sign
/api/v1/documents/{id}/remindParameters
idstring · pathrequiredRequest body (JSON)
seatstringAnswers
200Reminded.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).409Nobody is waiting to be reminded.429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Start an embedded signing session for a seat
/api/v1/documents/{id}/embed-sessionFor a seat that was sent in `embedded`. Returns a link that works for one hour and is meant for an iframe or the `<docustay-sign>` element on one of your allowed websites. It is the only way a key can put someone in front of a signing form, and only for seats you marked embedded yourself. Needs an `Idempotency-Key` header.
Parameters
idstring · pathrequiredRequest body (JSON)
seatstringrequiredoriginstringrequiredAnswers
200The session.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).409The seat was not sent as embedded, it is not their turn, the website is not allowed, or embedding is off.429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Sign a test document (test mode only)
/api/v1/documents/{id}/test-signSigns one seat of a **test** document with sample answers, through the same code a person's signature uses: consent, signing order, the audit trail and your webhooks all happen. Only a test key (`dsk_test_…`) may call it, and only on a test document; a live key gets `403`. A seat with a payment field cannot be test-signed: pay it with a Stripe test card.
Parameters
idstring · pathrequiredRequest body (JSON)
seatstringrequiredAnswers
200Signed.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Void a document that is still out for signature
/api/v1/documents/{id}/voidParameters
idstring · pathrequiredRequest body (JSON)
reasonstringAnswers
200Voided.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Check a document's words before making it
/api/v1/documents/checkRequest body (JSON)
sourceobjectrequiredfactsobjectpeoplearray of objectvariableValuesobjectrequireSignaturebooleanforTemplatebooleanAnswers
200What a person would be told.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
The words, people and choices of a draft
/api/v1/documents/{id}/sourceParameters
idstring · pathrequiredAnswers
200The draft's source.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Change the words of a draft
/api/v1/documents/{id}/reviseA draft is never edited in place: the new words are printed into a NEW draft that takes the people and choices, and the old draft is deleted. **The id changes** (use `id` in the answer). Needs an `Idempotency-Key`.
Parameters
idstring · pathrequiredRequest body (JSON)
sourceobjectrequiredfactsobjectvariableValuesobjectroleMapobjectAnswers
201The new draft.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Send a draft
/api/v1/documents/{id}/sendSends a draft made with `POST /api/v1/documents`. The same checks as the screen's Send; a payment field needs Stripe connected. Needs an `Idempotency-Key`.
Parameters
idstring · pathrequiredAnswers
201Sent.202A draft-only key: the request waits for a person to approve it in the app. The document is still a draft.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Ask the assistant to change a document
/api/v1/documents/ai/editStarts an edit job and answers at once; poll `GET /api/v1/documents/ai/jobs/{id}`. The answer is a list of **proposed changes** (`patches.applied`); nothing is changed until you apply the ones you accept with your own copy of the source. If you pass the template's questions in `variables`, `patches.values` carries proposed answers.
Request body (JSON)
requeststringrequiredsourceobjectrequiredmodetemplate | documentvariablesarray of objectAnswers
202Started.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Cancel an AI job
/api/v1/documents/ai/jobs/{id}/cancelParameters
idstring · pathrequiredAnswers
200The job.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
The wizard's questions
/api/v1/ai/wizardThe questions the screen's Describe wizard asks, so an integration asks the same ones and sends the answers as `brief` to `POST /api/v1/documents/ai/draft`. Includes the payment questions and the currencies offered.
Answers
200The questions.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Templates
Make a template from HTML with text tags
/api/v1/templates/htmlPrints your HTML to a PDF and places a field wherever a text tag sits, then keeps the result as a template you can send with `POST /api/v1/documents/send`. Needs an `Idempotency-Key` header.
Request body (JSON)
metadataobjectexternalIdstringnamestringrequiredhtmlstringrequiredpaperletter | a4Answers
201The template.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Make a template from a file with text tags
/api/v1/templates/fileReads a PDF, Word, Excel, PowerPoint or image file, places a field wherever a text tag is written in it, and keeps the result as a template. Needs an `Idempotency-Key` header.
Request body (JSON)
metadataobjectexternalIdstringnamestringrequiredfileNamestringrequiredfilestringrequiredAnswers
201The template.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Make a template from a document source
/api/v1/templates/sourceKeeps a document written in the shared editor's format as a template (profile `typeset` by default). Needs an `Idempotency-Key` header.
Request body (JSON)
metadataobjectexternalIdstringnamestringrequiredsourceobjectrequiredprofiletypeset | contractpaperletter | a4Answers
201The template.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
One template and its seats
/api/v1/templates/{id}Parameters
idstring · pathrequiredAnswers
200The template.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).404No such template.429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Use a written template for people
/api/v1/templates/{id}/documentsMakes a document from a template made with `POST /api/v1/templates/source`: the people, the template's questions answered in `variableValues` (see `GET /api/v1/templates/{id}`), the template's own defaults first. A draft unless `sendNow`. Needs an `Idempotency-Key`.
Parameters
idstring · pathrequiredRequest body (JSON)
emailobjectmetadataobjectexternalIdstringtitlestringpeoplearray of objectrequiredvariableValuesobjectfactsobjectsendobjectsendNowbooleanAnswers
201The document.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Set what a document made from a template starts with
/api/v1/templates/{id}/defaultsParameters
idstring · pathrequiredRequest body (JSON)
descriptionstring or nullclientDescriptionstring or nullmessagestring or nullsendobjectAnswers
200Saved.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Account
Documents and emails used against your plan
/api/v1/usageDocuments sent this calendar month (UTC) and emails sent today, with the plan's limits. `limit` is null when the plan has no limit.
Answers
200Usage.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Is Stripe ready to take a payment?
/api/v1/payments/status`connected` (details submitted, charges on, nothing due), `needs_attention` (Stripe still needs information) or `not_connected`. A document with a payment field can only be sent when this says `connected`.
Answers
200The status.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Reports
Counts of what was sent and completed
/api/v1/reportsReal documents only — documents made in test mode are never counted. Dates are in the workspace's own time zone; `to` is inclusive; the default window is the last 30 days.
Parameters
fromstring · querytostring · queryteamstring · queryAnswers
200The report.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Teams
Teams and their members
/api/v1/teamsAnswers
200The teams.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
The workspace's email wording
/api/v1/email-templatesParameters
localestring · queryAnswers
200The eight message types with the standard and the saved wording.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Set the wording of one email
/api/v1/email-templates/{kind}Variables look like `{{document.title}}`; each message type accepts only its own (see GET). A blank field means the standard wording.
Parameters
kindstring · pathrequiredRequest body (JSON)
localestringsubjectstring or nullpreviewstring or nullbodystring or nullbuttonLabelstring or nullfooterstring or nullAnswers
200The saved wording.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Back to the standard wording
/api/v1/email-templates/{kind}Parameters
kindstring · pathrequiredlocalestring · queryAnswers
200The standard wording again.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Preview an email with made-up names
/api/v1/email-templates/{kind}/previewParameters
kindstring · pathrequiredRequest body (JSON)
localestringsubjectstring or nullpreviewstring or nullbodystring or nullbuttonLabelstring or nullfooterstring or nullAnswers
200Subject, preview line, body and the HTML.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
The log of email about your documents
/api/v1/emailsEvery email sent about a document, to a person named on it: kind, subject, status (sent, delivered, bounced, complained, failed, paused). Filter by `documentId`, `to`, `status`, `kind`. No bodies, no links.
Parameters
documentIdstring · querytostring · querystatusstring · querykindstring · querylimitinteger · querycursorstring · queryAnswers
200A page of emails, newest first.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Plays
List plays
/api/v1/playsThe built-in plays and your published ones: name, one-line description, kind and category.
Parameters
kindstring · querycategorystring · queryAnswers
200List plays400Not valid.403Not allowed (Pro) or the key lacks the scope.
Show the request
Save a play (a new version)
/api/v1/plays`source` is the play file: Markdown with a block of YAML at the top. Every save is a new immutable version; publish it to use it. Data only: a play cannot add tools, run code, send or take payments.
Request body (JSON)
sourcestringrequiredAnswers
201Save a play (a new version)400Not valid.403Not allowed (Pro) or the key lacks the scope.
Show the request
One play
/api/v1/plays/{name}Parameters
namestring · pathrequiredAnswers
200One play400Not valid.403Not allowed (Pro) or the key lacks the scope.
Show the request
Archive a play
/api/v1/plays/{name}Parameters
namestring · pathrequiredAnswers
200Archive a play400Not valid.403Not allowed (Pro) or the key lacks the scope.
Show the request
Check a play without saving it
/api/v1/plays/testA dry run: parses the play file, reports every problem, and shows what the picker and the interview would use. Creates nothing.
Request body (JSON)
sourcestringrequiredAnswers
200Check a play without saving it400Not valid.403Not allowed (Pro) or the key lacks the scope.
Show the request
Publish a play version
/api/v1/plays/{name}/publishParameters
namestring · pathrequiredRequest body (JSON)
versionintegerAnswers
200Publish a play version400Not valid.403Not allowed (Pro) or the key lacks the scope.
Show the request
Copy a play under a new name
/api/v1/plays/{name}/duplicateParameters
namestring · pathrequiredRequest body (JSON)
asstringAnswers
201Copy a play under a new name400Not valid.403Not allowed (Pro) or the key lacks the scope.
Show the request
List playbooks
/api/v1/playbooksNamed bundles of plays.
Answers
200List playbooks400Not valid.403Not allowed (Pro) or the key lacks the scope.
Show the request
Save a playbook
/api/v1/playbooksRequest body (JSON)
namestringrequiredtitlestringrequireddescriptionstringplaysarray of stringrequiredAnswers
201Save a playbook400Not valid.403Not allowed (Pro) or the key lacks the scope.
Show the request
Start a draft from a play
/api/v1/draftsReturns `status: needs_input` with up to 4 questions (each with 2 to 4 options and a `draftRef`) until the play's must-ask questions are answered, then `status: draft` with the new draft's id. Nothing is ever sent: a draft is a draft. Answer with `POST /api/v1/drafts/{draftRef}/answers`.
Request body (JSON)
playstringrequiredtitlestringpeoplearray of objectrequiredanswersobjectuseDefaultsbooleanAnswers
200Start a draft from a play400Not valid.403Not allowed (Pro) or the key lacks the scope.
Show the request
Answer a play's questions
/api/v1/drafts/{draftRef}/answersParameters
draftRefstring · pathrequiredRequest body (JSON)
answersobjectrequireduseDefaultsbooleanAnswers
200Answer a play's questions400Not valid.403Not allowed (Pro) or the key lacks the scope.
Show the request
Webhooks
The events a webhook can subscribe to
/api/v1/webhooks/topicsAnswers
200The event names.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
List webhooks
/api/v1/webhooksAnswers
200Your webhook endpoints, newest first.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Add a webhook
/api/v1/webhooksGive an `https` `url` that can be reached from the internet, or `relay: true` for an endpoint that keeps its signed deliveries for `docustay listen` to fetch to your own computer. The signing secret is in the answer **once**. Events are signed with HMAC-SHA256 (Standard Webhooks headers `webhook-id`, `webhook-timestamp`, `webhook-signature`; also `keystone-signature`).
Request body (JSON)
urlstringrelaybooleannamestringeventTypesarray of stringrequiredAnswers
201Added. `secret` is shown once.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Remove a webhook
/api/v1/webhooks/{id}Parameters
idstring · pathrequiredAnswers
200Removed: it receives nothing more. Its past deliveries stay in the record.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Send a test event
/api/v1/webhooks/{id}/testSends a sample signed event (`test: true` in its payload) to the webhook now and returns the receiver's answer. Nothing is stored and failures here never count toward disabling the webhook.
Parameters
idstring · pathrequiredRequest body (JSON)
topicstringAnswers
200What the receiver answered.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Rotate the signing secret
/api/v1/webhooks/{id}/rotateMakes a new secret (shown once). For `windowHours` (default 24) every event is signed with both the new and the old secret, so your receiver can switch without a gap.
Parameters
idstring · pathrequiredRequest body (JSON)
windowHoursintegerAnswers
200The new secret.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Recent deliveries
/api/v1/webhooks/{id}/deliveriesParameters
idstring · pathrequiredAnswers
200The last 50 delivery attempts, newest first.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Fetch stored deliveries of a relay webhook
/api/v1/webhooks/{id}/relayFor `docustay listen`. Returns deliveries stored since `after` (an id from a previous answer; leave out for the newest few), oldest first, each with the exact headers to forward so the signature checks out. Waits up to `wait` seconds (max 25) when there is nothing yet. Kept 24 hours.
Parameters
idstring · pathrequiredafterstring · querywaitinteger or null · querylimitinteger · queryAnswers
200Stored deliveries.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Embedding
Start an embedded template builder session
/api/v1/embedded/builder-sessionReturns a link that works for one hour and is meant for an iframe or the `<docustay-builder>` element on one of your allowed websites. The builder lets the person write a document, drop signature and other fields on it, and save it as a template; the saved template's id comes back to your page in a `saved` event. The link holds a key of its own that can only read and write templates and stops working after an hour. Needs an `Idempotency-Key` header.
Request body (JSON)
originstringrequirednamestringAnswers
200The session.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Start an embedded Scribe session
/api/v1/embedded/scribe-sessionReturns a link that works for one hour and is meant for an iframe or the `<docustay-scribe>` element on one of your allowed websites. The person picks a play, names who signs, answers a few clickable questions and gets a DRAFT; the draft's id comes back to your page in a `drafted` event. The link holds a key of its own that is draft-only (it cannot send: asking to send files an approval a person decides in Docustay), allows 50 drafts a day and stops working after an hour. Needs an `Idempotency-Key` header.
Request body (JSON)
originstringrequirednamestringAnswers
200The session.400The request is not valid. `message` says which field and why.401The key is missing, wrong, revoked, or lacks the scope. Every credential failure gets this same answer.403The key is valid but not allowed to do this (a plan limit, or the action is not permitted for keys).429Too many requests. Wait `Retry-After` seconds, then try again.
Show the request
Loading the examples…