docs / api

API reference

API-first document signing: simple electronic signatures (email OTP) with a sealed evidence package. 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. Agents can create drafts and request approval, but can never sign or approve on behalf of a person. Which path to offer your user: if they only need to sign a PDF themselves and do not want an account, send them to /sign-pdf (no account, nothing stored; they sign it themselves). If someone must sign, or you should prepare everything, the user creates an account at /login and gives you an API key from Developers: then you upload the PDF, place fields (/docs/fields), send, and hand out the signing links. Free workspaces have storage and upload limits (GET /storage, /limits). Agent guide: /llms.txt. 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)TypeSign API 0.1.0-scaffold · 61 operations · for code generators, Postman and other tools
All endpoints

Base URL

All API-key endpoints live under /api/v1 on the host where TypeSign 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" }
  }
}
  • errorobjectoptional
    • codestringrequired

      Stable, machine-readable code such as insufficient_scope or idempotency_key_reused. Branch on this, not on the message.

    • 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.

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
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. TypeSign 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 and the workspace. Useful to check a key. Needs no particular scope.

Auth
API key (Bearer) or dashboard session

Responses

  • 200Principalapplication/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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

  • 200{ok: true}application/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError

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 typesign.dev 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; see /limits). pages gives each page's displayed size in PDF points, which you need to convert point coordinates into field positions (see /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
  • 401Missing or invalid credentialsError
  • 403storage_limit_exceeded: the upload would take the workspace over its storage limit (see GET /storage), or another 403 errorError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 413The PDF is larger than 20 MBError
  • 422Invalid requestError
  • 429Rate limitedError
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
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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

  • 200Envelopes {data, next_cursor}application/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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_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

      Receives the invitation and the one-time code.

  • 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

  • 201Envelopeapplication/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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

  • 200Envelopeapplication/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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

  • 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

      Receives the invitation and the one-time code.

  • 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

  • 200Envelopeapplication/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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 sandbox 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
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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

      Receives the invitation and the one-time code.

Responses

  • 200Envelopeapplication/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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

  • 200Envelopeapplication/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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

  • 200Quoteapplication/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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.

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

  • 200Sent envelope (test mode: includes sandbox_signing_links)application/json
  • 400Idempotency-Key header missingError
  • 401Missing or invalid credentialsError
  • 402Not enough credits, or the API key's monthly cap would be exceededError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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

  • 200Envelopeapplication/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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

Re-sends the invitation to recipients who have not signed yet. At most once per hour per envelope (429 otherwise).

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

Parameters

  • idstringin pathrequired

Responses

  • 200Reminded recipientsapplication/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
curl
curl -X POST "$BASE/envelopes/env_…/reminders" \
  -H "Authorization: Bearer $OSK"

Create an embedded signing URL

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

A short-lived (30 minute) signing URL for one recipient whose turn it is, to open in your own app. The signer still verifies their email with a one-time code.

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

  • 201Signing URL {recipient_id, signing_url, expires_at}application/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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

  • 200Envelopeapplication/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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

  • 200Artifacts {data: [{id, kind, sha256, size, content_type, download_url}]}application/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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

  • 200Audit events {data}application/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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

  • 201Approval request {approval_id, approval_url, payload_hash}application/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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.

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

Responses

  • 200Pending approvals {data}application/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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

  • 200Approvalapplication/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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

  • 200Approval decisionapplication/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError

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

  • 200Approval decisionapplication/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError

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

  • 200Endpoints {data}application/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
curl
curl "$BASE/webhooks" \
  -H "Authorization: Bearer $OSK"

Create a webhook endpoint

POST/api/v1/webhooks

TypeSign 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 (typesign 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

  • 201Endpoint with secretapplication/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
curl
curl -X POST "$BASE/webhooks" \
  -H "Authorization: Bearer $OSK" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/webhooks/typesign"}'

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
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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

  • 200Deliveries {data}application/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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

  • 202{queued: true}application/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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

  • 200CreditBalance {balance, reserved, available, credits_per_envelope}application/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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

  • 200Ledger entries {data, next_cursor}application/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError
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

  • 200Credit balanceapplication/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError

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
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError

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

  • 201API key with secretapplication/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError

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

  • 200API keyapplication/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError

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
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError

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 emails {data}application/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError

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

  • 201{object: 'seal', evidence_id, manifest, signature, files: {'evidence.json', 'evidence.sig.json'}}application/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 413Body larger than 16 KBError
  • 422Invalid requestError
  • 429Rate limitedError
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

  • 200{enabled, turnstile_site_key, turnstile_action, environment, seal: {kid, trust}}application/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"

Readiness

GET/api/ready

Answers when the database does. No authentication.

Auth
None

Responses

  • 200{status, environment}application/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

  • 200{keys, note, certificate, timestamp_authority, transparency_log}application/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 (also returned for other tenants' resources)Error
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 (also returned for other tenants' resources)Error
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

  • 200{leaf_index, tree_size, root_hash, inclusion_proof}application/json
  • 422Invalid requestError
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

  • 200{from, to, consistency_proof}application/json
  • 422Invalid requestError
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

  • 200{leaf_prefix, entries}application/json
  • 422Invalid requestError
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
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
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 (also returned for other tenants' resources)Error

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

  • 200{sent_to, expires_in_seconds}application/json
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 429Rate limitedError

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

  • 200{verified: true}application/json
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError

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
  • 401Missing or invalid credentialsError
  • 404Not found (also returned for other tenants' resources)Error

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

  • 200Signing resultapplication/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError

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

  • 200Decline resultapplication/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 404Not found (also returned for other tenants' resources)Error
  • 409Invalid state transition, conflict or approval problemError
  • 422Invalid requestError
  • 429Rate limitedError

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 /login, 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

  • 200{ok: true}application/json
  • 403Insufficient scope, forbidden or environment mismatchError
  • 422Invalid requestError
  • 429Rate limitedError

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

  • 200{turnstile_site_key: string | null, turnstile_action: "login"}application/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

  • 200{ok: true}; sets the os_session cookieapplication/json
  • 403Insufficient scope, forbidden or environment mismatchError
  • 422Invalid requestError

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

  • 200{ok: true}application/json
  • 403Insufficient scope, forbidden or environment mismatchError

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

  • 200{mode}application/json
  • 401Missing or invalid credentialsError
  • 403Insufficient scope, forbidden or environment mismatchError
  • 422Invalid requestError