LedgerSign Public API · v1
Not connected
Developer guide

API integration walkthrough

A hands-on, click-through tour of the LedgerSign Public API. Enter your base URL and API key above, then run each step — the output of one step (template → document → signing URL) flows into the next, and every button makes the real call so you see the exact request and response.

Step 1

Discover your templates

Documents are built from templates. Fetch them to get a template_id and the signer roles you'll map to.

GET /api/v1/templates
→ select one to auto-fill Step 2
Step 2

Create a document & send it

Map each template role to a signer. With send_immediately on, the response returns per-recipient signing URLs.

POST /api/v1/documents
signers — one per template role
Tip: “View fields” on a template in Step 1 lists the field_identifier keys you can set here.
Step 3

Sign the document

Each recipient gets FRONTEND_URL/sign/{token}. Email or embed them in your product — here you can sign one inline.

Step 4

Check signing status

Poll the document for lifecycle status, per-recipient progress, and the signed-PDF URL once completed.

GET /api/v1/documents/{document_id}
Step 5

Subscribe to webhooks

Skip polling — register a URL and we POST you an event when things change. The signing secret is shown only at creation.

POST /api/v1/webhooks
events * — pick at least one
🔑 Signing secret — shown once, save it now
Verify deliveries by recomputing HMAC-SHA256(raw_body, secret) and comparing to the X-Webhook-Signature header.
📦
What a delivery looks like. LedgerSign POSTs to your url:
{
  "event": "document.completed",
  "timestamp": "2026-06-14T14:32:08.512345",
  "data": { /* event-specific payload */ }
}
Headers: X-Webhook-Event, X-Webhook-Timestamp (unix), X-Webhook-Signature (HMAC-SHA256 of raw body), User-Agent: LedgerSign-Webhook/1.0. Retries up to 3× on non-2xx.

Verify signatures

Recompute the HMAC over the raw body (not parsed JSON) and compare with X-Webhook-Signature.

Idempotency

Retries can re-deliver — dedupe on document_id + event and respond 2xx fast.

8 valid events

document.created/sent/viewed/signed/completed/expired + recipient.viewed/signed.