docs / api

API reference

API-first document signing: simple electronic signatures with a sealed evidence package. Signers show who they are in one of two ways (`signer_verification`): `email_otp`, an emailed invitation and a one-time code, or `sender_link`, where nothing is emailed, you hand each signer their link, and the evidence says that no identity was checked. GET /me lists what this server offers. Vocabulary: the wire value `environment: "sandbox"` is test mode (keys start with `osk_test_`) and `"production"` is live (keys start with `osk_live_`). Paths and property names keep the word sandbox. Test mode: an osk_test_ key works on the same URL and keeps everything apart from live: no email reaches recipients (signing links come back as sandbox_signing_links, mail lands in the test inbox), test credits, TEST on every document, an untrusted test seal. osk_live_ keys are live: recipients get real email. Guide: https://signnative.com/docs/test-mode. Agents can create drafts and request approval, but can never sign or approve on behalf of a person. To have someone sign: a person creates an API key in the dashboard and gives it to you (`signnative serve` saves one for the machine it runs on). Then you upload the PDF, place fields, send, and for `sender_link` hand out the signing links. Guides: fields https://signnative.com/docs/fields, webhooks https://signnative.com/docs/webhooks, verifying the evidence https://signnative.com/docs/evidence. A server can set storage and upload limits per workspace (GET /storage). Errors: every error response is the Error schema, which lists each code with its status. Each operation lists the statuses it can return; any operation can also answer 500 `internal_error`. Every endpoint below is generated from the OpenAPI document the server publishes, so this page and the API cannot drift apart. New here? Start with the quickstart.

Download OpenAPI 3.1 (JSON)SignNative API 0.1.0 · 63 operations · for code generators, Postman and other tools
All endpoints

Base URL

All API-key endpoints live under /api/v1 on the host where SignNative runs: your own deployment, or http://localhost:3000 with pnpm dev. Requests and responses are JSON unless an endpoint says otherwise, and every response carries an x-request-id header. The examples use two shell variables:

export OSK=osk_test_xxxxxxxx
export BASE=https://<your-host>/api/v1

Authentication

Send a workspace API key as a Bearer token: Authorization: Bearer $OSK. Create keys in the dashboard under Developers; the secret is shown once and stored only as a hash. Keep keys on your server: never ship one to a browser or a mobile app.

  • Keys are bound to an environment. Test keys start with osk_test_, live keys with osk_live_. A key used against the other environment gets 403 environment_mismatch.
  • A missing, revoked or expired key gets 401 unauthorized. A key without the scope an endpoint needs gets 403 insufficient_scope, with the scope in error.details.scope.
  • A key can have an expiry date and a monthly credit cap; sending beyond the cap is 402 key_budget_exceeded.
  • Dashboard session of a signed-in person. Mutations must come from the app's own origin. Accepted on every /v1 operation; required where an operation lists only this scheme.

Scopes an API key can hold. Each endpoint below lists the ones it checks.

documents:readdocuments:writeenvelopes:readenvelopes:writeenvelopes:sendenvelopes:cancelenvelopes:remindenvelopes:deletesessions:createartifacts:readapprovals:requestapprovals:readaudit:readwebhooks:managebilling:readseals:write

Only a signed-in person ever holds approvals:decide, keys:manage, workspace:manage and billing:manage. No key, agent or integration can approve, manage keys or change workspace settings.

Idempotency

Send an Idempotency-Key header (any unique string up to 200 characters, such as a UUID) to make a call safe to retry. Keys are scoped to the workspace.

A retry with the same key and the same body returns the stored response instead of doing the work twice. The same key with a different body is 409 idempotency_key_reused; while the first request is still running a retry is 409 conflict. If the request fails, the key is released so you can retry with it.

Errors

Every error has the same shape. Branch on the code; the message is for people.

{
  "error": {
    "code": "insufficient_scope",
    "message": "This action requires the envelopes:send scope.",
    "request_id": "req_…",
    "details": { "scope": "envelopes:send" }
  }
}
  • errorobjectrequired
    • codeenumrequired

      Stable, machine-readable code. Branch on this, not on the message.

      One ofunauthorizedforbiddeninsufficient_scopenot_foundinvalid_requestinvalid_stateconflictidempotency_key_requiredidempotency_key_reusedapproval_requiredapproval_invalidapprovals_unavailablerate_limitedpayload_too_largeunsupported_documentverification_failedexpiredenvironment_mismatchinsufficient_creditskey_budget_exceededstorage_limit_exceededinternal_error

    • messagestringrequired

      Human-readable explanation. Never echoes submitted values.

    • request_idstringrequired

      Also sent as the x-request-id header. Quote it when you report a problem.

    • detailsobjectoptional

      Extra context for some codes, e.g. scope for insufficient_scope, issues for invalid bodies, retry_after_seconds for rate_limited and for a conflict that can be retried.

An invalid body is 422 invalid_request with details.issues (path and message of each problem, never the submitted values). Resources of other workspaces are always 404.

Error codes and their HTTP status
StatusCode
400idempotency_key_required
401unauthorized
401verification_failed
402insufficient_credits
402key_budget_exceeded
403environment_mismatch
403forbidden
403insufficient_scope
403storage_limit_exceeded
404not_found
409approval_invalid
409approval_required
409approvals_unavailable
409conflict
409idempotency_key_reused
409invalid_state
410expired
413payload_too_large
422invalid_request
422unsupported_document
429rate_limited
500internal_error

Pagination

List endpoints that can grow return {"data": [...], "next_cursor": "..."}, newest first. Pass next_cursor as cursor to get the next page; it is null on the last page. limit is 1 to 100 (default 25).

Rate limits

A limited request gets 429 rate_limited with a Retry-After header and details.retry_after_seconds. The limits today:

  • Dashboard sign-in links: 5 per email address and 20 per client per 15 minutes.
  • Signer one-time codes: 5 per recipient and 30 per client per 15 minutes.
  • Envelope reminders: 1 per envelope per hour.

There is no general per-key request limit yet. Treat 429 as possible on any call and back off.

Webhooks

Register an HTTPS endpoint with POST /webhooks and keep the secret it returns. SignNative then POSTs each event as JSON:

POST with JSON body {id,type,created_at,workspace_id,resource_id,environment,data}. Header webhook-signature: t=<unix>,v1=<hex HMAC-SHA256(secret, t + '.' + raw_body)>, webhook-id: <event id> for de-duplication. Retries: 1m, 5m, 30m, 2h, 12h, 24h. Ordering is not guaranteed; fetch current state.

  • Verify webhook-signature over the timestamp and the raw body before you parse it, and reject timestamps more than 5 minutes. The SDKs do this for you: verifyWebhook (TypeScript), verify_webhook (Python), VerifyWebhook (Go).
  • De-duplicate on webhook-id: a delivery can arrive more than once.
  • Answer with a 2xx within 10 seconds. Anything else, including a redirect, counts as a failure and is retried. After the last retry the delivery is marked dead; you can replay it.
verify (WebCrypto)
// Node/Workers (WebCrypto). Throw before you parse the body.
const m = /^t=(\d+),v1=([0-9a-f]+)$/.exec(sigHeader ?? "");
if (!m) throw new Error("bad webhook-signature header");
const t = Number(m[1]);
if (Math.abs(Date.now() / 1000 - t) > 300) throw new Error("timestamp outside 5 minutes");
const enc = new TextEncoder();
const sig = Uint8Array.from(m[2].match(/../g) ?? [], (h) => parseInt(h, 16));
const key = await crypto.subtle.importKey("raw", enc.encode(secret), { name: "HMAC", hash: "SHA-256" }, false, ["verify"]);
// crypto.subtle.verify compares in constant time
if (!(await crypto.subtle.verify("HMAC", key, sig, enc.encode(`${t}.${rawBody}`)))) throw new Error("bad signature");

Event types (subscribe to some, or to all with *):

envelope.createdenvelope.sentenvelope.completedenvelope.declinedenvelope.canceledenvelope.expiredenvelope.finalization_failedenvelope.deletedapproval.requestedapproval.approvedapproval.rejectedrecipient.verifiedrecipient.signedrecipient.link_lockedrecipient.declined

Account

Who is calling, and workspace settings.

Get the current principal

GET/api/v1/me

Who is calling: kind (api_key or user), the granted scopes, the deployment's environment, the workspace, the offered signer_verification methods (default first) and whether the server sends mail at all. Useful to check a key. Needs no particular scope.

Auth
API key (Bearer) or dashboard session

Responses

  • 200The callerapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
curl
curl "$BASE/me" \
  -H "Authorization: Bearer $OSK"

Update workspace settings

PATCH/api/v1/workspace

Rename the workspace or require human approval before API keys can send. Signed-in person only; API keys get 403.

Auth
Dashboard session only
Scopes
workspace:manage

Dashboard only: the signed-in person's session cookie, from the app's own origin. API keys get 403 forbidden.

Request body (optional)

application/json

  • namestringoptional1–100 chars
  • require_approval_for_apibooleanoptional

    When true, sends made with an API key need an approved approval request (approval_id).

Responses

  • 200Savedapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403forbidden: an API key (only a signed-in person may do this), or a cross-site request. insufficient_scope: the person's role does not allow itError
  • 422invalid_request: the body or a parameter is invalid (details.issues lists the paths)Error

Documents

Upload PDFs. Each upload is validated and stored as an immutable version with its SHA-256.

Upload a PDF

POST/api/v1/documents

Send multipart/form-data with a file field (and an optional title), or the raw PDF as application/pdf. Max 20 MB and 100 pages. The server rejects encrypted PDFs, PDFs that are already signed, and PDFs with JavaScript, launch actions, attachments or XFA. The result is an immutable document version with its SHA-256; pass its version_id as document_version_id when you create an envelope. On signnative.com free workspaces have a storage limit and a daily upload limit, and an upload that no envelope uses is deleted after some days (GET /storage gives the numbers and limits_url). pages gives each page's displayed size in PDF points, which you need to convert point coordinates into field positions (see https://signnative.com/docs/fields).

Auth
API key (Bearer) or dashboard session
Scopes
documents:write

Parameters

  • titlestringin queryoptional

    Title for a raw application/pdf or application/octet-stream body. With multipart/form-data the title form field wins when it is not empty.

Request body

multipart/form-data

  • filebinaryrequired
  • titlestringoptional

application/pdf

The raw file bytes.

application/octet-stream

The raw file bytes.

Responses

  • 201Validated immutable document versionapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403storage_limit_exceeded: the upload would take the workspace over its storage limit (see GET /storage). insufficient_scope, environment_mismatch or forbidden as on every operationError
  • 413payload_too_large: the PDF is larger than 20 MBError
  • 422unsupported_document: not a PDF the server accepts (empty, damaged, encrypted, already signed, with active or embedded content, or more than 100 pages). invalid_request: no file field, or an unsupported content typeError
  • 429rate_limited: the workspace's daily upload limit is reached (see GET /storage)Error
curl
curl -X POST "$BASE/documents" \
  -H "Authorization: Bearer $OSK" \
  -F file=@contract.pdf

Download a document version

GET/api/v1/documents/versions/{id}/content

The PDF bytes exactly as uploaded.

Auth
API key (Bearer) or dashboard session
Scopes
documents:read

Parameters

  • idstringin pathrequired

Responses

  • 200The PDFapplication/pdf
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
  • 404not_found: also for resources of another workspace or of the other modeError
curl
curl "$BASE/documents/versions/ver_…/content" \
  -H "Authorization: Bearer $OSK" \
  -o document.pdf

Delete an upload

DELETE/api/v1/documents/versions/{id}

Deletes an uploaded document version that no envelope uses: the row and the stored PDF. 409 invalid_state when an envelope uses it; delete the envelope instead and the document goes with it.

Auth
API key (Bearer) or dashboard session
Scopes
documents:write

Parameters

  • idstringin pathrequired

Responses

  • 204Deleted
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
  • 404not_found: also for resources of another workspace or of the other modeError
  • 409invalid_state: an envelope uses the documentError
curl
curl -X DELETE "$BASE/documents/versions/ver_…" \
  -H "Authorization: Bearer $OSK"

Get storage use and limits

GET/api/v1/storage

How many bytes the workspace stores (uploaded PDFs plus signed artifacts) and the limits that apply. A limit of null means none is set on this deployment. Uploads fail with 403 storage_limit_exceeded over the storage limit and 429 rate_limited over the daily upload limit; signing and finishing envelopes are never blocked by them. Uploads that no envelope uses are deleted after unused_document_days. The limits may change: see limits_url.

Auth
API key (Bearer) or dashboard session
Scopes
documents:read

Responses

  • 200Storage useapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
curl
curl "$BASE/storage" \
  -H "Authorization: Bearer $OSK"

Envelopes

An envelope binds a document version to recipients and fields. Draft, optionally get approval, send, then follow it until it is completed, declined, canceled or expired.

List envelopes

GET/api/v1/envelopes

Newest first, with each recipient's state. Pass next_cursor from the response as cursor to get the next page; it is null on the last page.

Auth
API key (Bearer) or dashboard session
Scopes
envelopes:read

Parameters

  • limitintegerin queryoptional1–100default 25

    Page size, 1 to 100.

  • cursorstringin queryoptional

    next_cursor from the previous page.

  • stateenumin queryoptional

    Only envelopes in this state.

    One ofdraftpending_approvalapprovedsentin_progressfinalizingcompleteddeclinedcanceledexpiredfinalization_failed

Responses

  • 200One page of envelopesapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
curl
curl "$BASE/envelopes" \
  -H "Authorization: Bearer $OSK"

Create a draft envelope

POST/api/v1/envelopes

A draft binds one document version to recipients and fields. Nothing is sent and no credits are reserved until you call send. Every recipient needs at least one signature field before the draft can be quoted, put up for approval or sent.

Auth
API key (Bearer) or dashboard session
Scopes
envelopes:write

Parameters

  • Idempotency-Keystringin headeroptional≤ 200 chars

    Optional. With a key, a retry with the same key and body returns the stored response instead of creating a second resource; the same key with a different body is a 409 idempotency_key_reused. Keys are scoped to the workspace.

Request body

application/jsonEnvelopeCreate

  • document_version_idstringrequired

    version_id returned by POST /documents.

  • titlestringoptional1–200 chars
  • messagestringoptional≤ 2000 chars

    Shown to recipients in the invitation.

  • signing_orderenumoptionaldefault "parallel"

    sequential invites recipients one at a time, in list order.

    One ofparallelsequential

  • signer_verificationenumoptional

    How signers show who they are. email_otp: an emailed invitation and a one-time code to the address. sender_link: nothing is emailed; sending returns signing_links, you deliver each link yourself, and the evidence says that the platform checked no identity. Default: the server's first offered method (GET /v1/me lists them). A server without a mail provider offers only sender_link.

    One ofemail_otpsender_link

  • signer_network_evidenceenumoptionaldefault "none"

    What is recorded about each signer's connection when they sign. none (default) records nothing. ip_user_agent stores the IP address and browser user agent in the evidence package and on the certificate page; the signer is told before signing.

    One ofnoneip_user_agent

  • expires_in_hoursintegeroptional1–1440default 168

    Signing must finish within this time after creation. Cannot be changed later.

  • recipientsRecipientInput[]optional≤ 10 items
    • rolestringoptional≤ 50 charspattern ^[a-zA-Z0-9_-]+$

      Your name for this recipient, unique within the envelope. Fields point at it with recipient_role. Default signer_1, signer_2, …

    • namestringrequired1–120 chars
    • emailstring<email>required≤ 254 chars

      Unique within the envelope. With email_otp this address receives the invitation and the one-time code. With sender_link nothing is sent to it: it is a label the sender chose, recorded with the signer, and the platform does not check it.

  • fieldsFieldInput[]optional≤ 200 items
    • recipient_rolestringrequired≤ 50 chars

      role of the recipient who fills in this field. Must match a recipient in the same request (or the envelope).

    • typeenumrequired

      signature: the signer's typed or drawn signature, always required; recommended at least 0.2 × 0.05 of an A4 page. text: a line the signer types, up to 500 characters; long text is shrunk to fit the box. date: filled automatically with the signing date (UTC, YYYY-MM-DD); the signer types nothing. checkbox: a box the signer ticks; when required is true it must be ticked to sign.

      One ofsignaturetextdatecheckbox

    • pageintegerrequired1–100

      1-based page number, at most the document's page_count.

    • xnumberrequired0–1

      Left edge, as a fraction of the page width from the left (0 = left edge, 1 = right edge).

    • ynumberrequired0–1

      Top edge, as a fraction of the page height from the top (0 = top edge, 1 = bottom edge). Note: from the top, unlike PDF user space.

    • widthnumberrequired> 0, ≤ 1

      Box width as a fraction of the page width. At least 0.02.

    • heightnumberrequired> 0, ≤ 1

      Box height as a fraction of the page height. At least 0.01.

    • requiredbooleanoptionaldefault true

      Whether the signer must fill it in. Ignored for signature (always required) and date (always filled).

    • labelstringoptional≤ 80 chars

      Shown to the signer next to the field, e.g. "Job title". Recommended for every text and checkbox field.

  • metadataMetadataoptional

    Your own key-value pairs, e.g. an order id or the agent task that created the envelope. Up to 20 keys; keys up to 40 characters of letters, digits, _, . and -; string values up to 500 characters. Returned on the envelope; never shown to signers and not part of the payload hash or the evidence. Do not put personal data or secrets here. On update, the object you send replaces the old one.

Responses

  • 201The draftapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
  • 404not_found: the document version does not exist in this workspaceError
  • 409idempotency_key_reused: the key was used with a different body. conflict: the first request with this key is still runningError
  • 422invalid_request: invalid body, a field outside its page, too small or overlapping another, an unknown recipient_role, a duplicate role or email, or a signer_verification this server does not offerError
curl
curl -X POST "$BASE/envelopes" \
  -H "Authorization: Bearer $OSK" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"document_version_id":"ver_…","title":"Consulting agreement","recipients":[{"role":"customer","name":"Test Customer","email":"customer@example.com"}],"fields":[{"recipient_role":"customer","type":"signature","page":1,"x":0.1,"y":0.8,"width":0.3,"height":0.06}]}'

Get an envelope

GET/api/v1/envelopes/{id}

The envelope with its state, recipients (and their state), fields and timestamps.

Auth
API key (Bearer) or dashboard session
Scopes
envelopes:read

Parameters

  • idstringin pathrequired

Responses

  • 200The envelopeapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
  • 404not_found: also for resources of another workspace or of the other modeError
curl
curl "$BASE/envelopes/env_…" \
  -H "Authorization: Bearer $OSK"

Update a draft

PATCH/api/v1/envelopes/{id}

Change the title, message, signing order, recipients or fields of a draft. Any change alters the payload hash, so earlier approvals no longer apply.

Auth
API key (Bearer) or dashboard session
Scopes
envelopes:write

Parameters

  • idstringin pathrequired

Request body (optional)

application/jsonEnvelopeUpdate

All properties are optional; omitted ones keep their value. recipients and fields replace the whole list when given. document_version_id and expires_in_hours cannot be changed after creation. Unknown properties are ignored.

  • titlestringoptional1–200 chars
  • messagestringoptional≤ 2000 chars
  • signing_orderenumoptional

    One ofparallelsequential

  • signer_network_evidenceenumoptional

    One ofnoneip_user_agent

  • signer_verificationenumoptional

    One ofemail_otpsender_link

  • recipientsRecipientInput[]optional≤ 10 items
    • rolestringoptional≤ 50 charspattern ^[a-zA-Z0-9_-]+$

      Your name for this recipient, unique within the envelope. Fields point at it with recipient_role. Default signer_1, signer_2, …

    • namestringrequired1–120 chars
    • emailstring<email>required≤ 254 chars

      Unique within the envelope. With email_otp this address receives the invitation and the one-time code. With sender_link nothing is sent to it: it is a label the sender chose, recorded with the signer, and the platform does not check it.

  • fieldsFieldInput[]optional≤ 200 items
    • recipient_rolestringrequired≤ 50 chars

      role of the recipient who fills in this field. Must match a recipient in the same request (or the envelope).

    • typeenumrequired

      signature: the signer's typed or drawn signature, always required; recommended at least 0.2 × 0.05 of an A4 page. text: a line the signer types, up to 500 characters; long text is shrunk to fit the box. date: filled automatically with the signing date (UTC, YYYY-MM-DD); the signer types nothing. checkbox: a box the signer ticks; when required is true it must be ticked to sign.

      One ofsignaturetextdatecheckbox

    • pageintegerrequired1–100

      1-based page number, at most the document's page_count.

    • xnumberrequired0–1

      Left edge, as a fraction of the page width from the left (0 = left edge, 1 = right edge).

    • ynumberrequired0–1

      Top edge, as a fraction of the page height from the top (0 = top edge, 1 = bottom edge). Note: from the top, unlike PDF user space.

    • widthnumberrequired> 0, ≤ 1

      Box width as a fraction of the page width. At least 0.02.

    • heightnumberrequired> 0, ≤ 1

      Box height as a fraction of the page height. At least 0.01.

    • requiredbooleanoptionaldefault true

      Whether the signer must fill it in. Ignored for signature (always required) and date (always filled).

    • labelstringoptional≤ 80 chars

      Shown to the signer next to the field, e.g. "Job title". Recommended for every text and checkbox field.

  • metadataMetadataoptional

    Your own key-value pairs, e.g. an order id or the agent task that created the envelope. Up to 20 keys; keys up to 40 characters of letters, digits, _, . and -; string values up to 500 characters. Returned on the envelope; never shown to signers and not part of the payload hash or the evidence. Do not put personal data or secrets here. On update, the object you send replaces the old one.

Responses

  • 200The updated draftapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
  • 404not_found: also for resources of another workspace or of the other modeError
  • 409invalid_state: the envelope has been sent and can no longer be changedError
  • 422invalid_request: the body or a parameter is invalid (details.issues lists the paths)Error
curl
curl -X PATCH "$BASE/envelopes/env_…" \
  -H "Authorization: Bearer $OSK" \
  -H "Content-Type: application/json" \
  -d '{"title":"…"}'

Delete an envelope

DELETE/api/v1/envelopes/{id}

Permanently deletes the envelope and everything stored for it: recipients, fields, signatures, approvals, the audit trail, the signed PDF and evidence, its mail in the test inbox, and the uploaded document unless another envelope uses it. Possible in draft, pending_approval, approved, completed, declined, canceled and expired; an envelope out for signature must be canceled first (409 invalid_state). Kept: credit ledger entries (amounts and the envelope id, no content) and the evidence hash in the transparency log. Signed files someone downloaded still verify offline. Sends envelope.deleted to webhooks. Cannot be undone. The envelopes:delete scope is not in the Agent preset: agents should not delete signed agreements.

Auth
API key (Bearer) or dashboard session
Scopes
envelopes:delete

Parameters

  • idstringin pathrequired

Responses

  • 204Deleted
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
  • 404not_found: also for resources of another workspace or of the other modeError
  • 409invalid_state: out for signature (cancel it first) or being finished. conflict: the envelope changed while it was being deletedError
curl
curl -X DELETE "$BASE/envelopes/env_…" \
  -H "Authorization: Bearer $OSK"

Replace the recipients of a draft

PUT/api/v1/envelopes/{id}/recipients

Same as PATCH /envelopes/{id} with only recipients.

Auth
API key (Bearer) or dashboard session
Scopes
envelopes:write

Parameters

  • idstringin pathrequired

Request body (optional)

application/json

  • recipientsRecipientInput[]optional≤ 10 items
    • rolestringoptional≤ 50 charspattern ^[a-zA-Z0-9_-]+$

      Your name for this recipient, unique within the envelope. Fields point at it with recipient_role. Default signer_1, signer_2, …

    • namestringrequired1–120 chars
    • emailstring<email>required≤ 254 chars

      Unique within the envelope. With email_otp this address receives the invitation and the one-time code. With sender_link nothing is sent to it: it is a label the sender chose, recorded with the signer, and the platform does not check it.

Responses

  • 200The updated draftapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
  • 404not_found: also for resources of another workspace or of the other modeError
  • 409invalid_state: the envelope has been sent and can no longer be changedError
  • 422invalid_request: the body or a parameter is invalid (details.issues lists the paths)Error
curl
curl -X PUT "$BASE/envelopes/env_…/recipients" \
  -H "Authorization: Bearer $OSK" \
  -H "Content-Type: application/json" \
  -d '{"recipients":[{"role":"customer","name":"Test Customer","email":"customer@example.com"}]}'

Replace the fields of a draft

PUT/api/v1/envelopes/{id}/fields

Same as PATCH /envelopes/{id} with only fields.

Auth
API key (Bearer) or dashboard session
Scopes
envelopes:write

Parameters

  • idstringin pathrequired

Request body (optional)

application/json

  • fieldsFieldInput[]optional≤ 200 items
    • recipient_rolestringrequired≤ 50 chars

      role of the recipient who fills in this field. Must match a recipient in the same request (or the envelope).

    • typeenumrequired

      signature: the signer's typed or drawn signature, always required; recommended at least 0.2 × 0.05 of an A4 page. text: a line the signer types, up to 500 characters; long text is shrunk to fit the box. date: filled automatically with the signing date (UTC, YYYY-MM-DD); the signer types nothing. checkbox: a box the signer ticks; when required is true it must be ticked to sign.

      One ofsignaturetextdatecheckbox

    • pageintegerrequired1–100

      1-based page number, at most the document's page_count.

    • xnumberrequired0–1

      Left edge, as a fraction of the page width from the left (0 = left edge, 1 = right edge).

    • ynumberrequired0–1

      Top edge, as a fraction of the page height from the top (0 = top edge, 1 = bottom edge). Note: from the top, unlike PDF user space.

    • widthnumberrequired> 0, ≤ 1

      Box width as a fraction of the page width. At least 0.02.

    • heightnumberrequired> 0, ≤ 1

      Box height as a fraction of the page height. At least 0.01.

    • requiredbooleanoptionaldefault true

      Whether the signer must fill it in. Ignored for signature (always required) and date (always filled).

    • labelstringoptional≤ 80 chars

      Shown to the signer next to the field, e.g. "Job title". Recommended for every text and checkbox field.

Responses

  • 200The updated draftapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
  • 404not_found: also for resources of another workspace or of the other modeError
  • 409invalid_state: the envelope has been sent and can no longer be changedError
  • 422invalid_request: the body or a parameter is invalid (details.issues lists the paths)Error
curl
curl -X PUT "$BASE/envelopes/env_…/fields" \
  -H "Authorization: Bearer $OSK" \
  -H "Content-Type: application/json" \
  -d '{"fields":[{"recipient_role":"customer","type":"signature","page":2,"x":0.1,"y":0.78,"width":0.35,"height":0.07}]}'

Quote a draft

POST/api/v1/envelopes/{id}/quote

The credits sending would reserve (max_credits), what the workspace has (credits_available, sufficient) and the payload hash of the current draft. Reserves nothing.

Auth
API key (Bearer) or dashboard session
Scopes
envelopes:write

Parameters

  • idstringin pathrequired

Responses

  • 200The quoteapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
  • 404not_found: also for resources of another workspace or of the other modeError
  • 409invalid_state: the envelope expires within the hourError
  • 422invalid_request: the envelope has no recipients, or a recipient has no signature fieldError
curl
curl -X POST "$BASE/envelopes/env_…/quote" \
  -H "Authorization: Bearer $OSK"

Send an envelope

POST/api/v1/envelopes/{id}/send

Locks the document, recipients, fields and quote, and invites the recipients. Requires an Idempotency-Key. If the workspace requires approval for API sends, pass the approval_id of an approved request for the current payload hash. Reserves the quoted credits atomically: 402 insufficient_credits when the workspace lacks available credits, 402 key_budget_exceeded when the API key's monthly cap would be exceeded. In test mode the response includes sandbox_signing_links and emails stay in the test inbox. An envelope with signer_verification: sender_link emails nothing in any mode: the response includes signing_links (one per recipient whose turn it is, valid until the envelope expires, shown this once). Hand each link to its signer yourself. In test mode a sender_link send returns the same links in both signing_links and sandbox_signing_links. A key without the scope sessions:create is not handed the links of a sender_link envelope: the response has signing_links_withheld: true instead, and someone whose key has the scope makes the links with POST /envelopes/{id}/sessions. For a later signer or a lost link, use POST /envelopes/{id}/sessions.

Auth
API key (Bearer) or dashboard session
Scopes
envelopes:send

Parameters

  • idstringin pathrequired
  • Idempotency-Keystringin headerrequired≤ 200 chars

Request body (optional)

application/json

  • approval_idstringoptional

    Approved approval request for this envelope. Required when the workspace requires approval for API sends.

Responses

  • 200The sent envelope, with signing_links for a sender_link envelope and sandbox_signing_links in test modeapplication/json
  • 400idempotency_key_required: the Idempotency-Key header is missingError
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 402insufficient_credits: the workspace lacks available credits. key_budget_exceeded: the API key's monthly cap would be exceededError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
  • 404not_found: also for resources of another workspace or of the other modeError
  • 409invalid_state: already sent, or it expires within the hour. approval_required: the workspace requires an approval_id for API sends. approval_invalid: the approval is missing, expired, used or for another version of the draft. idempotency_key_reused: the key was used with a different body. conflict: the first request with this key is still running, or the draft changed during the sendError
  • 422invalid_request: the envelope has no recipients, or a recipient has no signature fieldError
curl
curl -X POST "$BASE/envelopes/env_…/send" \
  -H "Authorization: Bearer $OSK" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"approval_id":"apr_…"}'

Cancel an envelope

POST/api/v1/envelopes/{id}/cancel

Stops signing and releases reserved credits. Not possible once the envelope is completed.

Auth
API key (Bearer) or dashboard session
Scopes
envelopes:cancel

Parameters

  • idstringin pathrequired

Request body (optional)

application/jsonEnvelopeCancel

  • reasonstringoptional

    Recorded in the audit trail. Truncated to 500 characters; a non-string value is ignored.

Responses

  • 200The canceled envelopeapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
  • 404not_found: also for resources of another workspace or of the other modeError
  • 409invalid_state: the envelope is finished or being finished and can no longer be canceledError
  • 422invalid_request: the body or a parameter is invalid (details.issues lists the paths)Error
curl
curl -X POST "$BASE/envelopes/env_…/cancel" \
  -H "Authorization: Bearer $OSK" \
  -H "Content-Type: application/json" \
  -d '{"reason":"…"}'

Remind recipients

POST/api/v1/envelopes/{id}/reminders

Mails a new signing link to recipients who have not signed yet; their earlier links stop working. In a sequential envelope it also invites a recipient whose turn has come but who was not invited yet. At most once per hour per envelope (429 otherwise). Not for sender_link envelopes (422): nothing is emailed there.

Auth
API key (Bearer) or dashboard session
Scopes
envelopes:remind

Parameters

  • idstringin pathrequired

Responses

  • 200Who was remindedapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
  • 404not_found: also for resources of another workspace or of the other modeError
  • 409invalid_state: the envelope is not out for signatureError
  • 422invalid_request: a sender_link envelope, where nothing is emailedError
  • 429rate_limited: the envelope was reminded less than an hour agoError
curl
curl -X POST "$BASE/envelopes/env_…/reminders" \
  -H "Authorization: Bearer $OSK"

Create a signing link

POST/api/v1/envelopes/{id}/sessions

A signing link for one recipient whose turn it is, to open in your own app or hand over yourself. The response has signing_url: the same kind of link as signing_links[].url from send (the property keeps its older name). email_otp envelopes: valid 30 minutes, and the signer still verifies their email with a one-time code. sender_link envelopes: valid until the envelope expires, and the link alone opens the document; use it for the next signer in a sequential envelope or to replace a lost link. A new link replaces the old ones. On a sender_link envelope all the recipient's earlier links stop working when this call succeeds. On an email_otp envelope earlier links made here stop working and the mailed invitation keeps working. In a sequential envelope it also invites a recipient whose turn has come but who was not invited yet.

Auth
API key (Bearer) or dashboard session
Scopes
sessions:create

Parameters

  • idstringin pathrequired

Request body

application/jsonSessionCreate

  • recipient_idstringrequired

    Recipient of this envelope whose turn it is to sign. An unknown or missing id is a 404.

Responses

  • 201The signing linkapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
  • 404not_found: the envelope does not exist, or recipient_id is not one of its recipientsError
  • 409invalid_state: the envelope is not out for signature, the recipient has already signed or declined, or it is not their turn yetError
  • 422invalid_request: the body or a parameter is invalid (details.issues lists the paths)Error
curl
curl -X POST "$BASE/envelopes/env_…/sessions" \
  -H "Authorization: Bearer $OSK" \
  -H "Content-Type: application/json" \
  -d '{"recipient_id":"rcp_…"}'

Retry finalisation

POST/api/v1/envelopes/{id}/finalize

Only for envelopes in finalization_failed (or stuck in finalizing): stamps the PDF, builds and seals the evidence again.

Auth
API key (Bearer) or dashboard session
Scopes
envelopes:sendenvelopes:read

Parameters

  • idstringin pathrequired

Responses

  • 200The envelopeapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
  • 404not_found: also for resources of another workspace or of the other modeError
  • 409invalid_state: the envelope is not in finalization_failed or finalizingError
curl
curl -X POST "$BASE/envelopes/env_…/finalize" \
  -H "Authorization: Bearer $OSK"

List signed artifacts

GET/api/v1/envelopes/{id}/artifacts

Once the envelope is completed: its stored files, such as the signed PDF, evidence.json (canonical manifest) and evidence.sig.json (Ed25519 platform seal), each with its SHA-256 and a download_url that is valid for 15 minutes.

Auth
API key (Bearer) or dashboard session
Scopes
artifacts:read

Parameters

  • idstringin pathrequired

Responses

  • 200The filesapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
  • 404not_found: also for resources of another workspace or of the other modeError
  • 409invalid_state: the envelope is not completedError
curl
curl "$BASE/envelopes/env_…/artifacts" \
  -H "Authorization: Bearer $OSK"

Get the audit trail

GET/api/v1/envelopes/{id}/audit

Every state change of the envelope as a hash-chained list of events, oldest first.

Auth
API key (Bearer) or dashboard session
Scopes
audit:readenvelopes:read

Parameters

  • idstringin pathrequired

Responses

  • 200The audit trailapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
  • 404not_found: also for resources of another workspace or of the other modeError
curl
curl "$BASE/envelopes/env_…/audit" \
  -H "Authorization: Bearer $OSK"

Approvals

Human approval before sending. Agents and API keys can request approval; only a signed-in person can approve or reject.

Request approval

POST/api/v1/envelopes/{id}/approval-requests

Asks a person in the workspace to approve sending the current draft. The approval binds to the payload hash and is single-use; changing the draft invalidates it. The requester can never approve their own request.

Auth
API key (Bearer) or dashboard session
Scopes
approvals:request

Parameters

  • idstringin pathrequired

Request body (optional)

application/jsonApprovalRequestCreate

  • notestringoptional

    Shown to the approver. Truncated to 500 characters; a non-string value is ignored.

Responses

  • 201The approval requestapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
  • 404not_found: also for resources of another workspace or of the other modeError
  • 409invalid_state: the envelope is not a draft, or it expires within the hour. approvals_unavailable: this server has no dashboard (the standalone server), so no person can approve there; nothing was changedError
  • 422invalid_request: the envelope has no recipients, or a recipient has no signature fieldError
curl
curl -X POST "$BASE/envelopes/env_…/approval-requests" \
  -H "Authorization: Bearer $OSK" \
  -H "Content-Type: application/json" \
  -d '{"note":"…"}'

List pending approvals

GET/api/v1/approvals

Approval requests in the workspace that are waiting for a person, newest first. At most the 100 newest are returned.

Auth
API key (Bearer) or dashboard session
Scopes
approvals:read

Responses

  • 200Pending approvalsapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
curl
curl "$BASE/approvals" \
  -H "Authorization: Bearer $OSK"

Get an approval

GET/api/v1/approvals/{id}

Status of one approval request. Poll this (or listen for approval.approved and approval.rejected webhooks) before sending.

Auth
API key (Bearer) or dashboard session
Scopes
approvals:read

Parameters

  • idstringin pathrequired

Responses

  • 200The approvalapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
  • 404not_found: also for resources of another workspace or of the other modeError
curl
curl "$BASE/approvals/apr_…" \
  -H "Authorization: Bearer $OSK"

Approve

POST/api/v1/approvals/{id}/approve

Signed-in person only. API keys are always rejected: no agent or integration can approve on behalf of a person.

Auth
Dashboard session only
Scopes
approvals:decide

Dashboard only: the signed-in person's session cookie, from the app's own origin. API keys get 403 forbidden.

Parameters

  • idstringin pathrequired

Responses

  • 200The decided approvalapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403forbidden: an API key, the person who made the request, or a cross-site request. insufficient_scope: the person's role may not decide approvalsError
  • 404not_found: also for resources of another workspace or of the other modeError
  • 409approval_invalid: the approval is no longer pending, or the envelope changed after approval was requestedError

Reject

POST/api/v1/approvals/{id}/reject

Signed-in person only. API keys are always rejected.

Auth
Dashboard session only
Scopes
approvals:decide

Dashboard only: the signed-in person's session cookie, from the app's own origin. API keys get 403 forbidden.

Parameters

  • idstringin pathrequired

Responses

  • 200The decided approvalapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403forbidden: an API key, the person who made the request, or a cross-site request. insufficient_scope: the person's role may not decide approvalsError
  • 404not_found: also for resources of another workspace or of the other modeError
  • 409approval_invalid: the approval is no longer pending, or the envelope changed after approval was requestedError

Webhooks

Signed event notifications to your HTTPS endpoint, with retries and replay.

List webhook endpoints

GET/api/v1/webhooks

Endpoints of this workspace. Never the signing secrets.

Auth
API key (Bearer) or dashboard session
Scopes
webhooks:manage

Responses

  • 200Webhook endpointsapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
curl
curl "$BASE/webhooks" \
  -H "Authorization: Bearer $OSK"

Create a webhook endpoint

POST/api/v1/webhooks

SignNative POSTs signed events to the URL. The signing secret is returned once; keep it to verify the webhook-signature header.

Auth
API key (Bearer) or dashboard session
Scopes
webhooks:manage

Request body

application/jsonWebhookCreate

  • urlstringrequired≤ 2000 chars

    https URL on a public host (port 443 or 8443 when given). Private, loopback and link-local hosts are rejected, except on a local standalone server (signnative serve bound to localhost), which also accepts http and localhost URLs.

  • eventsenum[]optional≥ 1 itemsdefault ["*"]

    Event types to deliver. * means all.

    One of*envelope.createdenvelope.sentenvelope.completedenvelope.declinedenvelope.canceledenvelope.expiredenvelope.finalization_failedenvelope.deletedapproval.requestedapproval.approvedapproval.rejectedrecipient.verifiedrecipient.signedrecipient.link_lockedrecipient.declined

Responses

  • 201The endpoint with its signing secretapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
  • 422invalid_request: invalid body, or a URL that is not https on a public hostError
curl
curl -X POST "$BASE/webhooks" \
  -H "Authorization: Bearer $OSK" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/webhooks/signnative"}'

Disable a webhook endpoint

DELETE/api/v1/webhooks/{id}

No further deliveries are attempted.

Auth
API key (Bearer) or dashboard session
Scopes
webhooks:manage

Parameters

  • idstringin pathrequired

Responses

  • 204Disabled
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
  • 404not_found: also for resources of another workspace or of the other modeError
curl
curl -X DELETE "$BASE/webhooks/whk_…" \
  -H "Authorization: Bearer $OSK"

List deliveries

GET/api/v1/webhooks/{id}/deliveries

Delivery attempts for one endpoint: state, attempts, last HTTP status and error.

Auth
API key (Bearer) or dashboard session
Scopes
webhooks:manage

Parameters

  • idstringin pathrequired

Responses

  • 200Deliveriesapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
curl
curl "$BASE/webhooks/whk_…/deliveries" \
  -H "Authorization: Bearer $OSK"

Replay a delivery

POST/api/v1/webhooks/{id}/deliveries/{delivery_id}/replay

Queues the delivery again and starts sending it right away.

Auth
API key (Bearer) or dashboard session
Scopes
webhooks:manage

Parameters

  • idstringin pathrequired
  • delivery_idstringin pathrequired

Responses

  • 202Queuedapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
  • 404not_found: also for resources of another workspace or of the other modeError
curl
curl -X POST "$BASE/webhooks/whk_…/deliveries/dlv_…/replay" \
  -H "Authorization: Bearer $OSK"

Billing

Credits: one is reserved per sent envelope and charged on completion.

Get the credit balance

GET/api/v1/billing/balance

available = balance - reserved. One credit is reserved per sent envelope and charged on completion; it is released on decline, cancel or expiry.

Auth
API key (Bearer) or dashboard session
Scopes
billing:read

Responses

  • 200The balanceapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
curl
curl "$BASE/billing/balance" \
  -H "Authorization: Bearer $OSK"

List ledger entries

GET/api/v1/billing/ledger

The append-only credit ledger, newest first. Entry kinds: grant, test_grant, purchase, adjustment, reserve, capture, release.

Auth
API key (Bearer) or dashboard session
Scopes
billing:read

Parameters

  • limitintegerin queryoptional1–100default 25

    Page size, 1 to 100.

  • cursorstringin queryoptional

    next_cursor from the previous page.

  • envelope_idstringin queryoptional

    Only entries for this envelope.

Responses

  • 200One page of ledger entriesapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403insufficient_scope: the key lacks a scope this operation needs (details.scope). environment_mismatch: the key is for a mode this server does not have. forbidden: a cross-site browser requestError
curl
curl "$BASE/billing/ledger" \
  -H "Authorization: Bearer $OSK"

Add test credits

POST/api/v1/billing/test-credits

Free test credits. Test mode only, signed-in person only.

Auth
Dashboard session only
Scopes
billing:manage

Dashboard only: the signed-in person's session cookie, from the app's own origin. API keys get 403 forbidden.

Request body

application/json

  • creditsintegerrequired1–1000

Responses

  • 200The new balanceapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403forbidden: an API key, or the caller is not in test mode. insufficient_scope: the person's role does not allow itError
  • 422invalid_request: invalid body, or the test balance would pass its cap (details.max_balance)Error

API keys

Managed by a signed-in person in the dashboard. API keys cannot create or change keys.

List API keys

GET/api/v1/api-keys

Keys of the workspace with their prefix, scopes, monthly cap, usage this month, expiry and last use. Never the secrets. Signed-in person only.

Auth
Dashboard session only
Scopes
keys:manage

Dashboard only: the signed-in person's session cookie, from the app's own origin. API keys get 403 forbidden.

Responses

  • 200API keysapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403forbidden: an API key (only a signed-in person may do this), or a cross-site request. insufficient_scope: the person's role does not allow itError

Create an API key

POST/api/v1/api-keys

Creates a key for the mode you are in (osk_live_… in live mode, osk_test_… in test mode). The secret is returned once and stored only as a hash. Signed-in person only: API keys cannot mint API keys.

Auth
Dashboard session only
Scopes
keys:manage

Dashboard only: the signed-in person's session cookie, from the app's own origin. API keys get 403 forbidden.

Request body

application/jsonApiKeyCreate

  • namestringrequired1–80 chars
  • scopesenum[]optional≥ 1 items

    One ofdocuments:readdocuments:writeenvelopes:readenvelopes:writeenvelopes:sendenvelopes:cancelenvelopes:remindenvelopes:deletesessions:createartifacts:readapprovals:requestapprovals:readaudit:readwebhooks:managebilling:readseals:write

  • monthly_credit_limitinteger | nulloptional0–1000000

    Credits the key may commit per calendar month (UTC). null = no cap.

  • expires_in_daysintegeroptional1–730

    Omitted = never expires.

Responses

  • 201The new key with its secretapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403forbidden: an API key (only a signed-in person may do this), or a cross-site request. insufficient_scope: the person's role does not allow itError
  • 422invalid_request: the body or a parameter is invalid (details.issues lists the paths)Error

Update an API key

PATCH/api/v1/api-keys/{id}

Rename a key or change its monthly credit cap. Scopes cannot be changed; create a new key instead. Signed-in person only.

Auth
Dashboard session only
Scopes
keys:manage

Dashboard only: the signed-in person's session cookie, from the app's own origin. API keys get 403 forbidden.

Parameters

  • idstringin pathrequired

Request body (optional)

application/jsonApiKeyUpdate

  • namestringoptional1–80 chars
  • monthly_credit_limitinteger | nulloptional0–1000000

Responses

  • 200The keyapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403forbidden: an API key (only a signed-in person may do this), or a cross-site request. insufficient_scope: the person's role does not allow itError
  • 404not_found: also for resources of another workspace or of the other modeError
  • 422invalid_request: invalid body, or nothing to updateError

Revoke an API key

DELETE/api/v1/api-keys/{id}

The key stops working immediately. Signed-in person only.

Auth
Dashboard session only
Scopes
keys:manage

Dashboard only: the signed-in person's session cookie, from the app's own origin. API keys get 403 forbidden.

Parameters

  • idstringin pathrequired

Responses

  • 204Revoked
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403forbidden: an API key (only a signed-in person may do this), or a cross-site request. insufficient_scope: the person's role does not allow itError
  • 404not_found: also for resources of another workspace or of the other modeError

Sandbox

Test-mode helpers (the paths keep the name sandbox).

List test inbox emails

GET/api/v1/sandbox/inbox

Emails kept for this workspace in test mode instead of being delivered (invitations, one-time codes). Test mode only, signed-in person only.

Auth
Dashboard session only
Scopes
envelopes:read

Dashboard only: the signed-in person's session cookie, from the app's own origin. API keys get 403 forbidden.

Responses

  • 200Test inbox emailsapplication/json
  • 401unauthorized: missing, invalid, revoked or expired credentialsError
  • 403forbidden: an API key, or the caller is not in test modeError

Seals

Seal a self-sign record for a document you keep yourself. Only fingerprints are sent; nothing is stored. The signer's identity is not verified.

Seal a self-signed document

POST/api/v1/seals

Seals a self-sign record for a document you keep yourself and returns evidence.json and evidence.sig.json in the standard evidence format (schema typesign.self-sign-evidence/v0.1). Send fingerprints, never the document. Nothing is stored and no credits are charged. The signer's name is self-asserted and not verified, and the record says so. Your application must show the signer intent_text and collect their consent: never request a seal on a person's behalf. 600 per hour per API key. Where the server has Turnstile configured, a browser without an API key may send a Turnstile-Token header instead (only when the server has Turnstile configured, see GET /seals/anonymous; rate limited per address and per day).

Auth
API key (Bearer) or dashboard session
Scopes
seals:write

Request body

application/jsonSealCreate

A self-sign seal for a document you keep yourself (ADR 0012). Send fingerprints, never the document. The signer's name is self-asserted and not verified. Your application must show the signer the intent text and collect their consent itself: never request a seal on a person's behalf. Body at most 16 KB.

  • documentobjectrequired

    The PDF before signing.

    • sha256stringrequiredpattern ^[0-9a-f]{64}$
    • sizeintegerrequired≥ 1
    • page_countintegerrequired≥ 1
  • signed_documentobjectrequired

    The PDF after the signature was stamped into it, as it will be handed out.

    • sha256stringrequiredpattern ^[0-9a-f]{64}$
    • sizeintegerrequired≥ 1
  • signerobjectrequired
    • namestringrequired1–100 chars

      As typed by the signer. Leading and trailing spaces are removed.

    • signature_kindenumrequired

      One oftypeddrawn

  • fieldsobject[]required≤ 50 items

    What was placed and where. At least one signature.

    • typeenumrequired

      One ofsignaturedatetext

    • pageintegerrequired≥ 1
  • consentbooleanrequired

    Must be true: the signer accepted intent_text.

  • intent_versionenumrequired

    v2 is current. v1 is still accepted.

    One ofself-sign-intent/v1self-sign-intent/v2

  • intent_textstringrequired≤ 2000 chars

    Exactly the statement for intent_version. v2: I, {name}, have reviewed this document and agree to sign it electronically. My name is my own statement: my identity has not been checked. v1: I, {name}, have reviewed the document with SHA-256 {document.sha256} and I agree to sign it electronically. I understand that my typed or drawn signature is a visual representation, that my identity has not been verified (the name is my own statement), and that TypeSign receives only fingerprints of the document, never the document itself.

  • client_timestring<date-time>required

    When the signer signed, from their own clock. Recorded as reported.

Responses

  • 201The sealed recordapplication/json
  • 401unauthorized: no valid credentials, or a Turnstile-Token on a server that does not offer anonymous sealingError
  • 403insufficient_scope: the key lacks seals:write. forbidden: the bot check failed, or a cross-site requestError
  • 413payload_too_large: the body is larger than 16 KB. Send fingerprints, not the documentError
  • 422invalid_request: invalid body, or intent_text is not the exact statement for the name and intent_versionError
  • 429rate_limited: too many requests; the retry-after header says when to try againError
curl
curl -X POST "$BASE/seals" \
  -H "Authorization: Bearer $OSK" \
  -H "Content-Type: application/json" \
  -d '{"document":{"sha256":"…","size":1,"page_count":1},"signed_document":{"sha256":"…","size":1},"signer":{"name":"Ada Lovelace","signature_kind":"typed"},"fields":[{"type":"signature","page":1}],"consent":true,"intent_version":"self-sign-intent/v1","intent_text":"…","client_time":"…"}'

Check anonymous sealing

GET/api/v1/seals/anonymous

Whether this server accepts anonymous seals from browsers (Turnstile), and the site key and action to use. No authentication.

Auth
None

Responses

  • 200Whether anonymous sealing is offeredapplication/json
curl
curl "$BASE/seals/anonymous"

Public

No API key needed.

Get this OpenAPI document

GET/api/v1/openapi.json

The machine-readable description of the API, for code generators and tools. No authentication.

Auth
None

Responses

  • 200OpenAPI 3.1 documentapplication/json
curl
curl "$BASE/openapi.json"

Health

GET/api/health

For uptime checks. Runs a query against the database, so an outage is a 503 and not a green light. Returns no data about anyone. No authentication.

Auth
None

Responses

  • 200The server and its database answerapplication/json
  • 503status is error and database is unreachable: the database does not answerapplication/json
curl
curl "https://<your-host>/api/health"

Readiness

GET/api/ready

Answers when the database does. No authentication.

Auth
None

Responses

  • 200Readyapplication/json
curl
curl "https://<your-host>/api/ready"

Get the platform seal keys

GET/api/seal-keys

Public Ed25519 key(s) that seal evidence packages, with their trust status, plus the X.509 seal certificate chain (if configured), the timestamp authority and the transparency log's verifier key. A test key is labelled untrusted_test_key; a sandbox certificate is never trusted. Pin these from an independent channel before trusting them. No authentication.

Auth
None

Responses

  • 200The seal keysapplication/json
curl
curl "https://<your-host>/api/seal-keys"

Get the latest transparency log checkpoint

GET/api/transparency/checkpoint

Latest signed checkpoint of this server's transparency log of evidence manifest hashes (C2SP tlog-checkpoint signed note, text/plain). 404 if the server runs no log. No authentication.

Auth
None

Responses

  • 200Signed notetext/plain
  • 404not_found: the server runs no log, or the log is emptyError
curl
curl "https://<your-host>/api/transparency/checkpoint"

Get a transparency log checkpoint by tree size

GET/api/transparency/checkpoints/{size}

The signed checkpoint published for a tree size. No authentication.

Auth
None

Parameters

  • sizeintegerin pathrequired≥ 1

Responses

  • 200Signed notetext/plain
  • 404not_found: no checkpoint was published for this tree sizeError
curl
curl "https://<your-host>/api/transparency/checkpoints/…"

Get an inclusion proof

GET/api/transparency/proof/inclusion

RFC 6962 inclusion proof for a leaf index in a tree size (hex hashes). No authentication.

Auth
None

Parameters

  • indexintegerin queryrequired≥ 0
  • sizeintegerin queryrequired≥ 1

Responses

  • 200The proofapplication/json
  • 422invalid_request: the tree size or leaf index is out of rangeError
curl
curl "https://<your-host>/api/transparency/proof/inclusion?index=…&size=…"

Get a consistency proof

GET/api/transparency/proof/consistency

RFC 6962 consistency proof between two tree sizes: shows the log only grew. No authentication.

Auth
None

Parameters

  • fromintegerin queryrequired≥ 1
  • tointegerin queryrequired≥ 1

Responses

  • 200The proofapplication/json
  • 422invalid_request: a tree size is out of rangeError
curl
curl "https://<your-host>/api/transparency/proof/consistency?from=…&to=…"

List transparency log entries

GET/api/transparency/entries

Log entries (index and manifest SHA-256 only), for monitors that rebuild the tree. No authentication.

Auth
None

Parameters

  • startintegerin queryoptional≥ 0
  • limitintegerin queryoptional1–1000

Responses

  • 200Log entriesapplication/json
  • 422invalid_request: start is not a non-negative integerError
curl
curl "https://<your-host>/api/transparency/entries"

Download an artifact

GET/api/files/{id}

Follow a download_url from GET /envelopes/{id}/artifacts. The signed, short-lived URL is the credential; no API key is sent.

Auth
None

Parameters

  • idstringin pathrequired
  • expstringin queryrequired

    Expiry (unix seconds), part of the signed URL.

  • sigstringin queryrequired

    Signature, part of the signed URL.

Responses

  • 200The file. x-content-sha256 carries its SHA-256.application/pdfapplication/json
  • 403forbidden: the download link is invalid or has expiredError
  • 404not_found: also for resources of another workspace or of the other modeError
curl
curl "https://<your-host>/api/files/art_…?exp=…&sig=…" \
  -o signed.pdf

Signing page

Called by the signing page in the recipient's own browser. Listed for completeness: integrations never call these, and there is no API-key path to signing.

Get the signer view

GET/api/signer/{token}

What the recipient behind a signing link may see. Document details, fields and intent text only after email verification.

Auth
None; more is returned with a signer session (os_signer cookie)

Called by the signing page in the recipient's own browser. Not for API clients or agents: there is no API-key path to signing.

Parameters

  • tokenstringin pathrequired

    Capability token from the signing link.

Responses

  • 200Signer viewapplication/json
  • 404not_found: the signing link is not validError

Email a one-time code

POST/api/signer/{token}/otp

Sends a 6-digit code to the recipient's email. Rate limited. Same-origin browser requests only.

Auth
None

Called by the signing page in the recipient's own browser. Not for API clients or agents: there is no API-key path to signing.

Parameters

  • tokenstringin pathrequired

    Capability token from the signing link.

Responses

  • 200The code was sentapplication/json
  • 403forbidden: a cross-site requestError
  • 404not_found: the signing link is not validError
  • 409invalid_state: the document is no longer available for signing, or the recipient can no longer act on itError
  • 422invalid_request: a sender_link envelope uses no codesError
  • 429rate_limited: too many requests; the retry-after header says when to try againError

Verify the one-time code

POST/api/signer/{token}/verify

Checks the code and starts the signer session (os_signer cookie). Same-origin browser requests only.

Auth
None

Called by the signing page in the recipient's own browser. Not for API clients or agents: there is no API-key path to signing.

Parameters

  • tokenstringin pathrequired

    Capability token from the signing link.

Request body

application/json

  • codestringrequiredpattern ^\d{6}$

    Surrounding whitespace is ignored.

Responses

  • 200Verified; sets the os_signer cookieapplication/json
  • 401verification_failed: the code is wrong, used or expired, or the link was locked after too many wrong codesError
  • 403forbidden: a cross-site requestError
  • 404not_found: the signing link is not validError
  • 410expired: the signing link has expired or was replacedError
  • 422invalid_request: the body or a parameter is invalid (details.issues lists the paths)Error

Open a sender_link document

POST/api/signer/{token}/open

For envelopes with signer_verification: sender_link: starts the signer session (os_signer cookie) with the link alone. No code is involved; the evidence records that the platform checked no identity. 422 on an email_otp envelope. Same-origin browser requests only.

Auth
None

Called by the signing page in the recipient's own browser. Not for API clients or agents: there is no API-key path to signing.

Parameters

  • tokenstringin pathrequired

    Capability token from the signing link.

Responses

  • 200Opened; sets the os_signer cookieapplication/json
  • 403forbidden: a cross-site requestError
  • 404not_found: the signing link is not validError
  • 409invalid_state: the document is no longer available for signing, or the recipient can no longer act on itError
  • 410expired: the signing link has expired or was replacedError
  • 422invalid_request: an email_otp envelope asks for a one-time codeError
  • 429rate_limited: too many requests; the retry-after header says when to try againError

Get the document to sign

GET/api/signer/{token}/document

The PDF, for a verified recipient.

Auth
Signer session (os_signer cookie)

Called by the signing page in the recipient's own browser. Not for API clients or agents: there is no API-key path to signing.

Parameters

  • tokenstringin pathrequired

    Capability token from the signing link.

Responses

  • 200The PDFapplication/pdf
  • 401unauthorized: the recipient has not verified (or opened the link) in this browser yetError
  • 404not_found: the signing link is not validError
  • 410expired: the signing link has expired or was replacedError

Sign

POST/api/signer/{token}/sign

The verified recipient signs, in their own browser. Never call this on behalf of a person: there is no API-key or agent path to signing.

Auth
Signer session (os_signer cookie)

Called by the signing page in the recipient's own browser. Not for API clients or agents: there is no API-key path to signing.

Parameters

  • tokenstringin pathrequired

    Capability token from the signing link.

Request body

application/jsonSignerSign

Submitted by the recipient's own browser. The hashes and intent text must match what GET /signer/{token} returned after verification.

  • consenttruerequired
  • intent_textstringrequired≤ 2000 chars
  • document_sha256stringrequiredpattern ^[0-9a-f]{64}$
  • payload_hashstringrequiredpattern ^[0-9a-f]{64}$
  • field_valuesmap<string, string | boolean>optionaldefault {}
  • signatureobject | objectrequired

    Option 1

    • kind"typed"required
    • textstringrequired1–100 chars
    • fontenumoptional

      Signature face for the typed name, the same on screen and in the PDF. Default delafield.

      One ofdelafieldmuellerhoffalluraaurore

    Option 2

    • kind"drawn"required
    • image_png_base64stringrequired≤ 300000 chars

Responses

  • 200Signedapplication/json
  • 401unauthorized: the recipient has not verified (or opened the link) in this browser yetError
  • 403forbidden: a cross-site requestError
  • 404not_found: the signing link is not validError
  • 409invalid_state: the document can no longer be signed, the recipient already signed, or it is not their turn. conflict: the document changed since the page was loadedError
  • 410expired: the signing link has expired or was replacedError
  • 422invalid_request: invalid body, the intent text does not match, a required field is empty, or the signature image is not a PNGError

Decline

POST/api/signer/{token}/decline

The verified recipient declines, in their own browser.

Auth
Signer session (os_signer cookie)

Called by the signing page in the recipient's own browser. Not for API clients or agents: there is no API-key path to signing.

Parameters

  • tokenstringin pathrequired

    Capability token from the signing link.

Request body (optional)

application/json

  • reasonstringoptional≤ 500 chars

Responses

  • 200Declinedapplication/json
  • 401unauthorized: the recipient has not verified (or opened the link) in this browser yetError
  • 403forbidden: a cross-site requestError
  • 404not_found: the signing link is not validError
  • 409invalid_state: the recipient can no longer declineError
  • 410expired: the signing link has expired or was replacedError
  • 422invalid_request: the body or a parameter is invalid (details.issues lists the paths)Error

Dashboard sign-in

Passwordless sign-in for the dashboard. Same-origin browser requests only.

Request a sign-in link

POST/api/auth/login

Emails a single-use sign-in link. Same-origin browser requests only. Rate limited per email and per client. When the deployment has Turnstile configured (GET /auth/config returns a site key), turnstile_token from a solved widget with action login is required. Accounts are for people: an agent should send its user to the sign-in page, not sign in itself.

Auth
None

Called by the dashboard's sign-in page. Same-origin browser requests only.

Request body

application/json

  • emailstring<email>required≤ 254 chars
  • turnstile_tokenstringoptional≤ 2048 chars

Responses

  • 200The link was sentapplication/json
  • 403forbidden: a cross-site request, or the bot check is missing or failedError
  • 422invalid_request: the body or a parameter is invalid (details.issues lists the paths)Error
  • 429rate_limited: too many requests; the retry-after header says when to try againError

Sign-in form settings

GET/api/auth/config

The Turnstile site key the sign-in form must solve, or null when sign-in has no bot check.

Auth
None

Called by the dashboard's sign-in page. Same-origin browser requests only.

Responses

  • 200Sign-in form settingsapplication/json

Complete sign-in

POST/api/auth/callback

Exchanges the emailed token for a session cookie (os_session). Same-origin browser requests only.

Auth
None

Called by the dashboard's sign-in page. Same-origin browser requests only.

Request body

application/json

  • tokenstringrequired

Responses

  • 200Signed in; sets the os_session cookieapplication/json
  • 401verification_failed: the sign-in link is invalid, used or expiredError
  • 403forbidden: a cross-site requestError
  • 422invalid_request: the body or a parameter is invalid (details.issues lists the paths)Error

Sign out

POST/api/auth/logout

Revokes the session and clears the cookie. Same-origin browser requests only.

Auth
None

Called by the dashboard's sign-in page. Same-origin browser requests only.

Responses

  • 200Signed outapplication/json
  • 403forbidden: a cross-site requestError

Switch the dashboard between live and test mode

POST/api/auth/mode

Body {"mode": "test" | "live"}. Sets or clears the mode cookie for the signed-in session (ADR 0025). In test mode the dashboard shows only test envelopes, test keys and test credits, and all mail a workspace sends stays in the test inbox. API keys need no switch: an osk_test_ key always works in test mode. 422 (invalid_request) where the deployment has no test mode. Same-origin browser requests only.

Auth
None

Called by the dashboard's sign-in page. Same-origin browser requests only.

Responses

  • 200The mode now in useapplication/json
  • 401unauthorized: not signed inError
  • 403forbidden: a cross-site requestError
  • 422invalid_request: mode is not test or live, or the server has no test modeError