Skip to content
ERPDocs
Developers

Send agreements from your own systems

The REST API v1 turns a template you built once into signed agreements — one call per counterparty, or one call for a batch of 1,000. HMAC-signed webhooks tell you when each one is done.

API access is part of the Business plan. Verifying people and businesses before they sign? See the ERPDocs Verify API (early access).

Send one envelope
curl -X POST https://www.erpdocs.com/api/v1/templates/41/send \
  -H "Authorization: Bearer $ERPDOCS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "sender_email": "priya@acme.example",
    "recipients": {
      "supplier": { "name": "Ravi Menon", "email": "ravi@northwind.example" }
    },
    "prefill": { "Supplier Legal Name": "Northwind Ltd" }
  }'

# 201 Created
{ "id": 9012, "status": "Sent", "prefill_unmatched": [] }
Quickstart

Four steps to your first signed agreement

Sending is template-driven, or send a raw PDF, DOCX or image with anchor tags such as {{sig:Signer 1}} and {{text:Signer 1:Address}}.

  1. 1

    Build the template

    Upload the PDF, add a recipient role per party and place fields. Give every signer at least one field.

    Role names and field labels are your API contract — renaming one later breaks the integration.

  2. 2

    Create an API key

    In Admin → API and webhooks, create a key with only the scopes you need. The raw key is shown once.

    Start with a sandbox key to exercise auth and reads without sending anything.

  3. 3

    Read the contract

    GET /templates/{id} returns the exact role names to address and the labels you can prefill.

    Build your mapping from that response, never from a screenshot.

  4. 4

    Send and subscribe

    POST /templates/{id}/send for one, POST /bulk-send for up to 1,000.

    Subscribe to signpack.completed instead of polling — verify webhooks.

Endpoints

The whole v1 surface on one screen

22 endpoints. Bearer-token auth, per-key scopes and one error format you can branch on.

API v1 endpoints with required scope
MethodPathScopeWhat it does
GET /ping none Credential check — confirms key, organization and scopes
GET /templates template.read Templates this organization can send from
GET /templates/{id} template.read The send contract: role names and prefillable labels
POST /templates/{id}/send signpack.write Create and send one envelope
POST /bulk-send signpack.bulk Queue up to 1,000 envelopes from one template
GET /bulk-send/{id} signpack.read Batch counters and status
GET /bulk-send/{id}/rows signpack.read Per-envelope status, paged
POST /signpacks signpack.write Send a raw PDF using anchor tags — no template needed
GET /signpacks signpack.read List envelopes, newest first
GET /signpacks/{id} signpack.read One envelope and its recipients
GET /signpacks/{id}/download signpack.read Time-limited URL for the sealed PDF
POST /signpacks/{id}/remind signpack.write Queue reminder emails
POST /signpacks/{id}/void signpack.write Permanently cancel an in-flight envelope
POST /signpacks/{id}/recipients/{rid}/embed-token signpack.embed Single-use URL to host signing in your app
GET /brands brand.read Brand profiles and which one is the default
POST /brands brand.write Create a brand profile
GET /brands/{id} brand.read One brand profile
PATCH /brands/{id} brand.write Update a brand profile
POST /brands/{id}/set-default brand.write Make this the brand applied to every send
DELETE /brands/{id} brand.write Delete a brand profile
GET /workspaces workspace.read Workspaces in the organization
GET /users user.read Active members — find a valid sender_email
Built in

The things that bite at scale, handled

Idempotency

Send Idempotency-Key on a bulk request and a retried timeout returns the original batch instead of mailing everyone twice.

All-or-nothing validation

One malformed row rejects the whole batch with the 1-based error.row. No half-sent batches.

Signed webhooks

HMAC-SHA256 over timestamp.body with a 5-minute replay window. Unsignable deliveries are never sent.

Predictable rate limits

300 requests a minute per key, 10 a minute for bulk. A 429 carries the same X-RateLimit-* headers as a success.

Silent-failure reporting

prefill_unmatched lists labels that matched nothing — even on rows that sent with blanks.

Verifiable output

Downloads return the PAdES-sealed PDF with its sha256, so you can verify integrity outside ERPDocs.

Know before you build

What v1 does and does not do

Stated up front so you don't design around something that doesn't exist.

Supported

  • Raw-PDF send. Anchor tags like {{sig:Role}}, {{date:Role}} and {{text:Role:Label}} to POST /signpacks.
  • Embedded signing. Mint a short-lived iframe token and host signing in your product. Register your origin on the key first.
  • Void in-flight envelopes. POST /signpacks/{id}/void.
  • 10 SignPack webhook events (Verify adds its own): signpack.sent, .completed, .declined, .recalled, .correction_requested, .cancelled, recipient.viewed, recipient.signed, email.bounced, bulk_send.completed.

Not in v1

  • Template management. Templates, roles and field placement are UI-only.
  • Recall and corrections. UI-only.
  • DSC signing. Hardware-token signing is a UI flow; DSC templates can fail per row when bulk-sent.
  • SDKs. HTTP and JSON only.
  • Simulated signing in sandbox. Sandbox keys can't send, so there is no fake completed envelope.
  • Cursor pagination. limit and offset only (Verify lists use page).
Try it now

Test the API without signing up

A shared, read-only sandbox key for a demo organization with sample templates and envelopes.

Demo API key
AEP7KDgcD904RFSNxX82kpe2zDGJHwawQE2Bu4ZCO0c

Sandbox Read-only 30 requests a minute

Base URL
https://www.erpdocs.com/api/v1
Available endpoints
  • GET /ping
  • GET /templates
  • GET /signpacks
  • GET /workspaces
  • GET /users

Sends are blocked (sandbox_write_blocked). Not for production use.

Terminal

1 Confirm the key works

curl -H "Authorization: Bearer AEP7KDgcD904RFSNxX82kpe2zDGJHwawQE2Bu4ZCO0c" \
  https://www.erpdocs.com/api/v1/ping

2 List sample templates

curl -H "Authorization: Bearer AEP7KDgcD904RFSNxX82kpe2zDGJHwawQE2Bu4ZCO0c" \
  https://www.erpdocs.com/api/v1/templates

3 Inspect a sample envelope

curl -H "Authorization: Bearer AEP7KDgcD904RFSNxX82kpe2zDGJHwawQE2Bu4ZCO0c" \
  https://www.erpdocs.com/api/v1/signpacks

Start with GET /ping

It confirms your key, organization and scopes before you debug anything else.