Get started
Quickstart
Create a sandbox key, upload a document, send it, receive a webhook and download the signed PDF in ten minutes.
This walk-through uses a sandbox key, so it is free on every plan and nothing you send counts against your limits. You need a PDF with a signature tag in it — any PDF whose text contains {signature:Client} works (see Text tags).
Create a sandbox key#
Open Account → Developer → API keys, choose Create key, pick Sandbox and give it a name. Copy the key — it starts with
mk_test_and is shown only once. Keep it in an environment variable:Shellexport MACAAW_API_KEY="mk_test_…"Create a document#
Upload the PDF as
fileand the details as a JSON string indata. Each recipient has arole; text tags for that role become that recipient's fields.In the sandbox you can only send to addresses on your own email domain (or your own address if you use a public mail service such as Gmail).curl https://macaaw.com/public/v1/documents \ -H "Authorization: API-Key $MACAAW_API_KEY" \ -F "file=@contract.pdf;type=application/pdf" \ -F 'data={"name":"Consulting agreement","recipients":[{"email":"you@yourcompany.com","first_name":"Sam","last_name":"Lee","role":"Client"}],"parse_text_tags":true}'The answer is
201with statusdocument.uploaded:JSON{ "id": "58b66391-30fa-4219-a9b3-4f7badfad583", "uuid": "58b66391-30fa-4219-a9b3-4f7badfad583", "name": "Consulting agreement", "status": "document.uploaded", "date_created": "2026-10-30T11:35:00.342000Z", "date_modified": "2026-10-30T11:35:00.342000Z", "expiration_date": null, "sandbox": true }Check it is a draft#
The file and the tags were checked during the create call, so reading the document back normally gives
document.draftat once. A short poll keeps your code safe if it ever takes longer:curl https://macaaw.com/public/v1/documents/$DOCUMENT_ID \ -H "Authorization: API-Key $MACAAW_API_KEY"Send it#
Sending emails each signer a link. Use
"silent": trueinstead if you will collect signatures with embedded signing.curl https://macaaw.com/public/v1/documents/$DOCUMENT_ID/send \ -H "Authorization: API-Key $MACAAW_API_KEY" \ -H "Content-Type: application/json" \ -d '{"subject": "Please sign", "message": "Hi Sam, here is the agreement."}'Get a webhook#
Add a subscription under Account → Developer → Webhooks (tick Sandbox to receive sandbox events), or through the API. Macaaw POSTs a JSON array to your HTTPS URL when the document changes state; check the
signaturequery parameter as shown in Webhooks.curl https://macaaw.com/public/v1/webhook-subscriptions \ -H "Authorization: API-Key $MACAAW_API_KEY" \ -H "Content-Type: application/json" \ -d '{"name": "Quickstart", "url": "https://example.com/hooks/macaaw", "triggers": ["document_state_changed", "document_completed_pdf_ready"], "active": true, "sandbox": true}'Download the signed PDF#
When the status is
document.completed(or you receivedocument_completed_pdf_ready), download the signed PDF. It includes the signing certificate; sandbox output carries a “SANDBOX — NOT A VALID DOCUMENT” stamp on every page.curl https://macaaw.com/public/v1/documents/$DOCUMENT_ID/download \ -H "Authorization: API-Key $MACAAW_API_KEY" \ -o signed.pdf
Next steps#
- Embed signing in your app instead of sending emails.
- Create a live key when you are ready (needs a plan with API access).
- Browse the API reference or import the Postman collection.