Clinch API v1
Contract and e-signature API
Create a contract from your text or one of 50+ templates, send it for signature, take a deposit when the client signs, then invoice. One REST API, the same contracts your clients sign from their phone without an account.
Authentication
Create a key in Settings → API and send it as a Bearer token. Keys are stored hashed and shown once. Free plan: 1 key and 50 calls every 30 days. Pro: unlimited calls, up to 10 keys. Every plan: 60 requests per minute.
Authorization: Bearer clk_…
Send a contract for signature
One call drafts it from a template and emails the signing link. Pass text instead of template to use your own wording; omit signers to keep a draft you finish in the app.
curl -X POST https://clinch.lumnika.com/api/v1/documents \
-H "Authorization: Bearer clk_..." \
-H "Content-Type: application/json" \
-d '{
"title": "Website redesign",
"template": "web-design-contract",
"signers": [{ "name": "Jamie Client", "email": "jamie@example.com" }],
"deposit_cents": 50000
}'Issue an invoice with a pay link
curl -X POST https://clinch.lumnika.com/api/v1/invoices \
-H "Authorization: Bearer clk_..." \
-H "Content-Type: application/json" \
-d '{
"client_name": "Jamie Client",
"client_email": "jamie@example.com",
"currency": "usd",
"items": [{ "description": "Design sprint", "quantity": 1, "unit_cents": 150000 }]
}'Endpoints
Base URL https://clinch.lumnika.com/api/v1. Errors are JSON: {"error":{"code","message"}}.
- GET
/meCheck the API key
- GET
/documentsList documents
- POST
/documentsCreate a contract (and optionally send it for signature)
Pass exactly one of `text` (your contract, paragraphs separated by blank lines) or `template` (a slug from /templates). With `signers` the contract is sent by email in the same call; without, it stays a draft you can edit in the app.
- GET
/documents/{id}Get a document
- POST
/documents/{id}/sendSend a draft for signature
- GET
/invoicesList invoices
- POST
/invoicesCreate an invoice with a pay link
- GET
/clientsList clients (everyone you sent a document to)
- GET
/webhooksList webhook subscriptions
- POST
/webhooksSubscribe a URL to events (Pro)
Each delivery is a POST with JSON `{id, event, created_at, data}` and header `X-Clinch-Signature: t=<unix>,v1=<hex HMAC-SHA256(secret, t + '.' + body)>`.
- DELETE
/webhooks/{id}Remove a webhook subscription
Webhooks
Subscribe with POST /webhooks or in Settings → Integrations (Pro). Events: contract.signed, invoice.paid, proposal.accepted, inquiry.created, booking.created. Each delivery is signed with X-Clinch-Signature: t=…,v1=HMAC-SHA256(secret, t.body).
AI agents: pay per contract with x402
No account and no API key: an agent sends a contract for signature for 0.5 USDC on Base per document. POST /api/x402/sign with {title, text, signers:[{name,email}], from_name, message?}: the first reply is an x402 v1 402 with the payment terms; resend with X-PAYMENT and you get 201 with each signer's sign_url and a free status_url. Content refused by moderation or a failed send is not charged. Catalog: GET /api/x402.
curl -X POST https://clinch.lumnika.com/api/x402/sign \
-H "Content-Type: application/json" \
-d '{"title":"Web Design Agreement","from_name":"Acme Studio","text":"Scope: ...\n\nPayment: ...","signers":[{"name":"Dana Lee","email":"dana@client.com"}]}'
# -> 402 {x402Version:1, accepts:[...]} ; pay and resend with X-PAYMENT -> 201 {sign_url, status_url}No-code
Using n8n, Make or Zapier? Import the OpenAPI spec as an HTTP connection, or see the integration recipes.