{"openapi":"3.1.0","info":{"title":"SignLayer API","version":"0.1.0","description":"API-first EU electronic-signing infrastructure for applications and agents. Version 1 supports simple electronic signatures; it does not claim QES or qualified trust-service status."},"servers":[{"url":"https://app.signlayer.eu/api/v1","description":"Production"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Documents"},{"name":"Signing requests"},{"name":"Signer sessions"},{"name":"Webhooks"},{"name":"Usage"},{"name":"Branding"},{"name":"Workspace setup"}],"paths":{"/health":{"get":{"operationId":"getHealth","security":[],"responses":{"200":{"description":"Healthy, or intentionally idle with database not checked"}}}},"/documents":{"post":{"tags":["Documents"],"operationId":"createDocument","summary":"Create a presigned PDF upload","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocument"}}}},"responses":{"201":{"description":"Upload created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUpload"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}},"get":{"tags":["Documents"],"operationId":"listDocuments","parameters":[{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"Documents"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}}},"/documents/{id}":{"get":{"tags":["Documents"],"operationId":"getDocument","parameters":[{"$ref":"#/components/parameters/ResourceId"},{"name":"kind","in":"query","schema":{"enum":["source"]}}],"responses":{"200":{"description":"Document"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}}},"/documents/{id}/finalize":{"post":{"tags":["Documents"],"operationId":"finalizeDocument","summary":"Verify an uploaded PDF","parameters":[{"$ref":"#/components/parameters/ResourceId"}],"responses":{"200":{"description":"Document verified"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}}},"/signing_requests":{"post":{"tags":["Signing requests"],"operationId":"createSigningRequest","summary":"Create a draft signing request","description":"Creation is side-effect free: it does not send email and does not create billable usage.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSigningRequest"}}}},"responses":{"201":{"description":"Signing request created"},"400":{"description":"Invalid request. An expires_at more than 90 days after creation returns type urn:signlayer:problem:expiry-too-far with max_expiry_days and max_expires_at; an expires_at that is not in the future returns title Invalid expiry with type about:blank. Nothing is created and the Idempotency-Key can be reused with a corrected body. With field_placement=anchors, a PDF anchor problem has title Invalid PDF anchors and anchor_reason, plus anchor_page and anchor_marker where known; see the anchors guide.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AnchorProblem"}}}},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}},"get":{"tags":["Signing requests"],"operationId":"listSigningRequests","parameters":[{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"Signing requests, newest first","content":{"application/json":{"schema":{"type":"object","required":["data","has_more","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SigningRequestSummary"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"format":"date-time"}}}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}}},"/signing_requests/{id}":{"get":{"tags":["Signing requests"],"operationId":"getSigningRequest","description":"Poll this resource for progress. After the last signer signs, status stays partially_signed while finalization_status is processing; status becomes completed only when the signed PDF and evidence are durably stored.","parameters":[{"$ref":"#/components/parameters/ResourceId"}],"responses":{"200":{"description":"Signing request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SigningRequest"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}}},"/signing_requests/{id}/download":{"get":{"tags":["Signing requests"],"operationId":"downloadSigningRequest","summary":"Download the source or request-specific completed PDF/evidence","description":"Requires documents:read and signing_requests:read. Results require completed state and return 409 while finalization_status is processing; ambiguous legacy results fail closed. Sandbox (test-mode) completed and evidence PDFs carry a visible SANDBOX watermark on every page; completed_sha256 is the digest of the watermarked file.","parameters":[{"$ref":"#/components/parameters/ResourceId"},{"name":"kind","in":"query","schema":{"type":"string","enum":["source","completed","evidence"],"default":"completed"}}],"responses":{"200":{"description":"Short-lived version-pinned download URL"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}}},"/signing_requests/{id}/send":{"post":{"tags":["Signing requests"],"operationId":"sendSigningRequest","summary":"Queue signer invitations","description":"Sending is an explicit external side effect. Each sent live request creates one billable signature request, regardless of its later outcome.","parameters":[{"$ref":"#/components/parameters/ResourceId"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":255}}],"responses":{"202":{"description":"Send queued"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}}},"/signing_requests/{id}/remind":{"post":{"tags":["Signing requests"],"operationId":"remindSigningRequest","summary":"Send a reminder to signers who have not finished","description":"For requests explicitly created with signing_order=ordered, emails only pending or viewed signers whose lower-order predecessors have signed. Parallel and legacy requests retain parallel reminders. Only sent, viewed and partially signed requests can be reminded. Signers whose e-mail delivery status is complained, suppressed, failed or a permanent bounce are not mailed and are listed in skipped. In sandbox, signers who are not verified members of the workspace are not mailed either and are listed with reason withheld. When every signer is skipped the call still returns 200 with reminded 0.","parameters":[{"$ref":"#/components/parameters/ResourceId"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":255}}],"responses":{"200":{"description":"Reminders queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemindResult"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}}},"/signing_requests/{id}/cancel":{"post":{"tags":["Signing requests"],"operationId":"cancelSigningRequest","summary":"Cancel an active signing request","description":"Cancellation is explicit and idempotent. Completed, declined and expired requests remain terminal. Once every signer has signed (finalization_status processing or failed) cancellation returns 409: the signatures stand.","parameters":[{"$ref":"#/components/parameters/ResourceId"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":255}}],"responses":{"200":{"description":"Request cancelled"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}}},"/signing_requests/{id}/audit":{"get":{"tags":["Signing requests"],"operationId":"getAuditTrail","parameters":[{"$ref":"#/components/parameters/ResourceId"}],"responses":{"200":{"description":"Chained audit events"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}}},"/signer/{token}":{"get":{"tags":["Signer sessions"],"security":[],"operationId":"getSignerSession","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Signer session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignerSession"}}}},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/SignerTerminal"},"410":{"$ref":"#/components/responses/SignerTerminal"},"429":{"$ref":"#/components/responses/Problem"}}},"post":{"tags":["Signer sessions"],"security":[],"operationId":"submitSignerAction","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/SignAction"},{"$ref":"#/components/schemas/DeclineAction"}]}}}},"responses":{"200":{"description":"Signer action recorded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignerActionResult"}}}},"400":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"description":"The signing link cannot be used (terminal_reason), or the stored source no longer matches its digest (type urn:signlayer:problem:document-source-changed; contact the sender).","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/SignerTerminalProblem"},{"$ref":"#/components/schemas/DocumentProofProblem"}]}}}},"410":{"$ref":"#/components/responses/SignerTerminal"},"422":{"description":"A signature_name with characters that cannot be drawn on the signed document (urn:signlayer:problem:signature-name-unsupported, checked first), or a sign action without document_proof (urn:signlayer:problem:document-proof-required) or with a wrong or malformed one (urn:signlayer:problem:document-proof-invalid). Nothing is recorded.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/SignatureNameProblem"},{"$ref":"#/components/schemas/DocumentProofProblem"}]}}}},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"The document could not be checked right now (urn:signlayer:problem:document-proof-unavailable). Nothing is recorded; retry after Retry-After seconds with the same proof.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/DocumentProofProblem"}}}}}}},"/webhook_endpoints":{"post":{"tags":["Webhooks"],"operationId":"createWebhookEndpoint","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookEndpoint"}}}},"responses":{"201":{"description":"Endpoint created; secret is returned once"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}},"get":{"tags":["Webhooks"],"operationId":"listWebhookEndpoints","responses":{"200":{"description":"Webhook endpoints"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}}},"/webhook_endpoints/{id}":{"delete":{"tags":["Webhooks"],"operationId":"disableWebhookEndpoint","parameters":[{"$ref":"#/components/parameters/ResourceId"}],"responses":{"204":{"description":"Endpoint disabled"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}}},"/webhook_endpoints/{id}/rotate_secret":{"post":{"tags":["Webhooks"],"operationId":"rotateWebhookSecret","summary":"Replace the signing secret","description":"Returns the new secret once. Deliveries are signed with it immediately.","parameters":[{"$ref":"#/components/parameters/ResourceId"}],"responses":{"200":{"description":"New signing secret"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}}},"/webhook_deliveries/{id}/redeliver":{"post":{"tags":["Webhooks"],"operationId":"redeliverWebhook","summary":"Explicitly resend an event","description":"Preserves original event/body and uses the current endpoint secret at execution. Native opted-in workspaces receive durable 202 acceptance, NOT a delivery acknowledgement. Poll /webhook_redeliveries/{id}. Reuse the same Idempotency-Key after an unconfirmed response; a new key explicitly authorizes a new replay. Legacy workspaces retain synchronous 200. Receivers deduplicate the stable event ID (including deliberate replays).","parameters":[{"$ref":"#/components/parameters/ResourceId"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":255}}],"responses":{"200":{"description":"Legacy delivery attempt"},"202":{"description":"Durable redelivery accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRedelivery"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}}},"/webhook_redeliveries/{id}":{"get":{"tags":["Webhooks"],"operationId":"getWebhookRedelivery","summary":"Read durable redelivery status","parameters":[{"$ref":"#/components/parameters/ResourceId"}],"responses":{"200":{"description":"Redelivery status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRedelivery"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}}},"/branding":{"get":{"tags":["Branding"],"operationId":"getBranding","summary":"Read the workspace branding","description":"One live branding per workspace, shared by test and live. Requires branding:read (granted by *).","responses":{"200":{"description":"Workspace branding","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Branding"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}},"put":{"tags":["Branding"],"operationId":"updateBranding","summary":"Change the workspace branding","description":"Requires a live key that explicitly lists branding:write (never granted by *), issued by a workspace admin. Changes apply to open requests and later mail.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBranding"}}}},"responses":{"200":{"description":"Updated branding","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Branding"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}}},"/usage":{"get":{"tags":["Usage"],"operationId":"getUsage","responses":{"200":{"description":"Current-month usage"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}}},"/device_authorizations":{"post":{"tags":["Agent onboarding"],"security":[],"operationId":"startDeviceAuthorization","summary":"Start browser-approved sandbox onboarding","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartDeviceAuthorization"}}}},"responses":{"201":{"description":"Approval code created"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}}},"/device_authorizations/token":{"post":{"tags":["Agent onboarding"],"security":[],"operationId":"exchangeDeviceAuthorization","summary":"Poll and exchange an approved device code exactly once","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["device_code"],"properties":{"device_code":{"type":"string","pattern":"^sl_device_"}}}}}},"responses":{"200":{"description":"Sandbox key returned once"},"202":{"description":"Authorization pending"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"410":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}}},"/workspaces":{"get":{"tags":["Workspace setup"],"security":[{"sessionCookie":[]}],"operationId":"listWorkspaces","responses":{"200":{"description":"Workspaces"}}},"post":{"tags":["Workspace setup"],"security":[{"sessionCookie":[]}],"operationId":"createWorkspace","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","slug"],"properties":{"name":{"type":"string"},"slug":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}}}}}},"responses":{"201":{"description":"Workspace created"}}}},"/workspaces/{id}/team":{"get":{"security":[{"sessionCookie":[]}],"operationId":"getWorkspaceTeam","parameters":[{"$ref":"#/components/parameters/ResourceId"}],"responses":{"200":{"description":"Admin-only membership and invitation metadata"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}},"post":{"security":[{"sessionCookie":[]}],"operationId":"inviteWorkspaceMember","description":"Requires a workspace admin with a verified e-mail address; an unverified inviter gets 403 with `email_verification_required: true`. Limited to 20 invitations per account per hour, 50 per account per day and 50 per workspace per day; over a limit the response is 429 with `Retry-After`.","parameters":[{"$ref":"#/components/parameters/ResourceId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","role"],"properties":{"email":{"type":"string","format":"email"},"role":{"enum":["admin","developer","finance"]}}}}}},"responses":{"201":{"description":"Invitation queued"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}},"patch":{"security":[{"sessionCookie":[]}],"operationId":"changeWorkspaceMemberRole","parameters":[{"$ref":"#/components/parameters/ResourceId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["user_id","role"],"properties":{"user_id":{"type":"string"},"role":{"enum":["admin","developer","finance"]}}}}}},"responses":{"200":{"description":"Role changed and member-issued keys revoked; final admin protected"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}},"delete":{"security":[{"sessionCookie":[]}],"operationId":"removeWorkspaceMember","parameters":[{"$ref":"#/components/parameters/ResourceId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["user_id"],"properties":{"user_id":{"type":"string"}}}}}},"responses":{"200":{"description":"Membership removed and member-issued keys revoked; final admin protected"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}}},"/billing/payment_methods":{"get":{"security":[{"sessionCookie":[]}],"operationId":"listPaymentMethods","parameters":[{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Admin/Finance verified card metadata","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BillingPaymentMethod"}}}}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}},"post":{"security":[{"sessionCookie":[]}],"operationId":"setupPaymentMethod","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["workspace_id"],"properties":{"workspace_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Stripe setup Checkout URL"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}},"patch":{"security":[{"sessionCookie":[]}],"operationId":"setDefaultPaymentMethod","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["workspace_id","payment_method_id"],"properties":{"workspace_id":{"type":"string","format":"uuid"},"payment_method_id":{"type":"string","pattern":"^pm_[A-Za-z0-9]+$"}}}}}},"responses":{"200":{"description":"Stripe-verified usable workspace card made primary"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}},"delete":{"security":[{"sessionCookie":[]}],"operationId":"removePaymentMethod","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["workspace_id","payment_method_id"],"properties":{"workspace_id":{"type":"string","format":"uuid"},"payment_method_id":{"type":"string","pattern":"^pm_[A-Za-z0-9]+$"}}}}}},"responses":{"200":{"description":"Removed after a Stripe-verified usable replacement is made primary; last verified card protected"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and retry_after_seconds. For billing synchronization or reconciliation, wait or contact the operator instead of creating another subscription.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before retrying; re-use the original operation identity.","schema":{"type":"integer","minimum":1}}}}}}},"/api_keys":{"get":{"tags":["Workspace setup"],"security":[{"sessionCookie":[]}],"operationId":"listApiKeys","parameters":[{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"API key metadata"}}},"post":{"tags":["Workspace setup"],"security":[{"sessionCookie":[]}],"operationId":"createApiKey","description":"Requires a valid session and current technical-write permission. Sandbox keys require no additional authentication freshness; live keys require authentication less than 30 minutes old, a confirmed account e-mail address and active billing. An unconfirmed address gets 403 with email_verification_required: true, before billing is checked. The environment selects both the policy and the issued key environment. Privileged scopes retain their admin checks.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["workspace_id","name","environment"],"properties":{"workspace_id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":80},"environment":{"type":"string","enum":["test","live"]},"scopes":{"type":"array","maxItems":30,"default":["*"],"items":{"type":"string","minLength":1}}}}}}},"responses":{"201":{"description":"API key created; secret is returned once"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and Retry-After before explicitly retrying; never automatically replay a denied key mutation.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before an explicit retry.","schema":{"type":"integer","minimum":1}}}}}}},"/api_keys/{id}":{"delete":{"tags":["Workspace setup"],"security":[{"sessionCookie":[]}],"operationId":"revokeApiKey","description":"Requires a valid session and current technical-write permission. The stored key environment selects freshness: none beyond the normal session for sandbox; less than 30 minutes for live. Caller-supplied environment cannot downgrade this policy.","parameters":[{"$ref":"#/components/parameters/ResourceId"}],"responses":{"204":{"description":"API key revoked"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and Retry-After before explicitly retrying; never automatically replay a denied key mutation.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before an explicit retry.","schema":{"type":"integer","minimum":1}}}}}}},"/api_keys/{id}/rotate":{"post":{"tags":["Workspace setup"],"security":[{"sessionCookie":[]}],"operationId":"rotateApiKey","summary":"Replace and revoke an API key","description":"Requires a valid session and current technical-write permission. The stored key environment selects freshness: none beyond the normal session for sandbox; less than 30 minutes, a confirmed account e-mail address (otherwise 403 with email_verification_required: true) and active billing for live. Caller-supplied environment cannot downgrade this policy. Privileged scopes retain their admin checks.","parameters":[{"$ref":"#/components/parameters/ResourceId"}],"responses":{"201":{"description":"Replacement key created; new secret is returned once and the old key is revoked"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"description":"Temporarily unavailable. Inspect the problem type and Retry-After before explicitly retrying; never automatically replay a denied key mutation.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"Retry-After":{"description":"Minimum delay before an explicit retry.","schema":{"type":"integer","minimum":1}}}}}}}},"webhooks":{"statusEvent":{"post":{"tags":["Webhooks"],"operationId":"receiveStatusEvent","summary":"One committed signing request or signer status transition","description":"Sent to each enabled endpoint subscribed to the event type (or *). Delivery is at least once and unordered: deduplicate on id (also stable across retries and redeliveries) and order by data.status semantics, not arrival. Verify x-signlayer-signature (v1=HMAC-SHA256 over `${x-signlayer-timestamp}.${raw body}`) before parsing; reject timestamps older than 300 seconds. Only committed transitions publish: denied actions, rollbacks and idempotent replays publish nothing. A signer transition that also changes the request publishes both events. signing_request.expired is published when the expiry sweep persists the deadline. The sweep is scheduled every five minutes in warm runtime mode; public list and detail endpoints return stored status and can remain open until the sweep commits. A request whose signers all signed before the deadline completes instead of expiring.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"2XX":{"description":"Received. Any other response or a timeout is retried with the same event id."}}}},"emailDeliveryEvent":{"post":{"tags":["Webhooks"],"operationId":"receiveEmailDeliveryEvent","summary":"A signer e-mail could not be delivered, or was reported as spam","description":"signer.email_undeliverable: a permanent bounce, a provider failure, or an address on the provider's suppression list. signer.email_complained: the signer reported the e-mail as spam. Sent at most once per provider event, only while the signer has not signed or declined; the signer's status does not change. Same delivery, signature and retry rules as status events. Endpoints subscribed to * receive these types too: ignore types you do not know.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDeliveryWebhook"}}}},"responses":{"2XX":{"description":"Received. Any other response or a timeout is retried with the same event id."}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"SignLayer API key"},"sessionCookie":{"type":"apiKey","in":"cookie","name":"better-auth.session_token"}},"parameters":{"ResourceId":{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},"Cursor":{"name":"cursor","in":"query","schema":{"type":"string","format":"date-time"}},"Limit":{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}},"responses":{"Problem":{"description":"RFC 9457 problem response","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"SignerTerminal":{"description":"The signing link cannot be used; terminal_reason selects what the signer is shown","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SignerTerminalProblem"}}}}},"schemas":{"WebhookRedelivery":{"type":"object","required":["id","object","status","delivery_id","job_id","trace_id","created_at"],"properties":{"id":{"type":"string","format":"uuid"},"object":{"type":"string","const":"webhook_redelivery"},"status":{"type":"string","enum":["pending","running","completed","failed","cancelled","needs_reconciliation"]},"delivery_id":{"type":"string","format":"uuid"},"job_id":{"type":"string","format":"uuid"},"trace_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"processing_attempts":{"type":"integer","minimum":0,"description":"Executions of this new replay, not the original delivery's budget."}}},"Branding":{"type":"object","required":["display_name","sender_name","brand_color","contact_email","email","logo","updated_at"],"properties":{"display_name":{"type":"string","description":"Sender name shown to signers: sender_name, or the workspace name when unset."},"sender_name":{"type":["string","null"],"maxLength":80},"brand_color":{"type":"string","pattern":"^#[0-9A-F]{6}$"},"contact_email":{"type":["string","null"],"format":"email"},"email":{"type":"object","required":["header_color","footer_background","footer_text_color","footer_text"],"properties":{"header_color":{"type":"string"},"footer_background":{"type":"string"},"footer_text_color":{"type":"string"},"footer_text":{"type":["string","null"],"maxLength":300}}},"logo":{"type":["object","null"],"required":["url","sha256","content_type","width","height"],"properties":{"url":{"type":"string","format":"uri"},"sha256":{"type":"string"},"content_type":{"type":"string","enum":["image/png","image/jpeg"]},"width":{"type":"integer"},"height":{"type":"integer"}}},"updated_at":{"type":"string","format":"date-time","description":"Send back as expected_updated_at to avoid overwriting someone else's change."}}},"UpdateBranding":{"type":"object","additionalProperties":false,"properties":{"sender_name":{"type":["string","null"],"maxLength":80,"description":"Empty or null uses the workspace name."},"brand_color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},"contact_email":{"type":["string","null"],"format":"email"},"email":{"type":"object","additionalProperties":false,"properties":{"header_color":{"type":"string"},"footer_background":{"type":"string"},"footer_text_color":{"type":"string"},"footer_text":{"type":["string","null"],"maxLength":300}}},"logo_base64":{"type":["string","null"],"description":"PNG or JPG logo (max 1 MB, 16-4096 px per side) as base64; null removes the logo. Limited to 10 uploads per minute."},"expected_updated_at":{"type":"string","format":"date-time","description":"The updated_at you loaded. If the branding changed since, the update is refused with 409 and nothing changes."}}},"SignerTerminalProblem":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"terminal_reason":{"type":"string","enum":["expired","revoked","declined","already_signed","workspace_closed","not_sent","not_your_turn"],"description":"Why the session cannot be used now. not_your_turn is temporary and may be retried; it does not invalidate the link. Clients choose the result screen from this value."},"environment":{"type":"string","enum":["test","live"]},"sender":{"type":"object","properties":{"workspace_name":{"type":"string","description":"The workspace's own name. Show branding.display_name to signers."}}},"branding":{"type":"object","properties":{"display_name":{"type":"string"},"brand_color":{"type":"string"},"contact_email":{"type":["string","null"]},"logo_url":{"type":["string","null"],"description":"Path of the sender logo under /brand-assets."}}},"declined_by_you":{"type":"boolean","description":"For terminal_reason declined: true when this signer declined, false when another signer did."},"decline_reason":{"type":["string","null"],"description":"Only for the signer who declined: the reason they submitted."}}}]},"SignerSession":{"type":"object","required":["signing_request","signer","document","consent_text"],"properties":{"signing_request":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"subject":{"type":"string"},"message":{"type":["string","null"]},"status":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"language":{"type":"string","enum":["en","nl"]},"environment":{"type":"string","enum":["test","live"]}}},"sender":{"type":"object","properties":{"workspace_name":{"type":"string","description":"The workspace's own name. Show branding.display_name to signers."}}},"branding":{"type":"object","properties":{"display_name":{"type":"string"},"brand_color":{"type":"string"},"contact_email":{"type":["string","null"]},"logo_url":{"type":["string","null"],"description":"Path of the sender logo under /brand-assets."}}},"signer":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string"},"status":{"type":"string","enum":["pending","viewed","signed","declined"]}}},"document":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"filename":{"type":"string"},"url":{"type":"string"},"sha256":{"type":"string"},"proof_key":{"type":"string","description":"Key for the document possession proof. Use it exactly as given: document_proof = lowercase hex HMAC-SHA256(key = UTF-8 bytes of proof_key, message = the downloaded PDF bytes)."}}},"fields":{"type":"array","items":{"type":"object"}},"consent_text":{"type":"string"},"consent_version":{"type":"string"}}},"SignerActionResult":{"type":"object","required":["signing_request_id","signer_id","status"],"properties":{"signing_request_id":{"type":"string","format":"uuid"},"signer_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["signed","declined"]},"request_status":{"type":"string"},"reason":{"type":["string","null"],"description":"Stored decline reason (decline only)."}}},"BillingPaymentMethod":{"type":"object","required":["id","brand","last4","exp_month","exp_year","active","verified","verification_status","primary","removable"],"properties":{"id":{"type":"string"},"brand":{"type":"string"},"last4":{"type":"string"},"exp_month":{"type":"integer"},"exp_year":{"type":"integer"},"active":{"type":"boolean"},"verified":{"type":"boolean"},"verification_status":{"type":"string","enum":["verified","verification_required","expired"]},"primary":{"type":"boolean"},"removable":{"type":"boolean"}}},"Problem":{"type":"object","required":["type","title","status"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"reauthentication_max_age_seconds":{"type":"integer","enum":[300,1800],"description":"Presentation-only hint on Reauthentication required problems. Complete same-account authentication, then explicitly retry; the server rechecks policy and permission. Never automatically replay a denied mutation."},"payment_reason":{"type":"string","enum":["verification_required","payment_required"]},"billing_sync_state":{"type":"string","enum":["pending","reconciliation_required"]},"retry_after_seconds":{"type":"integer","minimum":1,"maximum":3600},"max_expiry_days":{"type":"integer","minimum":1,"description":"On urn:signlayer:problem:expiry-too-far: the maximum number of days between creation and expires_at."},"max_expires_at":{"type":"string","format":"date-time","description":"On urn:signlayer:problem:expiry-too-far: the latest expires_at this request could have used."},"email_verification_required":{"type":"boolean","description":"Present (true) when the action needs a confirmed account e-mail address. Open the verification link while signed in to that account, then retry."}}},"CreateDocument":{"type":"object","additionalProperties":false,"required":["filename","byte_size","sha256"],"properties":{"filename":{"type":"string","pattern":"\\.pdf$"},"byte_size":{"type":"integer","maximum":26214400},"sha256":{"type":"string","pattern":"^[a-fA-F0-9]{64}$"}}},"DocumentUpload":{"type":"object","required":["id","status","upload"],"properties":{"id":{"type":"string","format":"uuid"},"status":{"const":"awaiting_upload"},"upload":{"type":"object","required":["url","method","headers","expires_in"],"properties":{"url":{"type":"string","format":"uri","description":"Presigned storage URL. Send it no API key."},"method":{"const":"PUT"},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Send every returned header unchanged with the PUT, including x-amz-server-side-encryption: AES256; storage rejects the upload otherwise."},"expires_in":{"type":"integer","minimum":1,"description":"Seconds until the presigned URL expires."}}}}},"SignatureField":{"type":"object","additionalProperties":false,"required":["page","type","x","y","width","height"],"properties":{"page":{"type":"integer","minimum":1},"type":{"const":"signature"},"x":{"type":"integer","minimum":0},"y":{"type":"integer","minimum":0},"width":{"type":"integer","minimum":80},"height":{"type":"integer","minimum":30},"required":{"type":"boolean","default":true}}},"FinalizationStatus":{"type":"string","enum":["not_started","processing","completed","failed","not_applicable"],"description":"Progress of producing the signed PDF and evidence. not_started: signatures are outstanding; processing: every signer signed and the result is being finalized; completed: the request is completed and results can be downloaded; failed: finalization stopped and needs operator reconciliation, signatures and audit trail are kept; not_applicable: declined, cancelled or expired before every signer signed."},"SigningRequestSummary":{"type":"object","required":["id","object","status","finalization_status","signing_order","subject","created_at"],"properties":{"id":{"type":"string","format":"uuid"},"object":{"const":"signing_request"},"status":{"type":"string","enum":["draft","sent","viewed","partially_signed","completed","declined","cancelled","expired"]},"finalization_status":{"$ref":"#/components/schemas/FinalizationStatus"},"source":{"type":"string","description":"Interface that created the request: api, cli, mcp or dashboard. Open string; new values may appear."},"document_id":{"type":"string","format":"uuid"},"signing_order":{"type":"string","enum":["parallel","ordered"]},"subject":{"type":"string"},"language":{"type":"string","enum":["en","nl"]},"expires_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"SigningRequest":{"allOf":[{"$ref":"#/components/schemas/SigningRequestSummary"},{"type":"object","required":["signers"],"properties":{"message":{"type":["string","null"]},"sent_at":{"type":["string","null"],"format":"date-time"},"signers":{"type":"array","items":{"type":"object","required":["id","email","name","order","status"],"properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"name":{"type":"string"},"order":{"type":"integer"},"status":{"type":"string","enum":["pending","viewed","signed","declined"]},"signed_at":{"type":["string","null"],"format":"date-time"},"email_delivery":{"$ref":"#/components/schemas/EmailDelivery"}}}}}}]},"CreateSigningRequest":{"type":"object","additionalProperties":false,"required":["document_id","subject","signers"],"properties":{"document_id":{"type":"string","format":"uuid"},"subject":{"type":"string"},"message":{"type":"string"},"language":{"type":"string","enum":["en","nl"],"description":"Language for the hosted signer session, consent and invitation. Omitted language preserves legacy English behavior."},"signing_order":{"type":"string","enum":["parallel","ordered"],"description":"Opt into ordered signing explicitly. Ordered requests invite lower order groups first; equal orders remain parallel. Omission preserves parallel behavior for existing clients."},"field_placement":{"type":"string","enum":["coordinates","anchors"],"default":"coordinates","description":"Coordinates require fields on every signer; anchors infer fields from standalone {{signerN}} text, indexed by input order."},"expires_at":{"type":"string","format":"date-time","description":"When the request and its signer links expire. Defaults to 7 days after creation. Must be in the future and at most 90 days after creation (server time, inclusive); later values return 400 urn:signlayer:problem:expiry-too-far. Expiry cannot be extended after creation."},"signers":{"type":"array","minItems":1,"items":{"type":"object","required":["email","name"],"properties":{"email":{"type":"string","format":"email"},"name":{"type":"string"},"order":{"type":"integer","minimum":0,"default":0,"description":"With signing_order=ordered, lower order groups sign first and equal orders sign in parallel. Without ordered mode, this value does not restrict signing. Anchor indices follow input order."},"fields":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/SignatureField"}}}}}}},"SignAction":{"type":"object","required":["action","consent","signature_name","document_proof"],"properties":{"action":{"const":"sign"},"consent":{"const":true},"signature_name":{"type":"string","minLength":1,"maxLength":120,"description":"The name the signer types, drawn on the signed PDF. Letters, marks, numbers, punctuation, symbols and spaces from the Latin, Greek and Cyrillic scripts (and script-neutral characters) that the embedded font can draw are accepted; other scripts, emoji and invisible or control characters return 422 urn:signlayer:problem:signature-name-unsupported. Stored in Unicode NFC with no-break spaces turned into spaces. Empty or longer than 120 characters after trimming returns 400."},"consent_version":{"type":"string","description":"The consent_version returned by the signer session. Required for Dutch requests; omission remains compatible only with legacy English consent."},"document_proof":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Document possession proof: 64 lowercase hex characters of HMAC-SHA256 with key = UTF-8 bytes of document.proof_key from the signer session and message = the exact PDF bytes downloaded from document.url. The server recomputes it from the stored source. It proves the client held the exact document when signing, not that a person read it."}}},"SignatureNameProblem":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["unsupported_characters"],"properties":{"type":{"type":"string","const":"urn:signlayer:problem:signature-name-unsupported"},"unsupported_characters":{"type":"array","maxItems":10,"items":{"type":"string"},"description":"Distinct refused characters in order of first occurrence, each \"U+XXXX\" followed by a space and the character when it is visible. Empty when the name is too long after normalization."}}}],"description":"The signature name cannot be drawn on the signed document. detail is in the request language (X-Signer-Language) and asks the signer to type their name in Latin, Greek or Cyrillic letters."},"AnchorProblem":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"anchor_reason":{"type":"string","description":"Why PDF anchor detection failed. Current values: marker_not_alone_on_line, malformed_marker, unknown_signer, marker_rotated, field_outside_page, missing_signer_marker, limits_exceeded, unreadable_pdf. Open set: treat an unknown value like a problem without a reason and show detail."},"anchor_page":{"type":"integer","minimum":1,"description":"1-based page of the failing marker, when known."},"anchor_marker":{"type":"string","example":"{{signer1}}","description":"The marker concerned, when known. Never contains other text from the PDF."}}}],"description":"Problem response for draft creation; PDF anchor failures add the anchor_* members."},"DocumentProofProblem":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"type":{"type":"string","enum":["urn:signlayer:problem:document-proof-required","urn:signlayer:problem:document-proof-invalid","urn:signlayer:problem:document-proof-unavailable","urn:signlayer:problem:document-source-changed"]}}}],"description":"Document possession proof problem. detail is in the request language (X-Signer-Language)."},"DeclineAction":{"type":"object","required":["action"],"properties":{"action":{"const":"decline"},"reason":{"type":"string"}}},"WebhookEvent":{"type":"object","required":["id","type","created_at","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique per event; identical on every retry and redelivery."},"type":{"type":"string","enum":["signing_request.sent","signing_request.completed","signing_request.cancelled","signer.signed","signer.declined","signing_request.created","signing_request.viewed","signing_request.partially_signed","signing_request.declined","signing_request.expired","signer.viewed"]},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object","required":["signing_request_id"],"properties":{"signing_request_id":{"type":"string","format":"uuid"},"signer_id":{"type":"string","format":"uuid","description":"signer.* events only."},"document_id":{"type":"string","format":"uuid","description":"signing_request.completed only."},"previous_status":{"type":["string","null"],"description":"Status of the event's resource (signer for signer.*, request otherwise) before the transition; null for signing_request.created. Absent on signing_request.completed, which always follows partially_signed."},"status":{"type":"string","description":"Status of the event's resource after the transition. Absent on signing_request.completed (completed)."},"audit_event_id":{"type":"string","format":"uuid","description":"Audit record of the committed action that caused this event. Absent on signing_request.completed, whose id is its audit record id."}}}}},"EmailDelivery":{"type":["object","null"],"required":["status","bounce_type","updated_at"],"description":"Delivery status of the signer's invitation and reminder e-mails, from the e-mail provider. null when no e-mail has been accepted or withheld for this signer yet. withheld (sandbox only): SignLayer did not e-mail this signer because the address is not a verified member of the workspace; use signer_url. A complaint, permanent bounce, failure or suppression on any message stays visible; otherwise the latest message decides. Treat as optional: older responses omit it.","properties":{"status":{"type":"string","enum":["accepted","withheld","delivered","delivery_delayed","bounced","complained","failed","suppressed"]},"bounce_type":{"type":["string","null"],"enum":["permanent","transient","undetermined",null],"description":"Only for bounced."},"updated_at":{"type":"string","format":"date-time"}}},"RemindResult":{"type":"object","required":["id","reminded","skipped"],"properties":{"id":{"type":"string","format":"uuid"},"reminded":{"type":"integer","minimum":0,"description":"Signers who were sent a reminder."},"skipped":{"type":"array","description":"Signers not mailed because their address cannot receive mail, or (sandbox only, reason withheld) because they are not a verified member of the workspace.","items":{"type":"object","required":["signer_id","reason"],"properties":{"signer_id":{"type":"string","format":"uuid"},"reason":{"type":"string","enum":["complained","suppressed","failed","bounced","withheld"]}}}}}},"EmailDeliveryWebhook":{"type":"object","required":["id","type","created_at","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique per provider event; identical on every retry and redelivery."},"type":{"type":"string","enum":["signer.email_undeliverable","signer.email_complained"]},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object","required":["signing_request_id","signer_id","email_kind","reason","bounce_type","occurred_at"],"properties":{"signing_request_id":{"type":"string","format":"uuid"},"signer_id":{"type":"string","format":"uuid"},"email_kind":{"type":"string","enum":["invitation","reminder"]},"reason":{"type":"string","enum":["bounced","failed","suppressed","complained"]},"bounce_type":{"type":["string","null"],"enum":["permanent",null]},"occurred_at":{"type":"string","format":"date-time","description":"When the provider recorded the outcome."}}}}},"CreateWebhookEndpoint":{"type":"object","required":["url","events"],"properties":{"url":{"type":"string","format":"uri","description":"Public HTTP(S) receiver without URL credentials. Live requires HTTPS. Private/special IPs, non-public DNS answers and redirects are refused at delivery; use a public tunnel for local development."},"events":{"type":"array","minItems":1,"items":{"type":"string","enum":["*","signing_request.sent","signing_request.completed","signing_request.cancelled","signer.signed","signer.declined","signing_request.created","signing_request.viewed","signing_request.partially_signed","signing_request.declined","signing_request.expired","signer.viewed","signer.email_undeliverable","signer.email_complained"]},"default":["*"]}}},"StartDeviceAuthorization":{"type":"object","additionalProperties":false,"required":["workspace_name","workspace_slug"],"properties":{"workspace_name":{"type":"string"},"workspace_slug":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}}}}}}