Bulk Send via API
Bulk Send lets your own systems send the same agreement to hundreds of counterparties in one call — supplier terms, updated T&Cs, renewal letters, consent forms. Your developer makes one request; ERPDocs creates one SignPack per counterparty and emails each recipient.
Use this when the document is identical every time and only the names, emails and a few values change. If you only send a handful, use Using Templates with SignPack in the app instead.
What you need before you start
| Item | Where it comes from |
|---|---|
| A finished template | You build it once in ERPDocs |
| An API key with the bulk scope | Admin → API & Webhooks |
| A sender email | Any active user in your organization |
| A developer | To make the API call from your system |
Step 1 — Prepare the template
Bulk Send always sends from a template. Signature and date boxes have to sit in exact places on the PDF, so ERPDocs needs a layout to copy. It cannot guess where signatures go on a document it has never seen.
- Go to Templates → Create a template and upload the agreement or T&C PDF.
- Add a recipient role for each party — for example
SupplierandAcme Signatory. Role names are what your developer will use, so keep them short and stable. Renaming a role later will break their integration. - Open the field editor and drag fields onto the pages: signature, name, date, text, and so on. Assign every field to a role.
- Give every signer role at least one field. A signer with no fields blocks sending.
- Label the fields you want filled automatically — for example
Supplier Legal Name,Effective Date. Your developer sends values against these labels.
See Creating a Template and Template Field Editor.
Step 2 — Create an API key
- Go to Admin → API & Webhooks. This opens the API Keys page.
- In the Create Key panel, enter a key label naming the system that will use it (for example "Procurement portal").
- Choose the environment:
- Live — sends real emails to real people.
- Sandbox — read-only. Good for testing connection and permissions, but it cannot send anything and does not simulate signing.
- Tick the scopes the integration needs:
| Scope | Needed for |
|---|---|
signpack.bulk |
Queuing bulk sends — required |
template.read |
Reading role names and field labels |
signpack.read |
Checking batch progress and envelope status |
signpack.write |
Sending single envelopes and manual reminders |
- Click Create, then copy the key immediately — it is shown once and never again. If you lose it, revoke it and create a new one.
Only users with the integrations admin permission can create or revoke keys. Every creation and revocation is recorded in the Audit Log.
Step 3 — What to hand your developer
- The API reference — every endpoint, error code and limit.
- Your ERPDocs host, for example
https://www.erpdocs.com— the API lives at/api/v1on it. - The API key.
- The template ID (in the template's URL) and whether it is a user template or a document template.
- The exact role names and field labels from the template.
- The sender email to attribute envelopes to. It must be an active user in your organization, and it will appear as the sender on every email.
- The webhook URL and signing secret, if you want completion notifications pushed to your system.
Practical limits to pass on: up to 1000 rows per request, and at most 10 bulk requests per minute per key. Larger jobs must be split.
If you want the envelopes in this batch to expire on a different schedule from the template default, tell your developer the number of days. They can set it per batch (1 to 365 days).
Step 4 — Reading batch status
Each bulk request creates a batch. Every row in the batch becomes one SignPack.
| Batch status | What it means | What to do |
|---|---|---|
queued |
Accepted; nothing sent yet | Wait |
processing |
Some envelopes sent, more in progress | Wait |
completed |
Every envelope was sent | Nothing |
partial |
Some sent, some failed | Fix and re-send only the failed ones |
failed |
Nothing was sent | Fix the cause and re-send the batch |
The batch also reports total_rows, sent_count and error_count.
"Sent" means the envelope went out for signature — not that anyone signed it. Track signing itself in SignPack → Manage, exactly as with envelopes created in the app. See Tracking & Managing SignPacks.
Step 5 — Failed rows
Two different kinds of failure, handled differently.
The whole request was rejected (nothing sent). If any single row is malformed — a missing email, a bad recipient block — ERPDocs rejects the entire request and creates no batch. This is deliberate: a half-sent batch is far harder to clean up. The response names the offending row number. Fix that row and submit again.
Individual rows failed inside an accepted batch. Your developer can list them and each carries a plain-English reason. Common ones:
| Reason | Fix |
|---|---|
| A signer has no fields assigned | Open the template and add at least one field for that role |
| A signer is missing an email address | The row did not supply an email for a role, and the template has no default for it |
| The sender account no longer exists | Use an active user's email as the sender |
| DSC signing rules were violated | Hardware-token (DSC) signing is not supported through bulk send — send those in the app |
A failed row often leaves a Draft SignPack behind. That is intentional: the work is not lost. Find it in SignPack → Manage, correct it, and send it from the app. Re-sending the row through the API as well would create a second envelope for the same counterparty.
After fixing the cause, re-send only the failed rows. Never re-run a whole partial batch — the successful envelopes are already legally in flight and the counterparties would receive a duplicate.
Step 6 — A row says "Sent" but lists unmatched prefill labels
A row can be sent and still report unmatched prefill labels. This is not a delivery failure. It means the envelope went out with one or more auto-filled boxes left blank.
Your developer sees this as a non-empty prefill_unmatched list on the row. Ask them to check it on every row, not just the failed ones.
Why it happens. The label on the template and the label your developer sent do not match. Auto-fill works by matching the field's label text exactly (ignoring capitalisation and surrounding spaces). If they differ by even one character, nothing is filled and nothing else fails — the envelope is created, mailed and legally in flight with an empty box.
Common causes:
| Cause | Example |
|---|---|
| Typo on one side | Template says Supplier Legal Name, the request sent Suplier Legal Name |
| The template label was renamed after the integration was built | Template now says Counterparty Name; the request still sends Supplier Legal Name |
| Extra or missing word | Effective Date vs Effective From Date |
| The label points at a field that can never be auto-filled | Signature, DSC, attachment and checkbox fields must be completed by the recipient |
How to fix it. Pick one side and make it match the other:
- Open the template in the field editor and correct the field label to what your developer sends, or
- Give your developer the exact label from the template and have them correct their mapping.
Do not change both.
Envelopes already sent do not update. Correcting the label or the mapping only affects envelopes sent after the fix. For an envelope that already went out with a blank box you must recall it in SignPack → Manage and send it again to pick up the corrected value. Recall is available at every stage except Draft and Completed. If the counterparty has already signed, the envelope cannot be corrected — you need a fresh envelope.
To avoid this on large jobs, send a one-row test batch first and confirm the row reports no unmatched labels before releasing the full run.
Getting notified when signing finishes
Instead of polling, open Admin → API & Webhooks, click Webhooks →, and add an endpoint. There are three events, and all three are delivered:
signpack.sent— fires when an envelope goes out for signature. One delivery per envelope, so a 250-row batch produces 250 of these.signpack.completed— fires when every recipient of an envelope has signed.bulk_send.completed— fires once a batch finishes, including when it finishes aspartialorfailed.
For high-volume batches, subscribe to bulk_send.completed only — signpack.sent on a large run will flood your endpoint.
The URL must use HTTPS. Copy the signing secret when it is shown — it is not shown again, though it can be rotated. Your developer must verify the signature on every delivery; the recipe is in the API reference.
If your endpoint keeps failing, ERPDocs retries a few times and then auto-disables the webhook after 20 consecutive failures. Re-enable it from the Webhooks page once the endpoint is fixed.
Not supported
- DSC (hardware token) signing through bulk send.
- Creating or editing templates through the API.
- Cancelling a batch once it is queued.
- Ready-made SDKs. Your developer works with plain HTTPS and JSON.
Two things that used to be listed here are now supported, though not through bulk send:
- Sending a raw PDF without a template.
POST /api/v1/signpacksaccepts a PDF, DOCX or image containing anchor tags and builds the fields from them. It sends one envelope per call, not a batch — see Raw-PDF Sending with Anchor Tags. - Signing inside your own website or app. Recipients can sign in an iframe or a redirect in your product instead of following an ERPDocs email link — see Embedded Signing. Envelopes created by bulk send can be signed this way: mark the role
"embedded": trueat send time, then mint a handoff token per recipient.
Next steps
- Creating an API Key
- Setting Up Webhooks
- Troubleshooting API Errors
- Creating a Template
- Template Field Editor
- Tracking & Managing SignPacks
- SignPack Statuses Explained
- Bulk Import — for loading existing contracts from Excel, not for sending