Run this flow in ZapSign Builders — the interactive REST API playground. Open in Builders →
No real documents will be created or signed. Generate your token at sandbox.zapsign.com.br → Settings → Integrations → API. When ready for production, switch the base URL and token to your account on app.zapsign.com.br.
Prerequisites
- Sandbox account at sandbox.zapsign.com.br.
- A terminal with
curl(or Postman/Insomnia). - A publicly reachable PDF URL (use the sample below).
Step by step
Generate and test your token
curl -s https://sandbox.zapsign.com.br/api/v1/docs/ \
-H "Authorization: Bearer YOUR_SANDBOX_TOKEN"If you get JSON (even empty), auth works. For production, use api.zapsign.com.br and your app token.
Create a document with signers
curl -s -X POST https://sandbox.zapsign.com.br/api/v1/docs/ \ -H "Authorization: Bearer YOUR_SANDBOX_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "Test Contract", "url_pdf": "https://pdfobject.com/pdf/sample.pdf", "external_id": "ORDER-0001", "lang": "en", "send_automatic": true, "signers": [ { "name": "Maria Silva", "email": "maria@company.com", "auth_mode": "assinaturaTela" } ] }'
| Field | Purpose |
|---|---|
url_pdf | Public PDF URL. Alternative: base64_pdf. You can also create from a template with variables. |
signers[] | Name and email per signer; auth_mode sets authentication (on-screen signature, email token, selfie…). |
send_automatic | true = ZapSign emails the invite. false = you distribute sign_url yourself. |
external_id | Your internal ID for reconciliation. |
Track status
curl -s https://sandbox.zapsign.com.br/api/v1/docs/DOC_TOKEN/ \ -H "Authorization: Bearer YOUR_SANDBOX_TOKEN"
status moves from pending to signed; the signed PDF is in signed_file.
Receive events via webhook (recommended)
curl -s -X POST https://sandbox.zapsign.com.br/api/v1/user/company/webhook/ \ -H "Authorization: Bearer YOUR_SANDBOX_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "url": "https://your-api.com/webhooks/zapsign", "type": "doc_signed", "headers": [ { "name": "X-Webhook-Secret", "value": "your-secret" } ] }'
Useful events: doc_created, doc_signed, doc_refused, plus per-signer events. Validate the secret header on your endpoint.