For developers

Put signing inside your own software

Send a document from your system, let the person sign without leaving your app, and get told the moment it is done. Four steps, and the signing window is one script tag.

1. Get an API key

Sign in, open Settings, API access, and create a key. An account admin does this. Keep the key on your server. It never goes in a web page or a mobile app.

2. Send a document

Post a PDF and say who signs. Put fields next to words already printed on the page (anchors), or by page position. Add "embedded": true to a signer who will sign inside your app, and that signer is not emailed a link.

curl -X POST https://wakesign.com/api/v1/envelopes \
  -H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" -d '{
  "title": "Service agreement 1042",
  "file_base64": "<base64 PDF>",
  "external_ref": "order-1042",
  "callback_url": "https://your.system/webhooks/wakesign",
  "recipients": [{ "name": "Dana Lee", "email": "[email protected]", "embedded": true }],
  "anchors": [
    { "recipient_index": 0, "kind": "signature", "anchor": "Customer Signature:" },
    { "recipient_index": 0, "kind": "date", "anchor": "Date:" }
  ]
}'
# -> { "envelope_id": 123, "status": "sent", ... }

3. Let them sign inside your app

When your signed-in user is ready to sign, your server asks for a signing session. Name the web address of the page that will show it. The session must be started within 15 minutes (5 to 60 if you set ttl_minutes).

curl -X POST https://wakesign.com/api/v1/envelopes/123/embed \
  -H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \
  -d '{ "email": "[email protected]", "origin": "https://app.yourcompany.com" }'
# -> { "url": "https://wakesign.com/s/...", "expires_at": "..." }

Hand that url to the page and open it. That is the whole connector:

<script src="https://wakesign.com/embed.js"></script>
<script>
  WakeSign.open({
    url: signingUrlFromYourServer,
    onSigned:   function (e) { /* e.envelope, e.envelope_status */ },
    onDeclined: function (e) { },
    onClose:    function ()  { }
  });
  // or inside an element of yours:
  // WakeSign.mount("#sign-here", { url: signingUrlFromYourServer, height: "720px" });
</script>
  • The signing page only loads inside the web address you named. Anywhere else it refuses to show.
  • Your system is vouching for who the signer is, and the audit trail says so: which system asked, for whom, and where it was shown.
  • Asking for a new session replaces the earlier one for that signer.
  • Events: ready, signed, declined, expired, closed. onEvent gets all of them.

4. Know when it is done, and get the sealed PDF

WakeSign posts to your callback_url on envelope.completed and envelope.declined. Check the X-WakeSign-Signature header: it is the HMAC-SHA256 of the request body, keyed by the SHA-256 hex of your API key.

# Status and who signed
curl -H "Authorization: Bearer YOUR_KEY" https://wakesign.com/api/v1/envelopes/123

# The sealed, signed PDF and its Certificate of Completion
curl -H "Authorization: Bearer YOUR_KEY" https://wakesign.com/api/v1/envelopes/123/document -o signed.pdf
curl -H "Authorization: Bearer YOUR_KEY" https://wakesign.com/api/v1/envelopes/123/certificate -o certificate.pdf

5. One webhook for the whole account, and files by link

Instead of a callback_url on every document, subscribe once and hear about all of them. This is also what no-code tools use to start a workflow when a document is signed.

# Check a key
curl -H "Authorization: Bearer YOUR_KEY" https://wakesign.com/api/v1/me

# Subscribe (events: envelope.completed, envelope.declined, envelope.expired)
curl -X POST https://wakesign.com/api/v1/hooks -H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \
  -d '{ "url": "https://yourapp.com/wakesign-events", "events": ["envelope.completed"] }'

# List and remove
curl -H "Authorization: Bearer YOUR_KEY" https://wakesign.com/api/v1/hooks
curl -X DELETE -H "Authorization: Bearer YOUR_KEY" https://wakesign.com/api/v1/hooks/7
  • Each event carries the document title, your reference, the status and every signer with the time they signed.
  • When sending a document you can pass file_url (a public https link to the PDF) instead of file_base64.
  • Find documents by your own reference or status: /api/v1/envelopes?external_ref=order-1042 or ?status=completed.
  • Templates: GET /api/v1/templates, then POST /api/v1/templates/ID/use with the signers.

Good to know

  • Your name and logo can go on the emails and the signing page: send branding with the document.
  • Signers you do not mark as embedded get the normal emailed link, so one document can mix both.
  • Limits: 120 calls a minute per key, and a monthly call allowance shown on the API access page.
  • Every document is sealed and carries a Certificate of Completion. How WakeSign proves a signature.
Start freeCreate an account, then make a key under Settings.