{"openapi":"3.1.0","jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","info":{"title":"LoqSign API","version":"1.0.0","summary":"Send documents for signature, from a file or a template, and follow them to the executed copy.","description":"Authenticate with `Authorization: Bearer sk_live_…` (or `sk_test_…` for test mode).\n\nTest keys work like live keys, but nobody is emailed, no quota is used, the signed copy and the certificate are stamped TEST, and they only see their own test documents. They may read webhook endpoints and contacts but not change them. The one-time code for a test document is 000000.\n\nEvery refusal is `{ code, message, details?, requestId }` (plus the older `error`). Branch on `code`.\n\nWebhook events: DOCUMENT_SENT, DOCUMENT_VIEWED, DOCUMENT_SIGNED, DOCUMENT_COMPLETED, DOCUMENT_VOIDED, DOCUMENT_EXPIRED, RECIPIENT_SIGNED, RECIPIENT_DECLINED, recipient.question_asked, document.key_date_upcoming. Each delivery carries `testMode`.\n\n`document.key_date_upcoming` (contract calendar, when it is on) is sent at each reminder the sender set before a CONFIRMED key date of a completed document — by default 30, 7 and 1 days before — with `data.keyDate` = `{ id, kind, label, date, daysBefore, page, source }`. Its idempotency key is stable per date and reminder, so a retry or a second worker never sends it twice."},"servers":[{"url":"https://loqsign-api-prod.fly.dev/api/v1"}],"security":[{"apiKey":[]}],"tags":[{"name":"Documents"},{"name":"Templates"},{"name":"Bulk sends"},{"name":"Contacts"},{"name":"Webhooks"},{"name":"Meta"}],"paths":{"/documents":{"post":{"operationId":"createDocument","tags":["Documents"],"summary":"Create a document and get an upload URL","description":"PUT the file to `uploadUrl` (Content-Type application/pdf), then call confirm.\n\nRequires `documents.create`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Up to 255 printable ASCII characters. A retry with the same key and body returns the first answer (Idempotent-Replayed: true) for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentRequest"}}}},"responses":{"201":{"description":"Created as a DRAFT.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentCreated"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The document is not in a state that allows it (e.g. DOCUMENT_NOT_COMPLETED), IDEMPOTENCY_KEY_IN_USE, or IDEMPOTENCY_ANSWER_LOST.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"IDEMPOTENCY_KEY_REUSED: the same Idempotency-Key with a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["documents.create"]},"get":{"operationId":"listDocuments","tags":["Documents"],"summary":"List documents","description":"List documents\n\nRequires `documents.view_own`.","parameters":[{"name":"page","in":"query","required":false,"description":"page: 1–100000, default 1","schema":{"description":"page: 1–100000, default 1","type":"string","pattern":"^\\d+$"}},{"name":"limit","in":"query","required":false,"description":"limit: 1–100, default 20","schema":{"description":"limit: 1–100, default 20","type":"string","pattern":"^\\d+$"}},{"name":"status","in":"query","required":false,"description":"One status, or several separated by commas. Default: every status except VOIDED.","schema":{"description":"One status, or several separated by commas. Default: every status except VOIDED.","type":"string"}}],"responses":{"200":{"description":"Newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentList"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["documents.view_own"]}},"/documents/{id}/confirm":{"post":{"operationId":"confirmDocumentUpload","tags":["Documents"],"summary":"Confirm the upload landed","description":"Confirm the upload landed\n\nRequires `documents.create`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Up to 255 printable ASCII characters. A retry with the same key and body returns the first answer (Idempotent-Replayed: true) for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmDocumentRequest"}}}},"responses":{"200":{"description":"The file is processed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResult"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found — or not reachable by this key, or of the other mode (test/live).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The document is not in a state that allows it (e.g. DOCUMENT_NOT_COMPLETED), IDEMPOTENCY_KEY_IN_USE, or IDEMPOTENCY_ANSWER_LOST.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"IDEMPOTENCY_KEY_REUSED: the same Idempotency-Key with a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["documents.create"]}},"/documents/{id}/prepare":{"put":{"operationId":"prepareDocument","tags":["Documents"],"summary":"Set recipients and fields","description":"Set recipients and fields\n\nRequires `documents.send`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepareDocumentRequest"}}}},"responses":{"200":{"description":"Saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResult"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found — or not reachable by this key, or of the other mode (test/live).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["documents.send"]}},"/documents/{id}/send":{"post":{"operationId":"sendDocument","tags":["Documents"],"summary":"Send a prepared draft","description":"Send a prepared draft\n\nRequires `documents.send`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Up to 255 printable ASCII characters. A retry with the same key and body returns the first answer (Idempotent-Replayed: true) for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendDocumentRequest"}}}},"responses":{"200":{"description":"Sent. A test key sends nothing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSent"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found — or not reachable by this key, or of the other mode (test/live).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The document is not in a state that allows it (e.g. DOCUMENT_NOT_COMPLETED), IDEMPOTENCY_KEY_IN_USE, or IDEMPOTENCY_ANSWER_LOST.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"IDEMPOTENCY_KEY_REUSED: the same Idempotency-Key with a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["documents.send"]}},"/documents/{id}/questions":{"get":{"operationId":"listDocumentQuestions","tags":["Documents"],"summary":"Read recipient questions and sender replies","description":"Read-only correspondence. At most 100 questions per document and 100 replies per question. Text is plain text. Completed threads are immutable.\n\nRequires `documents.view_own`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Questions in chronological order, with sender replies and evidence inclusion state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentQuestions"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found — or not reachable by this key, or of the other mode (test/live).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["documents.view_own"]}},"/documents/{id}":{"get":{"operationId":"getDocument","tags":["Documents"],"summary":"Get a document","description":"Get a document\n\nRequires `documents.view_own`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"With recipients and the latest audit entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDetail"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found — or not reachable by this key, or of the other mode (test/live).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["documents.view_own"]}},"/documents/{id}/void":{"post":{"operationId":"voidDocument","tags":["Documents"],"summary":"Void a document","description":"Void a document\n\nRequires `documents.delete`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Up to 255 printable ASCII characters. A retry with the same key and body returns the first answer (Idempotent-Replayed: true) for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoidDocumentRequest"}}}},"responses":{"200":{"description":"Voided.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResult"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found — or not reachable by this key, or of the other mode (test/live).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The document is not in a state that allows it (e.g. DOCUMENT_NOT_COMPLETED), IDEMPOTENCY_KEY_IN_USE, or IDEMPOTENCY_ANSWER_LOST.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"IDEMPOTENCY_KEY_REUSED: the same Idempotency-Key with a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["documents.delete"]}},"/documents/{id}/remind":{"post":{"operationId":"remindDocument","tags":["Documents"],"summary":"Remind pending recipients","description":"Remind pending recipients\n\nRequires `documents.send` and the plan feature `reminders`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Up to 255 printable ASCII characters. A retry with the same key and body returns the first answer (Idempotent-Replayed: true) for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemindDocumentRequest"}}}},"responses":{"200":{"description":"Reminded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentReminded"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found — or not reachable by this key, or of the other mode (test/live).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The document is not in a state that allows it (e.g. DOCUMENT_NOT_COMPLETED), IDEMPOTENCY_KEY_IN_USE, or IDEMPOTENCY_ANSWER_LOST.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"IDEMPOTENCY_KEY_REUSED: the same Idempotency-Key with a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["documents.send"],"x-plan-feature":"reminders"}},"/documents/{id}/signing-links":{"get":{"operationId":"listSigningLinks","tags":["Documents"],"summary":"Signing links for embedded or self-delivered signing","description":"Signing links for embedded or self-delivered signing\n\nRequires `documents.send`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"recipientId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"One link per signer and approver.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SigningLinks"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found — or not reachable by this key, or of the other mode (test/live).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["documents.send"]}},"/documents/{id}/recipients/{recipientId}/embedded-sessions":{"post":{"operationId":"createEmbeddedSigningSession","tags":["Documents"],"summary":"A single-use URL to sign inside your own page (embedded signing)","description":"For a signer you have signed in yourself. Open `url` in an iframe (or the @loqsign/embed script) on one of your verified origins (Settings → Embedded signing) within 5 minutes; it opens once. The page posts `loqsign:*` events to the parent window. The access PIN is not asked in an embedded session; an emailed one-time code still is. 409 EMBED_ORIGIN_REQUIRED until an origin is verified.\n\nRequires `documents.send` and the plan feature `apiAccess`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"recipientId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Up to 255 printable ASCII characters. A retry with the same key and body returns the first answer (Idempotent-Replayed: true) for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmbeddedSessionRequest"}}}},"responses":{"201":{"description":"Created. The URL is a credential: hand it only to the signer's browser.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddedSession"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found — or not reachable by this key, or of the other mode (test/live).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The document is not in a state that allows it (e.g. DOCUMENT_NOT_COMPLETED), IDEMPOTENCY_KEY_IN_USE, or IDEMPOTENCY_ANSWER_LOST.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"IDEMPOTENCY_KEY_REUSED: the same Idempotency-Key with a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["documents.send"],"x-plan-feature":"apiAccess"}},"/documents/{id}/download":{"get":{"operationId":"downloadDocument","tags":["Documents"],"summary":"A short-lived URL for the executed copy (or another file)","description":"A short-lived URL for the executed copy (or another file)\n\nRequires `documents.download`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"query","required":false,"description":"An envelope file id, for original or signed. Omit for the combined PDF.","schema":{"description":"An envelope file id, for original or signed. Omit for the combined PDF.","type":"string","minLength":1,"maxLength":128}},{"name":"type","in":"query","required":false,"description":"signed (default): the executed copy, once COMPLETED. original: the file as uploaded. certificate (or audit): the certificate of completion with the audit trail, once COMPLETED.","schema":{"default":"signed","description":"signed (default): the executed copy, once COMPLETED. original: the file as uploaded. certificate (or audit): the certificate of completion with the audit trail, once COMPLETED.","type":"string","enum":["signed","original","certificate","audit"]}},{"name":"locale","in":"query","required":false,"description":"For type=certificate|audit: the language used only when the sender's cannot be determined (the certificate is issued once, in the sender's language). Default: from Accept-Language, else English.","schema":{"description":"For type=certificate|audit: the language used only when the sender's cannot be determined (the certificate is issued once, in the sender's language). Default: from Accept-Language, else English.","type":"string","enum":["en","he","ar","ru","fr","es","de","pt","it","tr","pl","uk","fa","ur"]}}],"responses":{"200":{"description":"Fetch `url` within `expiresInSeconds`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Download"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found — or not reachable by this key, or of the other mode (test/live).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The document is not in a state that allows it (e.g. DOCUMENT_NOT_COMPLETED), IDEMPOTENCY_KEY_IN_USE, or IDEMPOTENCY_ANSWER_LOST.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["documents.download"]}},"/documents/{id}/certificate":{"get":{"operationId":"getCertificate","tags":["Documents"],"summary":"The certificate of completion (PDF)","description":"The certificate of completion (PDF)\n\nRequires `documents.download`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"locale","in":"query","required":false,"description":"The language used only when the sender's cannot be determined: the certificate is issued once, in the sender's language. Default: from Accept-Language, else English.","schema":{"description":"The language used only when the sender's cannot be determined: the certificate is issued once, in the sender's language. Default: from Accept-Language, else English.","type":"string","enum":["en","he","ar","ru","fr","es","de","pt","it","tr","pl","uk","fa","ur"]}}],"responses":{"200":{"description":"application/pdf","content":{"application/pdf":{"schema":{"type":"string","contentMediaType":"application/pdf"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found — or not reachable by this key, or of the other mode (test/live).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["documents.download"]}},"/templates":{"get":{"operationId":"listTemplates","tags":["Templates"],"summary":"List templates","description":"List templates\n\nRequires `templates.view_all` and the plan feature `templates`.","parameters":[{"name":"page","in":"query","required":false,"description":"page: 1–100000, default 1","schema":{"description":"page: 1–100000, default 1","type":"string","pattern":"^\\d+$"}},{"name":"limit","in":"query","required":false,"description":"limit: 1–100, default 20","schema":{"description":"limit: 1–100, default 20","type":"string","pattern":"^\\d+$"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"Most recently changed first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateList"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["templates.view_all"],"x-plan-feature":"templates"}},"/templates/{id}":{"get":{"operationId":"getTemplate","tags":["Templates"],"summary":"Get a template with its roles and merge fields","description":"Get a template with its roles and merge fields\n\nRequires `templates.view_all` and the plan feature `templates`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found — or not reachable by this key, or of the other mode (test/live).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["templates.view_all"],"x-plan-feature":"templates"}},"/templates/{id}/documents":{"post":{"operationId":"createDocumentFromTemplate","tags":["Templates"],"summary":"Create (and optionally send) a document from a template","description":"Recipients by role id or name; `prefill` by merge field key. `send: true` also needs documents.send.\n\nRequires `documents.create` and the plan feature `templates`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Up to 255 printable ASCII characters. A retry with the same key and body returns the first answer (Idempotent-Replayed: true) for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFromTemplateRequest"}}}},"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateDocumentCreated"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found — or not reachable by this key, or of the other mode (test/live).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The document is not in a state that allows it (e.g. DOCUMENT_NOT_COMPLETED), IDEMPOTENCY_KEY_IN_USE, or IDEMPOTENCY_ANSWER_LOST.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"IDEMPOTENCY_KEY_REUSED: the same Idempotency-Key with a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["documents.create"],"x-plan-feature":"templates"}},"/bulk-sends":{"post":{"operationId":"createBulkSend","tags":["Bulk sends"],"summary":"Send a template to many recipient sets","description":"Send a template to many recipient sets\n\nRequires `documents.send` and the plan feature `bulkSend`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Up to 255 printable ASCII characters. A retry with the same key and body returns the first answer (Idempotent-Replayed: true) for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSendRequest"}}}},"responses":{"201":{"description":"Created; the rest are delivered in the background.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSendCreated"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found — or not reachable by this key, or of the other mode (test/live).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The document is not in a state that allows it (e.g. DOCUMENT_NOT_COMPLETED), IDEMPOTENCY_KEY_IN_USE, or IDEMPOTENCY_ANSWER_LOST.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"IDEMPOTENCY_KEY_REUSED: the same Idempotency-Key with a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["documents.send"],"x-plan-feature":"bulkSend"}},"/bulk-sends/{id}":{"get":{"operationId":"getBulkSend","tags":["Bulk sends"],"summary":"Progress of a bulk send","description":"Progress of a bulk send\n\nRequires `documents.view_own`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The bulk send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSend"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found — or not reachable by this key, or of the other mode (test/live).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["documents.view_own"]}},"/contacts":{"get":{"operationId":"listContacts","tags":["Contacts"],"summary":"List contacts","description":"List contacts\n\nRequires `contacts.view_all`.","parameters":[{"name":"page","in":"query","required":false,"description":"page: 1–100000, default 1","schema":{"description":"page: 1–100000, default 1","type":"string","pattern":"^\\d+$"}},{"name":"limit","in":"query","required":false,"description":"limit: 1–100, default 20","schema":{"description":"limit: 1–100, default 20","type":"string","pattern":"^\\d+$"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"By name.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactList"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["contacts.view_all"]},"post":{"operationId":"createContact","tags":["Contacts"],"summary":"Create a contact","description":"Test keys may read contacts but not change them (403 TEST_KEY_NOT_ALLOWED).\n\nRequires `contacts.manage`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Up to 255 printable ASCII characters. A retry with the same key and body returns the first answer (Idempotent-Replayed: true) for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactRequest"}}}},"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactResult"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The document is not in a state that allows it (e.g. DOCUMENT_NOT_COMPLETED), IDEMPOTENCY_KEY_IN_USE, or IDEMPOTENCY_ANSWER_LOST.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"IDEMPOTENCY_KEY_REUSED: the same Idempotency-Key with a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["contacts.manage"]}},"/contacts/{id}":{"get":{"operationId":"getContact","tags":["Contacts"],"summary":"Get a contact","description":"Get a contact\n\nRequires `contacts.view_all`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The contact.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactResult"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found — or not reachable by this key, or of the other mode (test/live).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["contacts.view_all"]},"patch":{"operationId":"updateContact","tags":["Contacts"],"summary":"Update a contact","description":"Test keys may read contacts but not change them (403 TEST_KEY_NOT_ALLOWED).\n\nRequires `contacts.manage`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContactRequest"}}}},"responses":{"200":{"description":"Updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactResult"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found — or not reachable by this key, or of the other mode (test/live).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["contacts.manage"]},"delete":{"operationId":"deleteContact","tags":["Contacts"],"summary":"Delete a contact","description":"Test keys may read contacts but not change them (403 TEST_KEY_NOT_ALLOWED).\n\nRequires `contacts.manage`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found — or not reachable by this key, or of the other mode (test/live).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The document is not in a state that allows it (e.g. DOCUMENT_NOT_COMPLETED), IDEMPOTENCY_KEY_IN_USE, or IDEMPOTENCY_ANSWER_LOST.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["contacts.manage"]}},"/webhooks":{"get":{"operationId":"listWebhooks","tags":["Webhooks"],"summary":"List webhook endpoints","description":"List webhook endpoints\n\nRequires one of `developers.manage`, `billing.manage`, `webhooks.manage`.","responses":{"200":{"description":"Secrets are never listed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookList"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["developers.manage","billing.manage","webhooks.manage"]},"post":{"operationId":"createWebhook","tags":["Webhooks"],"summary":"Subscribe a webhook endpoint","description":"The workspace's real endpoints: a test key may list them but not change them (403 TEST_KEY_NOT_ALLOWED). Events of test documents are delivered too, with `testMode: true`; branch on it.\n\nRequires one of `developers.manage`, `billing.manage`, `webhooks.manage` and the plan feature `webhooks`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Up to 255 printable ASCII characters. A retry with the same key and body returns the first answer (Idempotent-Replayed: true) for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookRequest"}}}},"responses":{"201":{"description":"The signing secret, once.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreated"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The document is not in a state that allows it (e.g. DOCUMENT_NOT_COMPLETED), IDEMPOTENCY_KEY_IN_USE, or IDEMPOTENCY_ANSWER_LOST.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"IDEMPOTENCY_KEY_REUSED: the same Idempotency-Key with a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["developers.manage","billing.manage","webhooks.manage"],"x-plan-feature":"webhooks"}},"/webhooks/{id}":{"delete":{"operationId":"deleteWebhook","tags":["Webhooks"],"summary":"Unsubscribe a webhook endpoint","description":"The workspace's real endpoints: a test key may list them but not change them (403 TEST_KEY_NOT_ALLOWED). Events of test documents are delivered too, with `testMode: true`; branch on it.\n\nRequires one of `developers.manage`, `billing.manage`, `webhooks.manage`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}}},"400":{"description":"INVALID_REQUEST / INVALID_QUERY: the body or query string does not match. `details.issues` names the fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHENTICATED: no key, an unknown, expired or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN (the key or its owner lacks the permission), API_KEY_ROUTE_NOT_ALLOWED, API_ACCESS_NOT_IN_PLAN, TEST_KEY_NOT_ALLOWED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found — or not reachable by this key, or of the other mode (test/live).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED: see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL: quote the requestId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-permissions":["developers.manage","billing.manage","webhooks.manage"]}},"/openapi.json":{"get":{"operationId":"getOpenApi","tags":["Meta"],"summary":"This document","description":"This document","security":[],"responses":{"200":{"description":"OpenAPI 3.1","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An API key from Settings → API keys."}},"schemas":{"Document":{"type":"object","properties":{"object":{"type":"string","const":"document"},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"fileName":{"type":"string"},"startPage":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pageCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"uploadHash":{"type":["string","null"]},"originalHash":{"type":["string","null"]},"finalHash":{"type":["string","null"]},"status":{"type":"string"}},"required":["id","name","fileName","startPage","pageCount","uploadHash","originalHash","finalHash"],"additionalProperties":false}},"keyDates":{"description":"Contract calendar: the key dates of a completed document (end, renewal notice, payment…), earliest first. Present when the contract calendar is on for this deployment; empty until the document is completed.","type":"array","items":{"$ref":"#/components/schemas/KeyDate"}},"id":{"type":"string"},"title":{"type":"string"},"status":{"$ref":"#/components/schemas/DocumentStatus"},"testMode":{"type":"boolean","description":"Created with a test key: nobody was messaged, and the PDFs say TEST."},"signingOrder":{"anyOf":[{"type":"string","enum":["SEQUENTIAL","PARALLEL"]},{"type":"null"}]},"signingFlowType":{"type":"string"},"templateId":{"type":["string","null"]},"bulkSendId":{"type":["string","null"]},"requireAccessPin":{"type":"boolean"},"requireSmsOtp":{"type":"boolean"},"signedPdfAvailable":{"type":"boolean","description":"Whether GET /documents/{id}/download can return the executed copy now."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},"sentAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},{"type":"null"}]},"voidedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},{"type":"null"}]},"voidReason":{"type":["string","null"]},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/Recipient"}}},"required":["object","id","title","status","testMode","signingOrder","signingFlowType","templateId","bulkSendId","requireAccessPin","requireSmsOtp","signedPdfAvailable","createdAt","updatedAt","sentAt","expiresAt","completedAt","voidedAt","voidReason","recipients"],"additionalProperties":false},"DocumentQuestions":{"type":"object","properties":{"questions":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"recipientId":{"type":"string"},"recipientName":{"type":"string"},"body":{"type":"string","maxLength":1000},"page":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"fieldId":{"type":["string","null"]},"fieldLabel":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},{"type":"null"}]},"answeredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},{"type":"null"}]},"unread":{"type":"boolean"},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"body":{"type":"string","maxLength":1000},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},"author":{"type":"string","enum":["sender","signer"]}},"required":["id","body","createdAt","author"],"additionalProperties":false}}},"required":["id","recipientId","recipientName","body","page","fieldId","fieldLabel","createdAt","resolvedAt","answeredAt","unread","messages"],"additionalProperties":false}},"includeInEvidence":{"type":"boolean"},"unreadCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["questions","includeInEvidence","unreadCount"],"additionalProperties":false},"Recipient":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":["string","null"]},"phone":{"description":"Null for a key that may not send documents.","type":["string","null"]},"type":{"$ref":"#/components/schemas/RecipientType"},"status":{"$ref":"#/components/schemas/RecipientStatus"},"order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"deliveryMethod":{"anyOf":[{"$ref":"#/components/schemas/DeliveryMethod"},{"type":"null"}]},"viewedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},{"type":"null"}]},"signedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},{"type":"null"}]},"declinedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},{"type":"null"}]},"declineReason":{"type":["string","null"]},"token":{"description":"The signing token. Only for a key holding documents.send; null otherwise.","type":["string","null"]},"signingUrl":{"description":"The signing page. Only for a key holding documents.send; null otherwise.","type":["string","null"]}},"required":["id","name","email","phone","type","status","order","deliveryMethod","viewedAt","signedAt","declinedAt","declineReason","token","signingUrl"],"additionalProperties":false},"KeyDate":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["START","END","RENEWAL_NOTICE","PAYMENT_DUE","CUSTOM"]},"label":{"description":"The name the sender gave a CUSTOM date; null otherwise.","type":["string","null"]},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The calendar day, YYYY-MM-DD, with no time zone."},"status":{"type":"string","enum":["SUGGESTED","CONFIRMED"],"description":"SUGGESTED: found in the signed document, waiting for the sender. Only CONFIRMED dates are reminded and sent as document.key_date_upcoming."},"source":{"type":"string","enum":["FIELD_ROLE","RULE","AI","MANUAL"],"description":"Where it came from: a date field the sender marked, the date rules, the AI summary, or typed by hand."},"page":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The page it was found on, when known."},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},{"type":"null"}]}},"required":["id","kind","label","date","status","source","page","confirmedAt"],"additionalProperties":false},"AuditEntry":{"type":"object","properties":{"id":{"type":"string"},"action":{"type":"string"},"actorName":{"type":["string","null"]},"actorEmail":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"}},"required":["id","action","actorName","actorEmail","createdAt"],"additionalProperties":false},"DocumentDetail":{"type":"object","properties":{"document":{"type":"object","properties":{"object":{"type":"string","const":"document"},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"fileName":{"type":"string"},"startPage":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pageCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"uploadHash":{"type":["string","null"]},"originalHash":{"type":["string","null"]},"finalHash":{"type":["string","null"]},"status":{"type":"string"}},"required":["id","name","fileName","startPage","pageCount","uploadHash","originalHash","finalHash"],"additionalProperties":false}},"keyDates":{"description":"Contract calendar: the key dates of a completed document (end, renewal notice, payment…), earliest first. Present when the contract calendar is on for this deployment; empty until the document is completed.","type":"array","items":{"$ref":"#/components/schemas/KeyDate"}},"id":{"type":"string"},"title":{"type":"string"},"status":{"$ref":"#/components/schemas/DocumentStatus"},"testMode":{"type":"boolean","description":"Created with a test key: nobody was messaged, and the PDFs say TEST."},"signingOrder":{"anyOf":[{"type":"string","enum":["SEQUENTIAL","PARALLEL"]},{"type":"null"}]},"signingFlowType":{"type":"string"},"templateId":{"type":["string","null"]},"bulkSendId":{"type":["string","null"]},"requireAccessPin":{"type":"boolean"},"requireSmsOtp":{"type":"boolean"},"signedPdfAvailable":{"type":"boolean","description":"Whether GET /documents/{id}/download can return the executed copy now."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},"sentAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},{"type":"null"}]},"voidedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},{"type":"null"}]},"voidReason":{"type":["string","null"]},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/Recipient"}},"accessPin":{"description":"The access code, for a key holding documents.send; null otherwise.","type":["string","null"]}},"required":["object","id","title","status","testMode","signingOrder","signingFlowType","templateId","bulkSendId","requireAccessPin","requireSmsOtp","signedPdfAvailable","createdAt","updatedAt","sentAt","expiresAt","completedAt","voidedAt","voidReason","recipients","accessPin"],"additionalProperties":false},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/Recipient"},"description":"Same as document.recipients; kept for integrations written before it."},"auditLogs":{"type":"array","items":{"$ref":"#/components/schemas/AuditEntry"},"description":"The latest 50 entries, newest first."}},"required":["document","recipients","auditLogs"],"additionalProperties":false},"DocumentList":{"type":"object","properties":{"documents":{"type":"array","items":{"$ref":"#/components/schemas/Document"}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"hasMore":{"type":"boolean"}},"required":["documents","total","page","limit","hasMore"],"additionalProperties":false},"DocumentCreated":{"type":"object","properties":{"document":{"$ref":"#/components/schemas/Document"},"uploadUrl":{"type":"string","description":"PUT the file here, with Content-Type application/pdf (or the Word type for docx)."},"uploads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"uploadUrl":{"type":"string"}},"required":["id","uploadUrl"],"additionalProperties":false}},"uploadExpiresInSeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["document","uploadUrl","uploadExpiresInSeconds"],"additionalProperties":false},"DocumentResult":{"type":"object","properties":{"success":{"type":"boolean","const":true},"document":{"$ref":"#/components/schemas/Document"}},"required":["success","document"],"additionalProperties":false},"DocumentSent":{"type":"object","properties":{"success":{"type":"boolean","const":true},"document":{"$ref":"#/components/schemas/Document"},"recipientCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accessPin":{"description":"The access code, once, when requireAccessPin was set.","type":"string"},"accessPinShareWith":{"description":"Recipients you must give the code to yourself.","type":"array","items":{"type":"string"}}},"required":["success","document","recipientCount"],"additionalProperties":false},"DocumentReminded":{"type":"object","properties":{"success":{"type":"boolean","const":true},"document":{"$ref":"#/components/schemas/Document"},"sentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"skipped":{"type":"object","properties":{"notRemindable":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"coolingDown":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["notRemindable","coolingDown"],"additionalProperties":false}},"required":["success","document","sentCount","skipped"],"additionalProperties":false},"Download":{"type":"object","properties":{"url":{"type":"string"},"type":{"type":"string","enum":["signed","original","certificate"]},"expiresInSeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["url","type","expiresInSeconds"],"additionalProperties":false},"SigningLink":{"type":"object","properties":{"recipientId":{"type":"string"},"name":{"type":"string"},"email":{"type":["string","null"]},"type":{"$ref":"#/components/schemas/RecipientType"},"status":{"$ref":"#/components/schemas/RecipientStatus"},"order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},{"type":"null"}]},"canSignNow":{"type":"boolean","description":"False before their turn in a sequential order, once they have acted, or when the document is no longer open."}},"required":["recipientId","name","email","type","status","order","url","expiresAt","canSignNow"],"additionalProperties":false},"SigningLinks":{"type":"object","properties":{"documentId":{"type":"string"},"accessPinRequired":{"type":"boolean"},"links":{"type":"array","items":{"$ref":"#/components/schemas/SigningLink"}}},"required":["documentId","accessPinRequired","links"],"additionalProperties":false},"EmbeddedSession":{"type":"object","properties":{"sessionId":{"type":"string"},"documentId":{"type":"string"},"recipientId":{"type":"string"},"url":{"type":"string","description":"Single use: the first open spends it. Put it in an iframe on a verified origin."},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"Open it before this (5 minutes). Once open, the page works for 2 hours."},"expiresInSeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"frameOrigins":{"type":"array","items":{"type":"string"},"description":"The verified origins that may frame it, and that receive its events."}},"required":["sessionId","documentId","recipientId","url","expiresAt","expiresInSeconds","frameOrigins"],"additionalProperties":false},"TemplateRole":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/RecipientType"}},"required":["id","name","type"],"additionalProperties":false},"MergeField":{"type":"object","properties":{"key":{"type":"string","description":"The name to prefill it by."},"fieldId":{"type":"string","description":"Accepted as a prefill key too."},"label":{"type":"string"},"kind":{"type":"string","enum":["sender","recipient"],"description":"sender: filled now, printed read-only. recipient: a starting value the signer may change."},"type":{"type":"string"},"required":{"type":"boolean"},"roleId":{"type":["string","null"]}},"required":["key","fieldId","label","kind","type","required","roleId"],"additionalProperties":false},"Template":{"type":"object","properties":{"object":{"type":"string","const":"template"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"category":{"type":["string","null"]},"signingFlowType":{"type":"string"},"signingOrder":{"type":"string","enum":["SEQUENTIAL","PARALLEL"]},"roles":{"type":"array","items":{"$ref":"#/components/schemas/TemplateRole"}},"mergeFields":{"type":"array","items":{"$ref":"#/components/schemas/MergeField"}},"defaultMessage":{"type":["string","null"]},"defaultExpiryDays":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"}},"required":["object","id","name","description","category","signingFlowType","signingOrder","roles","mergeFields","defaultMessage","defaultExpiryDays","createdAt","updatedAt"],"additionalProperties":false},"TemplateList":{"type":"object","properties":{"templates":{"type":"array","items":{"$ref":"#/components/schemas/Template"}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"hasMore":{"type":"boolean"}},"required":["templates","total","page","limit","hasMore"],"additionalProperties":false},"TemplateDocumentCreated":{"type":"object","properties":{"document":{"$ref":"#/components/schemas/Document"},"accessPin":{"type":"string"},"accessPinShareWith":{"type":"array","items":{"type":"string"}}},"required":["document"],"additionalProperties":false},"Contact":{"type":"object","properties":{"object":{"type":"string","const":"contact"},"id":{"type":"string"},"name":{"type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"company":{"type":["string","null"]},"title":{"type":["string","null"]},"notes":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"}},"required":["object","id","name","email","phone","company","title","notes","tags","createdAt","updatedAt"],"additionalProperties":false},"ContactList":{"type":"object","properties":{"contacts":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"hasMore":{"type":"boolean"}},"required":["contacts","total","page","limit","hasMore"],"additionalProperties":false},"ContactResult":{"type":"object","properties":{"contact":{"$ref":"#/components/schemas/Contact"}},"required":["contact"],"additionalProperties":false},"Deleted":{"type":"object","properties":{"success":{"type":"boolean","const":true},"id":{"type":"string"}},"required":["success","id"],"additionalProperties":false},"BulkSendProgress":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"completed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"declined":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"voided":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"expired":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pending":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unsent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failedToSend":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["total","completed","declined","voided","expired","pending","unsent","failedToSend"],"additionalProperties":false},"BulkSendCreated":{"type":"object","properties":{"bulkSend":{"type":"object","properties":{"id":{"type":"string"},"testMode":{"type":"boolean"},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"remaining":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","testMode","created","sent","remaining"],"additionalProperties":false}},"required":["bulkSend"],"additionalProperties":false},"BulkSend":{"type":"object","properties":{"object":{"type":"string","const":"bulk_send"},"id":{"type":"string"},"title":{"type":"string"},"templateId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},"progress":{"$ref":"#/components/schemas/BulkSendProgress"},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"$ref":"#/components/schemas/DocumentStatus"},"recipientName":{"type":["string","null"]},"recipientEmail":{"type":["string","null"]},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},{"type":"null"}]},"delivery":{"type":"string","enum":["PENDING","SENT","FAILED"]}},"required":["id","title","status","recipientName","recipientEmail","completedAt","delivery"],"additionalProperties":false}}},"required":["object","id","title","templateId","createdAt","progress","documents"],"additionalProperties":false},"Webhook":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"isActive":{"type":"boolean"},"disabledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},{"type":"null"}]},"disabledReason":{"type":["string","null"]},"lastDeliveryAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},{"type":"null"}]},"lastStatus":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"}},"required":["id","url","events","isActive","disabledAt","disabledReason","lastDeliveryAt","lastStatus","createdAt"],"additionalProperties":false},"WebhookList":{"type":"object","properties":{"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}},"required":["webhooks"],"additionalProperties":false},"WebhookCreated":{"type":"object","properties":{"webhook":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"isActive":{"type":"boolean"},"disabledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},{"type":"null"}]},"disabledReason":{"type":["string","null"]},"lastDeliveryAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},{"type":"null"}]},"lastStatus":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp, UTC"},"secret":{"type":"string","description":"Shown once."}},"required":["id","url","events","isActive","disabledAt","disabledReason","lastDeliveryAt","lastStatus","createdAt","secret"],"additionalProperties":false}},"required":["webhook"],"additionalProperties":false},"Error":{"type":"object","properties":{"error":{"type":"string","description":"Kept for integrations written before `code`; branch on `code`."},"code":{"type":"string","description":"Stable, UPPER_SNAKE: what to branch on."},"message":{"type":"string","description":"For a person. English unless Accept-Language asks for he or ar."},"details":{"description":"Which field, which signer, which limit — when there is one."},"requestId":{"type":"string","description":"The x-request-id response header. Quote it to support."}},"required":["error","code","message","requestId"],"additionalProperties":{}},"DocumentStatus":{"type":"string","enum":["DRAFT","SENT","VIEWED","PARTIALLY_SIGNED","COMPLETED","VOIDED","EXPIRED","DECLINED"]},"RecipientType":{"type":"string","enum":["SIGNER","VIEWER","APPROVER"]},"RecipientStatus":{"type":"string","enum":["PENDING","SENT","VIEWED","SIGNED","DECLINED"]},"DeliveryMethod":{"type":"string","enum":["EMAIL","SMS","BOTH","LINK"],"description":"How the invitation reaches the recipient: EMAIL, or LINK (nothing is sent; you share the signing link). SMS and BOTH appear only on documents sent by text message in the past."},"CreateDocumentRequest":{"type":"object","properties":{"files":{"description":"Ordered envelope sources (2–10, at most 25 MB total). PUT each file to its uploads URL, then confirm once. Omit for the existing single-file flow.","minItems":2,"maxItems":10,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"fileName":{"type":"string","minLength":1,"maxLength":255},"sourceFormat":{"default":"pdf","type":"string","enum":["pdf","docx"]},"sizeBytes":{"type":"integer","exclusiveMinimum":0,"maximum":26214400}},"required":["name","fileName","sizeBytes"]}},"title":{"type":"string","minLength":1,"maxLength":255},"sourceFormat":{"default":"pdf","type":"string","enum":["pdf","docx"]},"sizeBytes":{"description":"The exact byte length of the file (at most 25 MB). When given, storage refuses any other size.","type":"integer","exclusiveMinimum":0,"maximum":26214400}},"required":["title"]},"ConfirmDocumentRequest":{"type":"object","properties":{"fileName":{"type":"string","minLength":1,"maxLength":255},"fileSize":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["fileName","fileSize"]},"PrepareDocumentRequest":{"type":"object","properties":{"applyTextTags":{"description":"Opt in to placing and visually masking explicit text tags in the confirmed PDF (also converted DOCX). Default false.","type":"boolean"},"textTagRecipients":{"description":"Canonical tag role to zero-based recipients index, e.g. buyer: 0. Numbered tags use 1-based recipients order. Unmapped named roles must match a recipient name; otherwise prepare refuses.","type":"object","propertyNames":{"type":"string","maxLength":200},"additionalProperties":{"type":"integer","minimum":0,"maximum":24}},"recipients":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","maxLength":100},"type":{"default":"SIGNER","type":"string","enum":["SIGNER","VIEWER","APPROVER"]},"deliveryMethod":{"description":"EMAIL (default when an email is given) or LINK (nothing is sent; share the signing link yourself). SMS and BOTH are still accepted from older integrations and are read as EMAIL when an email is given, otherwise LINK: LoqSign sends nothing by text message.","type":"string","enum":["EMAIL","SMS","BOTH","LINK"]}},"required":["name"]}},"fields":{"default":[],"maxItems":500,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["SIGNATURE","INITIALS","TEXT","DATE","CHECKBOX","DROPDOWN","NAME","EMAIL","COMPANY","TITLE","RADIO","NUMBER","ID_NUMBER","DATE_SIGNED"]},"recipientIndex":{"type":"integer","minimum":-1,"maximum":9007199254740991,"description":"Index into recipients. -1 places a field on the sender."},"pageNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"One-based page in the combined PDF. For an envelope file, use files[].startPage + the file-local page - 1."},"x":{"type":"number","minimum":0,"maximum":100,"description":"Percent of the page width."},"y":{"type":"number","minimum":0,"maximum":100,"description":"Percent of the page height."},"width":{"type":"number","minimum":0,"maximum":100},"height":{"type":"number","minimum":0,"maximum":100},"required":{"default":true,"type":"boolean"},"label":{"type":"string","maxLength":255},"placeholder":{"type":"string","maxLength":200},"defaultValue":{"type":"string","maxLength":2000},"options":{"description":"DROPDOWN and RADIO: the choices offered.","maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"validation":{"type":"object","properties":{"pattern":{"description":"TEXT only: the answer must be an email, a phone number, a number or an Israeli ID.","type":"string","enum":["email","phone","number","israeliId"]},"min":{"description":"NUMBER (or TEXT with pattern number): the lowest value allowed.","type":"number"},"max":{"description":"NUMBER (or TEXT with pattern number): the highest value allowed.","type":"number"},"decimals":{"description":"NUMBER: decimal places allowed.","type":"integer","minimum":0,"maximum":10},"dateFormat":{"description":"DATE / DATE_SIGNED: how the date is printed, e.g. dd/MM/yyyy.","type":"string","maxLength":20}}}},"required":["type","recipientIndex","pageNumber","x","y","width","height"]}},"signingOrder":{"type":"string","enum":["SEQUENTIAL","PARALLEL"]},"message":{"type":"string","maxLength":2000}},"required":["recipients"]},"SendDocumentRequest":{"type":"object","properties":{"subject":{"type":"string","maxLength":200},"message":{"type":"string","maxLength":2000},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"requireAccessPin":{"type":"boolean"},"requireSmsOtp":{"description":"Every recipient must enter a one-time code before opening the document. The code is emailed, so every recipient needs an email address.","type":"boolean"}}},"VoidDocumentRequest":{"type":"object","properties":{"reason":{"type":"string","maxLength":1000}}},"RemindDocumentRequest":{"type":"object","properties":{"recipientIds":{"description":"Default: everyone whose turn it is and who has not acted.","maxItems":25,"type":"array","items":{"type":"string","minLength":1,"maxLength":128}}}},"CreateEmbeddedSessionRequest":{"type":"object","properties":{"returnUrl":{"description":"Where the page sends a top-level (not framed) signer when they finish, with ?event=signed|declined|closed. Must be on a verified origin.","anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"locale":{"description":"The page's language, when the recipient has none of their own.","type":"string","enum":["en","he","ar","ru","fr","es","de","pt","it","tr","pl","uk","fa","ur"]},"signerAuthentication":{"type":"object","properties":{"method":{"type":"string","enum":["PASSWORD","SSO","MFA","MAGIC_LINK","OTHER"],"description":"How you signed the signer in. Recorded in the audit trail and on the certificate."},"reference":{"description":"Your own id for the signer, for the evidence.","type":"string","maxLength":200}},"required":["method"]}}},"CreateFromTemplateRequest":{"type":"object","properties":{"title":{"description":"Default: the template's name.","type":"string","minLength":1,"maxLength":500},"recipients":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"object","properties":{"role":{"description":"The role, by id or by name (case-insensitive).","type":"string","minLength":1,"maxLength":200},"roleId":{"description":"Same as role, by id only.","type":"string","minLength":1,"maxLength":128},"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","maxLength":100},"deliveryMethod":{"description":"EMAIL (default when an email is given) or LINK (nothing is sent; share the signing link yourself). SMS and BOTH are still accepted from older integrations and are read as EMAIL when an email is given, otherwise LINK: LoqSign sends nothing by text message.","type":"string","enum":["EMAIL","SMS","BOTH","LINK"]}},"required":["name"]}},"prefill":{"description":"Values by merge field key (or field id), from GET /templates/{id}.","type":"object","propertyNames":{"type":"string","maxLength":128},"additionalProperties":{"type":"string","maxLength":2000}},"send":{"default":false,"description":"true sends at once; false (default) leaves a draft to send later.","type":"boolean"},"message":{"type":"string","maxLength":2000},"expiresInDays":{"type":"integer","minimum":1,"maximum":365},"remindEveryDays":{"type":"integer","minimum":1,"maximum":30},"requireAccessPin":{"type":"boolean"}},"required":["recipients"]},"BulkSendRequest":{"type":"object","properties":{"templateId":{"type":"string","minLength":1,"maxLength":128},"recipientSets":{"minItems":1,"maxItems":200,"type":"array","items":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","minLength":1,"maxLength":200},"roleId":{"type":"string","minLength":1,"maxLength":128},"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","maxLength":100}},"required":["name","email"]}},"description":"One set per document: every role of the template, once."},"message":{"type":"string","maxLength":2000},"expiresInDays":{"default":30,"type":"integer","minimum":1,"maximum":365},"remindEveryDays":{"type":"integer","minimum":1,"maximum":30},"requireSmsOtp":{"description":"Every recipient must enter a one-time code before opening the document. The code is emailed, so every recipient needs an email address.","type":"boolean"}},"required":["templateId","recipientSets"]},"CreateContactRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","maxLength":100},"company":{"type":"string","maxLength":255},"title":{"type":"string","maxLength":255},"notes":{"type":"string","maxLength":10000},"tags":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":100}}},"required":["name","email"]},"UpdateContactRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"company":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"tags":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":100}}}},"CreateWebhookRequest":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"minItems":1,"type":"array","items":{"type":"string","enum":["DOCUMENT_SENT","DOCUMENT_VIEWED","DOCUMENT_SIGNED","DOCUMENT_COMPLETED","DOCUMENT_VOIDED","DOCUMENT_EXPIRED","RECIPIENT_SIGNED","RECIPIENT_DECLINED","recipient.question_asked","document.key_date_upcoming"]}}},"required":["url","events"]}}}}