Quickstart — call the API from your server
Claim a sandbox, store the `esk_test_` key, confirm it, create a document from a template, and send it. Signing-session tokens use the same key. Webhooks are registered in the admin app.
Before you start
You need a terminal with `curl` and `jq`, plus an email inbox you control. The sandbox key is `esk_test_…`. A production key is `esk_live_…`. Send it as `Authorization: Bearer`. The tenant comes from the key, so do not send `x-tenant-id`.
A sandbox key includes `integrations:zapier` and `signing:write`. Upload, the envelope wizard, and webhook registration use the admin session after you sign in. Your server uses the key for the calls below.
Four server calls, then a webhook in the admin app
- 1
Claim your sandbox
POST /api/auth/register with `mode: sandbox`. The response includes a full `esk_test_…` key, shown once, plus `demoCustomerId`. When seeding succeeds it also includes `sampleTemplateId`.
- 2
Confirm the key
GET /api/v1/zapier/auth/test with the key. Expected output: HTTP 200 and `{ success: true, data: { tenantId, tenantName, zapierEnabled: true } }`.
- 3
Create a document and send it
POST /api/v1/zapier/actions/create-from-template with `sampleTemplateId`, then POST /api/v1/zapier/actions/send-for-signing with the returned `documentId`. The signer receives the link by email.
- 4
Register a webhook in Admin
Sign in and open Admin → Developer → Webhooks. Save the signing secret. Deliveries use `X-Endorsed-Signature`. The verification steps are on the webhooks guide. Inspect attempts in Admin → Developer → Console.
Step 1 — claim a sandbox
Prerequisites: an email address and an 8+ character password. Expected output: HTTP 201 with `data.sandbox.apiKey` starting `esk_test_`.
curl -sS -X POST https://api.endorsedsign.com/api/auth/register \
-H 'Content-Type: application/json' \
-d '{
"tenantName": "Acme Dev Sandbox",
"adminEmail": "you@acme.example",
"password": "your-strong-password",
"mode": "sandbox"
}' | tee sandbox.json | jq '.data.sandbox'
# → {
# "apiKey": "esk_test_…",
# "keyPrefix": "esk_test_…",
# "keyId": "…",
# "scopes": ["signing:write", "integrations:zapier", …],
# "demoCustomerId": "sandbox-signer-acme-dev-sandbox",
# "demoCustomerName": "Sandbox Signer",
# "sampleTemplateId": "…",
# "expiresAt": "2026-…"
# }
export ENDORSED_API_KEY="$(jq -r '.data.sandbox.apiKey' sandbox.json)"
export ENDORSED_TEMPLATE_ID="$(jq -r '.data.sandbox.sampleTemplateId // empty' sandbox.json)"Store the key in your server secret manager. Email verification gates the admin console. The key works for the calls on this page as soon as it is issued.
Step 2 — confirm the key
Prerequisites: `$ENDORSED_API_KEY` from step 1. The sandbox key already has `integrations:zapier`. Expected output: HTTP 200 and your tenant name.
curl -sS https://api.endorsedsign.com/api/v1/zapier/auth/test \
-H "Authorization: Bearer $ENDORSED_API_KEY" \
| jq '{ success, tenantId: .data.tenantId, tenantName: .data.tenantName, zapierEnabled: .data.zapierEnabled }'A missing or malformed key is 401. A valid key without `integrations:zapier` is 403. Do not send `X-Data-Mode`: `esk_test_` already selects test data.
Step 3 — create a document from the sandbox template and send it
Prerequisites: `$ENDORSED_API_KEY` and a non-empty `$ENDORSED_TEMPLATE_ID`. If `sampleTemplateId` was null, create a template in the admin app and paste its id. Expected output: HTTP 201 with `data.documentId`, then a send response with `status: "link-sent"`.
curl -sS -X POST https://api.endorsedsign.com/api/v1/zapier/actions/create-from-template \
-H "Authorization: Bearer $ENDORSED_API_KEY" \
-H 'Content-Type: application/json' \
-d "{
\"templateId\": \"$ENDORSED_TEMPLATE_ID\",
\"recipientEmail\": \"you@acme.example\",
\"recipientName\": \"Sandbox Signer\"
}" | tee created.json | jq '.data | { documentId, customerId, status }'
export ENDORSED_DOCUMENT_ID="$(jq -r '.data.documentId' created.json)"
curl -sS -X POST https://api.endorsedsign.com/api/v1/zapier/actions/send-for-signing \
-H "Authorization: Bearer $ENDORSED_API_KEY" \
-H 'Content-Type: application/json' \
-d "{
\"documentId\": \"$ENDORSED_DOCUMENT_ID\",
\"channel\": \"email\",
\"subject\": \"Please sign\"
}" | jq '.data | { documentId, status, channel, shareLinkExpiresAt }'The signing link is emailed to `recipientEmail`. The JSON response carries the document id, status, and link expiry. Open the email to finish the signature, then watch `document.signed` on a webhook you registered in Admin.
Mint a signing-session token
Prerequisites: `$ENDORSED_API_KEY` with `signing:write` (included on the sandbox key) and a signing session id from a session you already created. Expected output: HTTP 201 with a one-time `st_…` token.
curl -sS -X POST "https://api.endorsedsign.com/api/v1/signing-sessions/$ENDORSED_SESSION_ID/tokens" \
-H "Authorization: Bearer $ENDORSED_API_KEY" \
-H 'Content-Type: application/json' \
-d '{ "scope": "embed", "ttl_seconds": 300 }' \
| jq '{ token, expires_at, scope }'Hand `st_…` to the browser embed. Keep `esk_…` on the server. Redeem instructions are on the Elements embed page.
When something goes wrong
Ready to go deeper?
Once you have a document signed end-to-end, plug into the surface areas below for the next slice of the integration.