Agreements
as code.
Add document signing to any app, workflow or AI agent. Upload a PDF, send a signing link, get a webhook, and receive a sealed evidence package anyone can verify without trusting us. Use it here, or self-host the same code.
No card. Free envelopes, and a test mode that emails nobody.
try it · sign a pdf now
Sign a PDF in your browser
Your file never leaves your browser. Nothing is sent or stored.
- envelope.state
- draft→
- pending_approval→
- approved→
- sent→
- in_progress→
- finalizing→
- completed
- | declined · canceled · expired
01 · the api
Three requests and a webhook.
Upload a PDF, create an envelope, send it, and get a signed webhook when it completes. Plain HTTP and JSON. The API reference has every endpoint.
$ curl $BASE/v1/documents \
-H "Authorization: Bearer $OSK" -F file=@nda.pdf
→ {"version_id":"ver_8f2kq…","page_count":2}
$ curl $BASE/v1/envelopes \
-H "Authorization: Bearer $OSK" -d @envelope.json
→ {"id":"env_gje7r…","state":"draft"}
$ curl -X POST $BASE/v1/envelopes/env_gje7r…/send \
-H "Authorization: Bearer $OSK" \
-H "Idempotency-Key: $(uuidgen)"
→ {"state":"sent","recipients":[…]}02 · run it
From clone to signed PDF in about a minute.
The server is one Node process with a SQLite file, or a Cloudflare Worker with D1 and R2: same code, same API, same evidence format. Your own stack only needs HTTP. The standalone server is a local sandbox: every email stays in a test inbox. The dashboard runs in the web app.
$ git clone https://github.com/typesign-dev/typesign.git typesign && cd typesign
$ pnpm install && pnpm packages:build
$ alias typesign="node packages/cli/dist/typesign.mjs"
$ typesign serve # API + signing page on SQLite, port 8080
$ typesign send ./nda.pdf --to dev@example.com
$ typesign download env_… && typesign verify env_… --key-from http://localhost:8080- pnpm check typecheck, lint, tests (core, flow, security, API, SDK, CLI, MCP) and package builds
- pnpm preview the production Worker in workerd on :8787, cron trigger included
- /dev/mailbox every email the local instance would send, sign-in links included
- /docs/api the API reference, generated from the OpenAPI document
03 · developer experience
The boring parts, done properly.
REST, not a widget
Documents, envelopes, recipients and fields as plain JSON resources. OpenAPI 3.1, consistent errors with request ids, cursor pagination.
Retry without fear
Sends require an idempotency key. Replays return the original response; a different body with the same key is rejected.
Signed webhooks
HMAC over timestamp and raw body, retries at 1m → 24h, delivery log and replay from the dashboard.
Test mode, same URL
A test key keeps everything apart from live: no email reaches anyone, signing links come back in the API response, test credits are free.
Agent-safe
Agents draft, quote and request approval. Only a human can approve, and approval binds to the exact payload hash.
Verifiable offline
Each completed envelope ships a sealed manifest and hash-chained audit. Verify in the browser or in your own code.
04 · evidence
Proof you can carry out of the building.
A signature is only as good as what you can show later. Every envelope ends with signed.pdf, evidence.json and an Ed25519 seal. The verifier reports integrity, key trust and identity separately, and an untrusted key is never shown as a green check.
{
"schema": "typesign.evidence/v0.1",
"evidence_id": "evd_pbdcf1hpsemwet21wqy5a3kwhj",
"envelope": { "id": "env_gje7r…", "payload_hash": "5ec1c573dcf7b7ff…" },
"documents": {
"original": { "sha256": "67c6370bad877743…", "page_count": 2 },
"signed": { "sha256": "d508d73f7312b7c1…" }
},
"recipients": [{
"email": "customer@example.com",
"method": "email_otp",
"intent_text": "I have reviewed the document … and agree to sign …",
"signed_at": "2026-12-04T12:54:31Z"
}],
"audit": { "event_count": 6, "head_hash": "4fc7386480b001d1…" },
"seal": { "alg": "Ed25519", "trust": "self_managed_key" }
}- ✓sealEd25519 signature over manifest
- ✓original.pdfsha256 matches manifest
- ✓signed.pdfsha256 matches manifest
- ✓audit chain6 events, hash chain intact
- !key trustself-managed key → INDETERMINATE
- iidentityemail_otp (simple electronic signature)
05 · ai agents
Agents prepare. Humans sign.
Give an agent a key and it can upload, draft, quote and ask for approval. It can never approve or sign. The scope doesn't exist for keys, and an approval is single-use, bound to the payload hash and stale the moment anything changes.
- ✓documents:write · envelopes:write · approvals:request
- ✗approvals:decide
- ✗sign on behalf of a recipient
Start from /llms.txt, or run the MCP server: it has no tool that approves or signs.
{
"approval_id": "apr_k2m9x…",
"state": "pending",
"payload_hash": "5ec1c573dcf7b7ff08cf…",
"approval_url": "https://…/app/approvals/apr_k2m9x…"
}06 · open source
Read every line that touches your agreements.
Small core on purpose: a state machine, a hash-chained audit trail and an evidence format, with WebCrypto and pdf-lib doing the hard parts. Architecture decisions are written down as ADRs.
typesign/
├── src/core/ canonical JSON, crypto, state machine, evidence
├── src/server/services/ one service layer for the UI and the API
├── src/server/api/ Hono app mounted at /api, OpenAPI 3.1
├── src/node/ Node adapter: SQLite, files, standalone server
├── src/app/ web app: dashboard, signer page, verifier, docs
├── packages/server/ build of the standalone server (one file)
├── packages/cli/ typesign: serve, send, download, verify offline
├── packages/sdk*/ SDKs: TypeScript, Python, Go
├── packages/mcp/ MCP server for agents (no approve/sign tools)
├── spec/evidence/ evidence format and test vectors
├── drizzle/migrations/ SQLite schema (D1, libSQL, node:sqlite)
├── docs/adr/ why things are the way they are
├── tests/ flow, security and API tests
└── worker.ts Worker entry + cron triggerSend your first envelope.
Sign in with your email address and get a workspace with free envelopes and an API key.
Honest scope: this build creates simple electronic signatures (SES) verified by an email one-time code and sealed with a key we manage ourselves, not a qualified certificate. It does not claim advanced or qualified signatures (AES/QES), has no BankID yet, and has not had an independent security or legal review.