developers

Send documents for signature from your code, or from an AI agent.

A REST API, signed webhooks and an MCP server. Your software prepares and sends the document; Authii emails each signer; each signer signs with their own passkey. Software can send. Only a person can sign.


quick start

One request sends a PDF.

Create an API key in Settings, then post a PDF and the people who should sign it:

curl https://authii.com/api/v1/documents \
  -H "Authorization: Bearer $AUTHII_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: nda-sam-2026-11" \
  -d '{
    "name": "NDA",
    "pdfBase64": "'"$(base64 < nda.pdf | tr -d '\n')"'",
    "signers": [{ "email": "sam@example.com", "name": "Sam Lee" }]
  }'
HTTP/1.1 201 Created

{
  "id": "42de2646-e091-4e0f-bce0-eb9c84b81899",
  "status": "awaiting_signatures",
  "signers": [{ "email": "sam@example.com", "status": "pending" }],
  "createdAt": "2026-11-03T16:38:44.378Z"
}

Authii adds a Signatures page to the end of the PDF with one box per signer, then emails each of them a link. They open it, draw or type their signature into their box and confirm with their passkey. When the last person signs, Authii seals the PDF: every signature, its certificate and an RFC 3161 timestamp go into the file, which verifies offline in any PDF reader. A document.sealed webhook tells you it is ready.


authentication

API keys, one organisation each.

An organisation admin creates keys in Settings, under API keys. The key is shown once; Authii keeps only a hash of it. Send it on every request:

Authorization: Bearer ak_live_...

A key can do anything the API offers for its organisation: send, list, read, download and revoke any of its documents, and manage its webhooks. It cannot sign. It acts for the admin who created it: documents it sends are recorded as sent by that admin, and if they leave the organisation or stop being an admin, the key stops working. Settings shows who created each key. Revoke a key there at any time; webhooks registered with it stop receiving events.

Keep keys on your server. The API does not answer browser requests from other sites (there are no CORS headers), and it never looks at Authii session cookies.


documents

Send, follow, download, revoke.

Every request and response is JSON unless noted. Every call is limited to your key's organisation: a document from another organisation is simply not found.

POST/api/v1/documents

Send a PDF for signature. Returns 201 with the new document.

Field
Type
name
string, required
Title the signers see. Up to 200 characters.
pdfBase64
string
The PDF, base64-encoded. Send this or pdfUrl.
pdfUrl
string
A public https URL to fetch the PDF from instead. Private and internal addresses, and Authii's own, are refused.
signers
array, required
1 to 50 of { "email", "name" }; name is optional and printed on the Signatures page.
signingOrder
string
parallel (default): anyone can sign first. sequential: signers sign in list order.
message
string
Optional plain-text note included in the email. Up to 500 characters.

Send an Idempotency-Key header (any unique string up to 255 characters) to retry safely: a repeat with the same key and body returns the original document, with the header Idempotent-Replayed: true, instead of sending it twice. The same key with a different body is refused. Keys are remembered for 24 hours.

Documents sent through the API use standard encryption: the PDF is encrypted at rest and Authii holds the key, which is what lets it seal the PDF for you. End-to-end encrypted documents, where Authii never holds the key, can only be sent from the website.

GET/api/v1/documents

Your organisation's documents, newest first. Query parameters: limit (1 to 100, default 20), status and cursor. Pass the nextCursor from one page to get the next; it is null on the last page.

curl "https://authii.com/api/v1/documents?limit=20&status=awaiting_signatures" \
  -H "Authorization: Bearer $AUTHII_API_KEY"

{ "documents": [ ... ], "nextCursor": "MjAyNi0xMS0wM1QxNjozODo0NC4zNzgxMjNafDQyZGUy..." }

GET/api/v1/documents/:id

One document: its status, each signer's status and when it was sealed.

curl https://authii.com/api/v1/documents/42de2646-e091-4e0f-bce0-eb9c84b81899 \
  -H "Authorization: Bearer $AUTHII_API_KEY"
{
  "id": "42de2646-e091-4e0f-bce0-eb9c84b81899",
  "name": "NDA",
  "status": "sealed",
  "signingOrder": "parallel",
  "signers": [
    { "email": "sam@example.com", "status": "signed", "signedAt": "2026-11-03T16:40:12.004Z" }
  ],
  "createdAt": "2026-11-03T16:38:44.378Z",
  "sealedAt": "2026-11-03T16:40:12.031Z",
  "signedPdfAvailable": true,
  "signedPdfStatus": "available",
  "revokedAt": null,
  "revocationReason": null,
  "verifyUrl": "https://authii.com/v/0xed880cf37e3f..."
}
status
Meaning
awaiting_signatures
Sent; at least one signer has not signed yet.
sealed
Everyone has signed and the document is sealed.
revoked
Withdrawn before everyone signed, or revoked after sealing.
rejected
A signer declined.

GET/api/v1/documents/:id/signed.pdf

The sealed PDF (application/pdf). Answers 409 not_sealed until everyone has signed, then 409 sealing_in_progress, with a Retry-After header, while the sealed PDF is produced. Waiting for the document.sealed webhook avoids both. In the rare case that Authii cannot produce it, the answer is 409 seal_failed and the document's signedPdfStatus is failed: retrying won't help, so contact us.

curl -o nda.sealed.pdf https://authii.com/api/v1/documents/42de2646-e091-4e0f-bce0-eb9c84b81899/signed.pdf \
  -H "Authorization: Bearer $AUTHII_API_KEY"

POST/api/v1/documents/:id/revoke

Before everyone has signed, this withdraws the request and the signing links stop working. After sealing, it marks the document revoked: the signatures stay valid as a record of what happened, and the verify page shows that the document was revoked. The reason is optional.

curl https://authii.com/api/v1/documents/42de2646-e091-4e0f-bce0-eb9c84b81899/revoke \
  -H "Authorization: Bearer $AUTHII_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "reason": "Superseded by v2" }'

webhooks

Hear about signatures as they happen.

Register an https endpoint in Settings, or with the API. Authii then posts an event to it:

Event
When
document.signed
A signer has signed. data.signer says who.
document.sealed
Everyone has signed and the sealed PDF is ready to download.
document.revoked
The document was withdrawn or revoked.
POST /your/webhook HTTP/1.1
Content-Type: application/json
Authii-Signature: t=1793723927,v1=f386175e0c...
Authii-Event-Id: evt_c762cad561a29932a07c0c358cd33e3a
Authii-Event-Type: document.signed

{
  "id": "evt_c762cad561a29932a07c0c358cd33e3a",
  "type": "document.signed",
  "created": 1793723927,
  "data": {
    "document": { "id": "42de2646-...", "status": "awaiting_signatures", "signers": [ ... ] },
    "signer": { "signerIndex": 0, "email": "sam@example.com", "status": "signed", "signedAt": "..." }
  }
}

POST/api/v1/webhooks

Body { "url", "events", "description" }; events defaults to all three. The response includes the endpoint's signing secret, shown only this once.

curl https://authii.com/api/v1/webhooks \
  -H "Authorization: Bearer $AUTHII_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://example.com/authii", "events": ["document.sealed"] }'

GET/api/v1/webhooks

Your endpoints (without their secrets). GET /api/v1/webhooks/:id returns one.

DELETE/api/v1/webhooks/:id

Stop sending events to an endpoint.

Checking the signature

Every request carries Authii-Signature: t=<unix seconds>,v1=<hex>, where the hex is HMAC-SHA256 of <t>.<raw body> keyed with the endpoint's secret. Recompute it over the raw body, compare in constant time and reject timestamps more than five minutes old:

import { createHmac, timingSafeEqual } from "node:crypto";

// rawBody: the exact bytes Authii sent, before any JSON parsing.
export function verifyAuthiiSignature(rawBody, header, secret, toleranceSeconds = 300) {
  const parts = Object.fromEntries(
    (header ?? "").split(",").map((kv) => kv.split("=", 2).map((s) => s.trim()))
  );
  const t = Number(parts.t);
  if (!Number.isInteger(t) || Math.abs(Date.now() / 1000 - t) > toleranceSeconds) return false;
  const expected = createHmac("sha256", secret).update(`${t}.${rawBody}`).digest();
  const given = Buffer.from(parts.v1 ?? "", "hex");
  return given.length === expected.length && timingSafeEqual(given, expected);
}

// Express: app.post("/authii", express.raw({ type: "application/json" }), (req, res) => {
//   if (!verifyAuthiiSignature(req.body.toString("utf8"), req.get("Authii-Signature"), process.env.AUTHII_WEBHOOK_SECRET))
//     return res.sendStatus(400);
//   const event = JSON.parse(req.body);
//   ...
//   res.sendStatus(200);
// });

Answer with any 2xx status within three seconds. A failed delivery is retried twice within a few seconds and not after that, so treat webhooks as a prompt and the API as the record: if your endpoint was down, list your documents to catch up. Use Authii-Event-Id to ignore an event you have already handled. A webhook registered with an API key stops when that key is revoked.


mcp

Let an AI agent send documents for signature.

Authii runs a Model Context Protocol server at https://authii.com/mcp (Streamable HTTP), using the same API key. An agent can send a PDF, follow its progress, fetch the sealed PDF and revoke it. It cannot sign: each signature still needs the signer's own passkey, on their own device.

Tool
What it does
send_for_signature
Send a PDF (base64 or a public URL) to one or more signers.
get_document_status
Status of a document and of each signer.
list_documents
The organisation's documents, newest first.
download_signed_pdf
The sealed PDF, once everyone has signed.
revoke_document
Withdraw a request, or revoke a sealed document.

Claude Code

claude mcp add --transport http authii https://authii.com/mcp \
  --header "Authorization: Bearer ak_live_..."

Claude Desktop

Add this to claude_desktop_config.json (Settings, Developer, Edit Config) and restart Claude. It uses mcp-remote to pass your key, so you need Node.js installed.

{
  "mcpServers": {
    "authii": {
      "command": "npx",
      "args": [
        "-y", "mcp-remote", "https://authii.com/mcp",
        "--header", "Authorization:${AUTHII_AUTH}"
      ],
      "env": { "AUTHII_AUTH": "Bearer ak_live_..." }
    }
  }
}

Other clients

Any client that supports remote MCP servers over HTTP with custom headers, such as Cursor or VS Code, takes the URL and an Authorization header. Most read a file like this:

{
  "mcpServers": {
    "authii": {
      "type": "http",
      "url": "https://authii.com/mcp",
      "headers": { "Authorization": "Bearer ak_live_..." }
    }
  }
}

To try the server by hand:

curl https://authii.com/mcp \
  -H "Authorization: Bearer $AUTHII_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/list" }'

errors

One error shape everywhere.

Failures use the HTTP status that fits and a body you can branch on:

{ "error": { "code": "not_found", "message": "No document with that id." } }
Status
code
Meaning
400
invalid_request
A field is missing or wrong; the message says which.
400
invalid_json
The body is not valid JSON.
401
unauthorized
No API key, or a revoked or unknown one.
403
forbidden
The key's creator is no longer an admin of this organisation.
404
not_found
No such document or webhook in your organisation, or no such endpoint.
405
method_not_allowed
GET or DELETE on /mcp: the MCP server takes POST only.
409
not_sealed
signed.pdf before everyone has signed.
409
sealing_in_progress
signed.pdf while the sealed PDF is being produced.
409
seal_failed
Authii could not produce the sealed PDF. Contact us.
409
already_revoked
The document is already revoked.
409
idempotency_in_progress
A request with this Idempotency-Key is still running.
409
end_to_end_encrypted
signed.pdf for an end-to-end document sent from the website: Authii can't decrypt it.
409
limit_reached
Your organisation already has the most webhook endpoints allowed (10).
409
conflict
The document can't be revoked in its current state.
413
pdf_too_large
The PDF is over 10 MB, or the request body is too large.
422
invalid_pdf
The file is not a readable PDF, or is password-protected.
422
pdf_url_rejected
pdfUrl is not a public https address.
422
pdf_fetch_failed
pdfUrl could not be downloaded, whatever the reason.
422
idempotency_key_reused
The Idempotency-Key was used with a different body.
429
quota_exceeded
Your organisation's daily API document allowance is used up; see Retry-After.
500
internal_error
Our fault. Retry with the same Idempotency-Key.
503
service_unavailable
Document storage is briefly unavailable. Retry with the same Idempotency-Key.

limits

The numbers.

PDF size
10 MB
Documents sent through the API
50 per organisation in any 24 hours
Message to signers
500 characters, plain text
Signers per document
50
Signing links
Valid for 14 days
Webhook endpoints
10 per organisation
Active API keys
20 per organisation
Idempotency keys
Remembered for 24 hours

Questions, or a limit that gets in your way? Get in touch.