SignMaster API

Signing, from your app.Send, track and collect.

Create envelopes from your templates or your own PDFs, follow every signer, hear the moment a contract completes, and pull every answer into your own system.

On Crew and Company. New workspaces get 14 days of Crew free.

https://www.usesignmaster.app/api/v1
  1. POST/envelopesfrom your template, out to two signers201
  2. Both signers signsigned
  3. HOOKenvelope.completedreaches your server, signed204
  4. GET/envelopes/ce53…/signed-pdfthe sealed PDF, for your records302
  5. GET/templates/9b1d…/responsesevery answer, one row per envelope200
Endpoints
27
templates to signed PDF
Per key
60/min
requests, every minute
Webhook events
7
signed, retried for a day
Plans
Crew+
Crew and Company

01

Authentication

Every request carries an API key as a Bearer token. A key works only for its own workspace, and only for what it was allowed to do.

  1. 1

    Create a key

    Open Settings › Developers, choose Create key, name it after the app that will use it, and tick what it may do. You need the Connect apps permission; owners and admins always have it.

    envelopes:read
    Read envelopes. See envelopes, their status and what signers entered.
    envelopes:write
    Create and send envelopes. Create, send, remind and void envelopes.
    templates:read
    Read templates. List templates and their fields.
    embedded:create
    Start embedded signing. Start signing sessions inside your app.
    contacts:read
    Read contacts. See contacts.
    contacts:write
    Edit contacts. Add and edit contacts.
    webhooks:manage
    Manage webhooks. Add and change webhooks.
    bulk:write
    Bulk send. Start bulk sends.
  2. 2

    Copy it once

    The key starts with sm_live_ and is shown one time only; SignMaster keeps just a fingerprint of it. Store it on your server, in an environment variable such as SIGNMASTER_API_KEY.

  3. 3

    Send it

    Put it in the Authorization header. GET /meis a quick way to check it: it answers with the workspace, the plan and the key's scopes.

    curl https://www.usesignmaster.app/api/v1/me \  -H "Authorization: Bearer $SIGNMASTER_API_KEY"

60 requests a minute

Per key. Every answer carries X-RateLimit-Limit and X-RateLimit-Remaining; past the limit you get a 429 until the minute is up.

Crew and Company

On other plans keys answer 403 with plan_limit. They start working again after an upgrade.

Call the API from your server only. Browsers on other sites can't read its answers, and a key in a web page or an app can be copied by anyone.

Bulk sends and webhooks act as the person who created the key. If they leave the workspace, create a new key. Revoke a key in Settings › Developers; anything using it stops working right away.

02

Quick start: signing in your app

Three calls put signing inside your own page: create a session for the signer, then check the envelope and read what they entered.

  1. 1

    Create a session

    Send the envelope from SignMaster, or create it with POST /envelopes. Its id is the last part of its address in SignMaster, like /envelopes/ce53b309-da39-4130-b663-ce9981cb7f4c.

    Right before the signer needs to sign, create a session. Name them by recipient_email or recipient_id, say where they land when they finish, and, to show it in your page, that page's origin. Add both sites under Allowed origins in Settings › Developers first. Needs embedded:create.

    curl -X POST https://www.usesignmaster.app/api/v1/envelopes/ENVELOPE_ID/embedded-sessions \  -H "Authorization: Bearer $SIGNMASTER_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "recipient_email": "dana@example.com",    "return_url": "https://app.example.com/signed?order=1042",    "frame_origin": "https://app.example.com"  }'

    Response · 201

    {
      "session_id": "5b51e98e-8189-4b71-b60a-1d45dc80e439",
      "url": "https://www.usesignmaster.app/embed/9Lr2…",
      "expires_at": "2026-10-11T16:13:18.186231+00:00",
      "expires_in_seconds": 300,
      "envelope_id": "ce53b309-da39-4130-b663-ce9981cb7f4c",
      "recipient": { "name": "Dana Lee", "email": "dana@example.com" },
      "return_url": "https://app.example.com/signed?order=1042",
      "frame_origin": "https://app.example.com"
    }

    The link opens once, within 5 minutes, so create it when the signer chooses to sign. It must be their turn: with signers in order, asking for the second before the first has signed returns not_their_turn.

  2. 2

    Show it in your page

    Put url in a frame on the page you named as frame_origin. SignMaster tells that page what happened with a message.

    Your page
    <iframe src="SESSION_URL" title="Sign the document"  style="width: 100%; height: 760px; border: 0"></iframe><script>  window.addEventListener("message", (event) => {    if (event.origin !== "https://www.usesignmaster.app") return;    switch (event.data?.type) {      case "signmaster:loaded":    /* hide your spinner */ break;      case "signmaster:completed": /* close the frame, then check status */ break;      case "signmaster:declined":  /* the signer said no */ break;      case "signmaster:error":     /* event.data.code: link_used or                                      session_expired */ break;    }  });</script>
    signmaster:loaded
    The signing page is ready. view is "signing", or "access_gate" when the signer must enter an access code first.
    signmaster:completed
    They signed. envelope_status is "completed", or "waiting_for_others" when others still have to.
    signmaster:declined
    They declined to sign.
    signmaster:error
    code is link_used or session_expired. Create a new session.

    The framing rules

    • 1.Only the origin in frame_origin can show the session. The browser refuses every other site, and a session made without frame_origincan't be framed anywhere.
    • 2.frame_origin must be one of your allowed origins. Remove an origin and the links already made for it stop working there at once.
    • 3.Messages go to that origin only. Check that event.origin is https://www.usesignmaster.app before you trust one.
    • 4.A message is a hint for your interface. Check the envelope's status before you act on it.

    No frame? Redirect the signer to url or open it in a new tab. When they finish, SignMaster sends them to your return_url with an event.

    # Your server answers the signer's "Sign now" click with a redirect:HTTP/1.1 303 See OtherLocation: https://www.usesignmaster.app/embed/9Lr2…

    https://app.example.com/signed?order=1042&event=signing_complete

    signing_complete
    They signed. Others may still have to; the envelope's status says.
    declined
    They declined to sign.
    link_used
    That link was already opened. Create a new session.
    session_expired
    The link wasn't opened within 5 minutes. Create a new session.
  3. 3

    Check the envelope

    The envelope's status, each recipient's progress and, once it's completed, a 10-minute link to the signed PDF and its SHA-256. Needs envelopes:read.

    curl https://www.usesignmaster.app/api/v1/envelopes/ENVELOPE_ID \  -H "Authorization: Bearer $SIGNMASTER_API_KEY"

    Response · 200

    {
      "envelope_id": "ce53b309-da39-4130-b663-ce9981cb7f4c",
      "title": "Roof replacement agreement",
      "status": "completed",
      "source": null,
      "external_ref": null,
      "sent_at": "2026-10-11T16:08:52.809901+00:00",
      "completed_at": "2026-10-11T16:09:16.029572+00:00",
      "created_at": "2026-10-11T16:08:52.688218+00:00",
      "recipients": [
        {
          "name": "Dana Lee",
          "email": "dana@example.com",
          "type": "signer",
          "status": "completed",
          "completed_at": "2026-10-11T16:09:15.830521+00:00"
        }
      ],
    status
    One of draft, sent, in_progress, completed, declined, expired, voided.
    recipients[].status
    Each recipient's progress, such as sent, viewed, completed or declined.
    final_pdf.sha256
    The SHA-256 fingerprint of the signed PDF, certificate included. It proves a copy is the sealed one.
  4. 4

    Read what they entered

    One entry per field, with its label, page, signer and value. Needs envelopes:read.

    curl https://www.usesignmaster.app/api/v1/envelopes/ENVELOPE_ID/data \  -H "Authorization: Bearer $SIGNMASTER_API_KEY"

    Response · 200

    {
      "envelope_id": "ce53b309-da39-4130-b663-ce9981cb7f4c",
      "title": "Roof replacement agreement",
      "status": "completed",
      "fields": [
        {
          "field_id": "7f7c265a-c0bf-4c22-9d50-a52637c7e87e",
          "file": "Roof replacement agreement.pdf",
          "page": 1,
          "label": "Signature",
          "type": "signature",
          "recipient": { "name": "Dana Lee", "email": "dana@example.com" },
          "value": "[signature]",
          "filled_at": "2026-10-11T16:09:15.830Z"
        },
        {
          "field_id": "d952e52e-0170-4e14-b67c-649cd4958bc2",
          "file": "Roof replacement agreement.pdf",

    Signatures read [signature]; the image never leaves SignMaster. Each read is noted in the envelope's history.

Signing-link codes

invalid_return_url · 400
return_url isn't an absolute https URL (http only for localhost).
invalid_frame_origin · 400
frame_origin isn't a bare origin (scheme and host, no path).
origin_not_allowed · 400
The site in return_url or frame_origin isn't in Allowed origins.
envelope_not_found · 404
No envelope with that ID in this workspace.
recipient_not_found · 404
No signer with that email or ID on the envelope.
envelope_not_sent · 409
The envelope is still a draft. Send it first.
not_their_turn · 409
An earlier signer hasn't finished yet.
envelope_not_signable · 409
It's completed, voided, declined or expired.

03

Conventions

Every endpoint answers in JSON and follows the same rules for errors, lists, retries and ids.

Errors

An error is a sentence you can show or log, in error, and a code to branch on.

Response · 403
{  "error": "This API key lacks the envelopes:write scope.",  "code": "forbidden_scope"}
invalid_request · 400
The body, a parameter or the cursor is wrong. error says which.
unauthorized · 401
No key, a malformed Authorization header, or a revoked or unknown key.
forbidden_scope · 403
The key lacks the scope the endpoint needs, or the workspace is paused.
plan_limit · 403
The plan doesn't cover it: the API itself, or one more template, envelope or bulk send row.
not_found · 404
Not in this workspace. Another workspace's id is a 404 too.
conflict · 409
The Idempotency-Key was used for a different request, or a contact with that email exists.
request_pending · 409
The first request with this Idempotency-Key is still running.
rate_limited · 429
More than 60 requests this minute with this key.
internal_error · 500
Something failed on our side, and it may have taken effect. The same Idempotency-Key returns this same answer, so check (for example GET /envelopes) before trying again with a new key.
unavailable · 503
Nothing was changed: something we depend on was briefly unavailable. Retry with the same Idempotency-Key.

Lists

Lists answer { data, next_cursor }. Pass next_cursor back as cursorfor the next page, until it's null. limit is 1 to 100; most lists default to 25, templates and responses to 50.

curl
curl "https://www.usesignmaster.app/api/v1/envelopes?limit=100&cursor=NEXT_CURSOR" \  -H "Authorization: Bearer $SIGNMASTER_API_KEY"

Retrying safely

Send an Idempotency-Key header with any POST, like an order number or a UUID you make. For 24 hours, repeating the same request with the same key returns the first response again, without doing the work twice.

  • 1.The same key with a different body answers 409 conflict.
  • 2.While the first request is still running, a repeat answers 409 request_pending. Wait a moment and retry.
  • 3.Keys belong to your workspace and API key, up to 200 characters.

Ids and times

Ids are UUIDs, like ce53b309-da39-4130-b663-ce9981cb7f4c. Times are ISO 8601. An id from another workspace answers 404, the same as one that doesn't exist.

04

Endpoints

All 27, straight from our OpenAPI document, each with the scope it needs. Every path starts with https://www.usesignmaster.app/api/v1.

Account

Which workspace a key belongs to, and what it may do.

Check your key

Any key

GET/me

The workspace the key belongs to, its plan, the key's scopes and how many requests it has left this minute.

Templates

Your templates, their signer roles, and the fields you can fill in before sending.

List templates

templates:read

GET/templates

Every template in the workspace with its signer roles and fields, 50 at a time unless you set limit.

Get a template

templates:read

GET/templates/{id}

Its roles in signing order, its fields, and prefill_keys: what you can fill in when you create an envelope or bulk send from it.

Envelopes

Create envelopes from a template or your own PDF, send them, follow each signer and collect the signed PDF.

List envelopes

envelopes:read

GET/envelopes

Filter by status, template, bulk send or when it was created. Newest first.

Create an envelope

envelopes:write

POST/envelopes

From one of your templates (template_id) or from your own PDF (document). It goes out right away unless send is false, which leaves a draft.

Get an envelope

envelopes:read

GET/envelopes/{id}

Its status, each recipient's progress, the signed PDF's SHA-256 and, once it's completed, a download link that works for 10 minutes.

Send a draft

envelopes:write

POST/envelopes/{id}/send

Sends an envelope you created with send set to false.

Void an envelope

envelopes:write

POST/envelopes/{id}/void

Stops an envelope that's out for signing, so nobody else can sign it. The reason is optional.

Remind signers

envelopes:write

POST/envelopes/{id}/remind

Emails a reminder to every signer it's waiting on, or only to recipient_id.

Delete a draft

envelopes:write

DELETE/envelopes/{id}

Drafts only. Void an envelope that's already out instead.

Download the signed PDF

envelopes:read

GET/envelopes/{id}/signed-pdf

Redirects (302) to a download link that works for 10 minutes. Add format=json to get the link instead.

List an envelope's history

envelopes:read

GET/envelopes/{id}/events

The audit trail: sent, viewed, signed, completed and the rest, with who did it and when.

Read what signers entered

envelopes:read

GET/envelopes/{id}/data

One entry per field with its label, page, signer and value. Each read is noted in the envelope's history.

Start an embedded signing session

embedded:create

POST/envelopes/{id}/embedded-sessions

A one-time signing link for one signer, to show in your page or send them to. The quick start walks through it.

Responses

Everything signers entered across one template, one row per envelope.

Get a template's responses

envelopes:read

GET/templates/{id}/responses

Every envelope sent from this template, newest first, with one value per column. The same data as the Responses tab and its CSV download.

Bulk sends

One template to many people, one envelope for each row.

Start a bulk send

bulk:write

POST/bulk-sends

One envelope per row, from one template. Name each row's people by role label and fill its fields by label.

Check a bulk send

envelopes:read

GET/bulk-sends/{id}

The batch's progress (queued, sending, paused, done or stopped) and each row's status (queued, processing, sent, failed or skipped) with the envelope it made.

Contacts

The people you send to. Signers are added as they finish, unless you turn that off.

List contacts

contacts:read

GET/contacts

Everyone in the workspace's contacts.

Add a contact

contacts:write

POST/contacts

Only email is required.

Get a contact

contacts:read

GET/contacts/{id}

One contact by id.

Update a contact

contacts:write

PATCH/contacts/{id}

Send only what changes; the rest is kept. An empty string clears a value.

Delete a contact

contacts:write

DELETE/contacts/{id}

Removes it from Contacts. Envelopes aren't touched.

Webhooks

Add and manage the endpoints SignMaster calls when envelopes change. Events and payloads are in the Webhooks section.

List webhooks

webhooks:manage

GET/webhooks

Your endpoints with their events and health. Secrets are never returned.

Add a webhook

webhooks:manage

POST/webhooks

The URL must be public https. The response carries the signing secret; it's the only time you'll see it.

Update a webhook

webhooks:manage

PATCH/webhooks/{id}

Change its URL, description or events, or pause and resume it with status.

Delete a webhook

webhooks:manage

DELETE/webhooks/{id}

Stops all deliveries to it.

Send a test event

webhooks:manage

POST/webhooks/{id}/test

Sends a signed webhook.test now and returns the status code your endpoint answered with.

05

Webhooks

Add an endpoint in Settings › Developers or with POST /webhooks, pick its events, and SignMaster POSTs JSON to it as envelopes change. On Crew and Company.

Events

envelope.sent
Envelope sent. It went out to a recipient. With signers in order, it comes again each time it's the next signer's turn.
recipient.viewed
Signer opened it. A recipient opened the signing page. Adds recipient.
recipient.completed
Signer finished. A signer finished, in person or by link. Adds recipient, fields and fields_by_label.
envelope.completed
Envelope completed. Everyone finished and the signed PDF is sealed. Adds fields, fields_by_label and signed_pdf.
envelope.declined
Declined. A signer declined, which ends the envelope.
envelope.voided
Voided. Someone on your team voided it, or the API did.
envelope.expired
Expired. Its expiry date passed before everyone signed.
webhook.test
Test. Only from Send test or POST /webhooks/{id}/test, with sample data. Never sent otherwise.

Payload

Every event has an id, a type, created_at, api_version and data. It's built when it's sent, so it carries the envelope as it is then.

envelope.completed
{  "id": "evt_k3qym2x7c4vqbhn6z5wjr2t5",  "type": "envelope.completed",  "created_at": "2026-11-05T16:09:16.412Z",  "api_version": "2026-11-05",  "data": {    "envelope": {      "id": "ce53b309-da39-4130-b663-ce9981cb7f4c",      "title": "Hotel services agreement · Hotel Rural Uno",      "status": "completed",      "template_id": "9b1d4c2a-6e3f-4a7b-8c9d-0e1f2a3b4c5d",      "bulk_send_id": null,      "sent_at": "2026-11-05T15:40:13.204Z",      "completed_at": "2026-11-05T16:09:16.029Z"    },    "recipients": [      {        "id": "4f0b6c1e-8a51-4c0e-9d2a-7b6f3e2a9c10",        "name": "Lucía Martín",        "email": "lucia@example.com",        "role": null,        "type": "signer",        "status": "completed",        "completed_at": "2026-11-05T15:58:41.612Z"      },      {        "id": "a3d5e7f9-1b2c-4d4e-8f60-718293a4b5c6",        "name": "Daniel Ortega",        "email": "daniel@example.com",        "role": null,        "type": "signer",        "status": "completed",        "completed_at": "2026-11-05T16:09:15.830Z"      }    ],    "fields": [      {        "id": "0c6f2b1a-3d4e-4f5a-8b6c-7d8e9f0a1b2c",        "label": "VAT number",        "type": "note",        "value": "ESB12345678",        "recipient_id": null,        "filled_by": "sender"      },      {        "id": "1d7a3c2b-4e5f-4a6b-9c7d-8e9f0a1b2c3d",        "label": "Fee",        "type": "note",        "value": "1.250,00 € + IVA",        "recipient_id": null,        "filled_by": "sender"      },      {        "id": "2e8b4d3c-5f6a-4b7c-8d8e-9f0a1b2c3d4e",        "label": "Phone",        "type": "phone",        "value": "+34 600 123 456",        "recipient_id": "4f0b6c1e-8a51-4c0e-9d2a-7b6f3e2a9c10",        "filled_by": "signer"      },      {        "id": "4a0d6f5e-7b8c-4d9e-8f0a-1b2c3d4e5f6a",        "label": "Date signed",        "type": "date_signed",        "value": "2026-11-05T15:58:41.612Z",        "recipient_id": "4f0b6c1e-8a51-4c0e-9d2a-7b6f3e2a9c10",        "filled_by": "signer"      },      {        "id": "5b1e7a6f-8c9d-4e0f-9a1b-2c3d4e5f6a7b",        "label": "Date signed",        "type": "date_signed",        "value": "2026-11-05T16:09:15.830Z",        "recipient_id": "a3d5e7f9-1b2c-4d4e-8f60-718293a4b5c6",        "filled_by": "signer"      }    ],    "fields_by_label": {      "VAT number": "ESB12345678",      "Fee": "1.250,00 € + IVA",      "Phone": "+34 600 123 456",      "Date signed (Lucía Martín)": "2026-11-05T15:58:41.612Z",      "Date signed (Daniel Ortega)": "2026-11-05T16:09:15.830Z"    },    "signed_pdf": {      "url": "https://…/sign-documents/…?token=…",      "expires_at": "2026-11-06T16:09:17.000Z",      "sha256": "dbdfd290dc0862616e0f7e137a5476ff116d964f779b67873b218216a4d75c8f"    }  }}
recipient
The person the event is about, on recipient.viewed and recipient.completed.
fields
Every field with its value, on recipient.completed and envelope.completed. filled_by says whether a signer or you filled it. Signatures, initials and drawings are never sent.
fields_by_label
The same values by label. A label used twice gets the person's name in brackets, like "Date signed (Lucía Martín)".
signed_pdf
On envelope.completed: a download link that works for 24 hours, and the PDF's SHA-256. Later, GET /envelopes/{id}/signed-pdf makes a fresh one.
Uploads
A file field's value is { name, url, expires_at }, or a list of them when the signer added several.
recipients[].role
Null. Match people by email or id.

Headers

Content-Type
application/json
User-Agent
SignMaster-Webhooks/1.0
SignMaster-Event-Id
The event's id, the same as id in the body. Unique per event; use it to skip repeats.
SignMaster-Event-Type
The event, like envelope.completed.
SignMaster-Signature
t=<unix seconds>,v1=<hex HMAC-SHA256>, signed over t, a period and the raw body.

Verify the signature

Each endpoint has its own secret, starting whsec_, shown once when you add the endpoint or roll the secret. Sign the timestamp, a period and the raw body with HMAC-SHA256 and that secret, then compare the result with v1 in constant time. Refuse timestamps more than 5 minutes old.

import crypto from "node:crypto";// rawBody: the request body exactly as received, before JSON.parse.function verifySignMaster(rawBody, header, secret, toleranceSeconds = 300) {  const match = /^t=(\d+),v1=([0-9a-f]{64})$/.exec(header ?? "");  if (!match) return false;  const age = Math.abs(Date.now() / 1000 - Number(match[1]));  if (age > toleranceSeconds) return false;  const expected = crypto    .createHmac("sha256", secret)    .update(`${match[1]}.${rawBody}`)    .digest();  return crypto.timingSafeEqual(expected, Buffer.from(match[2], "hex"));}// Express: keep the body raw for this route.app.post("/signmaster/webhooks", express.raw({ type: "application/json" }), (req, res) => {  const rawBody = req.body.toString("utf8");  const header = req.get("SignMaster-Signature");  if (!verifySignMaster(rawBody, header, process.env.SIGNMASTER_WEBHOOK_SECRET)) {    return res.sendStatus(400);  }  const event = JSON.parse(rawBody);  // Deliveries can repeat: skip an event.id you've already handled.  res.sendStatus(204);});

Check the bytes you received. Parsing the JSON and turning it back into text changes them.

Retries and pausing

  • 1.Answer with any 2xx within 5 seconds, so reply first and do the work after. A redirect, a timeout or any other status counts as a failure.
  • 2.A failed delivery is tried again after 1 min, 5 min, 30 min, 2 h, 6 h and 24 h. After the 7th failed attempt it gives up.
  • 3.After 20 failures in a row and no success for 24 hours, the endpoint is paused and whoever added it gets an email. Resume it in Settings or with PATCH /webhooks/{id}.
  • 4.Delivery is at least once and order isn't guaranteed. Skip an idyou've already handled, and check the envelope's status before acting on an old event.

The delivery log

In Settings › Developers, open an endpoint's menu and choose View deliveries: the last 50, with the event, time, status code and reason. Retry sends a failed one again. Send test, or POST /webhooks/{id}/test, sends webhook.test right away and shows the status code your endpoint answered with.

06

Recipes

Four common jobs, start to finish. The JavaScript ones share this small helper.

JavaScript
// Shared by the recipes below. Throws with SignMaster's code and message.async function api(path, init = {}) {  const res = await fetch(`https://www.usesignmaster.app/api/v1${path}`, {    ...init,    headers: {      Authorization: `Bearer ${process.env.SIGNMASTER_API_KEY}`,      "Content-Type": "application/json",      ...init.headers,    },  });  const body = await res.json();  if (!res.ok) throw new Error(`${body.code}: ${body.error}`);  return body;}

Send a contract from a PDF with text tags

Type a tag wherever a field belongs, then send the PDF with text_tags set. SignMaster puts a field on each tag and paints the tag out.

  • A tag is {{type:signer}}, like {{signature:1}} or {{date_signed:2}}. The number is the signer's place in recipients, starting at 1.
  • Add :req to make a field required, like {{text:2:req}}. Signatures and initials always are.
  • Types: signature, initials, date_signed, name, email, company, title, text, date, checkbox, phone.
  • Send a URL for PDFs over 3 MB: request bodies are capped at 4.5 MB, and base64 makes a file a third larger.
curl -X POST https://www.usesignmaster.app/api/v1/envelopes \  -H "Authorization: Bearer $SIGNMASTER_API_KEY" \  -H "Idempotency-Key: contract-1042" \  -H "Content-Type: application/json" \  -d '{    "document": {      "url": "https://files.example.com/contracts/hotel-rural-uno.pdf"    },    "title": "Hotel services agreement · Hotel Rural Uno",    "text_tags": true,    "recipients": [      { "name": "Lucía Martín", "email": "lucia@example.com" },      { "name": "Daniel Ortega", "email": "daniel@example.com" }    ]  }'

Bulk send rows from your own system

Read the template's role labels and field labels once, then send one row per person. Each row becomes its own envelope.

  • GET /templates/{id} lists roles[].label and prefill_keys[].label. Use them exactly as written.
  • Rows with a missing person or a bad email are skipped and listed with their problems; the rest go out.
  • Check progress with GET /bulk-sends/{id}, or listen for envelope.completed and match data.envelope.bulk_send_id.
JavaScript
// hotels: rows from your own database.const { id } = await api("/bulk-sends", {  method: "POST",  headers: { "Idempotency-Key": "season-2027-hotels" },  body: JSON.stringify({    template_id: "9b1d4c2a-6e3f-4a7b-8c9d-0e1f2a3b4c5d",    rows: hotels.map((hotel) => ({      recipients: {        Hotel: { name: hotel.manager, email: hotel.email },        Agency: { name: "Daniel Ortega", email: "daniel@example.com" },      },      values: { "VAT number": hotel.vat, Fee: hotel.fee },    })),    options: { reminderIntervalHours: 72, expiresInDays: 30 },  }),});const { batch, rows } = await api(`/bulk-sends/${id}`);console.log(batch.status); // "sending", then "done"for (const row of rows.filter((r) => r.status === "skipped")) {  console.log(`Row ${row.rowNumber}: ${row.problems.join("; ")}`);}

Pull every answer to a template

Responses gives one row per envelope with each field's value, the same as the Responses tab. Page through with the cursor.

JavaScript
const rows = [];let columns = [];let cursor = null;do {  const query = new URLSearchParams({ status: "completed", limit: "100" });  if (cursor) query.set("cursor", cursor);  const page = await api(`/templates/${templateId}/responses?${query}`);  columns = page.columns;  rows.push(...page.data);  cursor = page.next_cursor;} while (cursor);// columns maps each key in row.values to the label people see.for (const row of rows) {  const answers = columns.map((c) => `${c.label}: ${row.values[c.key] ?? "-"}`);  console.log(row.title, answers.join(", "));}

Get the signed PDF when a contract completes

Subscribe a webhook to envelope.completed. When it arrives, fetch a fresh download link and keep the file in your own storage.

  • The event carries data.signed_pdf.url too, good for 24 hours. /signed-pdf makes a new 10-minute link whenever you need one.
  • Answer the webhook quickly with a 2xx, and do slow work after.
// In your webhook route, after verifySignMaster(...) passes:const event = JSON.parse(rawBody);if (event.type === "envelope.completed") {  const envelopeId = event.data.envelope.id;  const { url } = await api(`/envelopes/${envelopeId}/signed-pdf?format=json`);  const pdf = Buffer.from(await (await fetch(url)).arrayBuffer());  await saveToYourStorage(`contracts/${envelopeId}.pdf`, pdf);}

07

OpenAPI

The whole API as one OpenAPI 3.1 document, webhook payloads included. Import it into Postman, or point a code generator at it.

openapi.jsonhttps://www.usesignmaster.app/api/v1/openapi.json

Import it into Postman

  • 1.In Postman, choose Import and paste https://www.usesignmaster.app/api/v1/openapi.json.
  • 2.Import it as a Postman Collection.
  • 3.In the collection's Variables, set baseUrl to https://www.usesignmaster.app/api/v1.
  • 4.In its Authorization tab, pick Bearer Token and paste your key. Every request in the collection uses it.

Your first envelope, today.

Create a key, send from your own system, and hear back the moment it's signed. Questions about the API? We'll help.