SealRoute Docs
  • Get Started
  • API Reference
  • SDKs
  • Guides
  • Webhooks
Getting Started
powered by Zudoku
Get Started

Getting Started

SealRoute API Documentation

Complete REST API reference for integrating SealRoute into your own applications.

Authentication

All API requests require the X-Auth-Token header (unless noted otherwise):

Code
X-Auth-Token: YOUR_API_KEY

Get your API key from Settings → API or via the User Management API.


User Management

List Users

Code
GET /api/users

Returns all active users in the account. Admin only.

Response:

Code
[ { "id": 1, "email": "admin@example.com", "first_name": "John", "last_name": "Doe", "role": "admin", "created_at": "2026-01-01T00:00:00Z", "updated_at": "2026-01-01T00:00:00Z" } ]

Get Current User

Code
GET /api/user

Returns the authenticated user's info.

Get User by ID

Code
GET /api/users/:id

Admin only.

Create User

Code
POST /api/users

Admin only. Returns the new user with their API key.

ParameterTypeRequiredDescription
emailstringYesUser email address
first_namestringNoFirst name
last_namestringNoLast name
passwordstringNoPassword (auto-generated if blank)
rolestringNoadmin, editor, or viewer (default: admin)

Example:

TerminalCode
curl -X POST https://sealroute.com/api/users \ -H "X-Auth-Token: YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{"email":"new@example.com","first_name":"Jane","role":"editor"}'

Response (201):

Code
{ "id": 5, "email": "new@example.com", "first_name": "Jane", "last_name": null, "role": "editor", "api_key": "abc123...generated_key..." }

Update User

Code
PUT /api/users/:id

Admin only.

ParameterTypeDescription
emailstringNew email
first_namestringNew first name
last_namestringNew last name
passwordstringNew password
rolestringadmin, editor, or viewer

Delete User

Code
DELETE /api/users/:id

Admin only. Soft-deletes (archives) the user. Cannot delete yourself.

Get User's API Key

Code
GET /api/users/:id/api_key

Admin only.

Response:

Code
{ "id": 5, "email": "user@example.com", "api_key": "abc123..." }

Regenerate User's API Key

Code
POST /api/users/:id/api_key

Admin only. Generates a new API key (old key stops working immediately).


Templates

List Templates

Code
GET /api/templates
ParameterTypeDescription
qstringSearch by name
folderstringFilter by folder name
archivedbooleanInclude archived templates
external_idstringFilter by external ID
limitintegerMax results (default 10, max 100)
afterintegerCursor for pagination (ID)
beforeintegerCursor for pagination (ID)

Get Template

Code
GET /api/templates/:id

Update Template

Code
PUT /api/templates/:id
ParameterTypeDescription
namestringTemplate name
external_idstringExternal identifier
folder_namestringMove to folder
rolesarrayUpdate submitter roles
fieldsarrayUpdate field definitions
archivedbooleanArchive/unarchive

Delete Template

Code
DELETE /api/templates/:id
ParameterTypeDescription
permanentlybooleanIf true, permanently delete (default: archive)

Clone Template

Code
POST /api/templates/:template_id/clone
ParameterTypeDescription
namestringName for the clone
folder_namestringTarget folder
external_idstringExternal ID for the clone

Submissions

List Submissions

Code
GET /api/submissions
ParameterTypeDescription
qstringSearch query
template_idintegerFilter by template
template_folderstringFilter by folder
archivedbooleanInclude archived
limitintegerMax results (default 10, max 100)
afterintegerCursor pagination
beforeintegerCursor pagination

Get Submission

Code
GET /api/submissions/:id

Create Submission

Code
POST /api/submissions

Create a submission from an existing template.

Top-Level Parameters

ParameterTypeRequiredDescription
template_idintegerYesTemplate to use
submittersarrayYesArray of submitter objects (see below)
orderstringNopreserved (sequential) or random (parallel)
send_emailbooleanNoSend invitation emails (default: true)
messageobjectNoCustom email { subject, body }
consent_enabledbooleanNoRequire consent checkbox for all submitters
consent_document_urlstringNoTerms and conditions URL
consent_document_textstringNoConsent checkbox label text
preferencesobjectNoTemplate-level preferences (see Template Preferences)

Submitter-Level Parameters (submitters[])

ParameterTypeRequiredDescription
rolestringYesMust match a role defined in the template
emailstringYes*Submitter email (* or phone required)
namestringNoDisplay name
phonestringNoPhone number (E.164 format, e.g. +628123456789)
external_idstringNoYour external identifier
valuesobjectNoPre-fill {{...;type=X}} form field values (keyed by field name)
variablesobjectNoRole-scoped [[...]] data variables (merged with top-level variables)
fieldsarrayNoOverride field settings ([{ name, default_value, readonly, required }])
metadataobjectNoCustom key-value data stored with the submitter
send_emailbooleanNoSend invitation email (overrides top-level)
send_smsbooleanNoSend invitation SMS
completed_redirect_urlstringNoRedirect URL after signing
orderintegerNoPosition in signing sequence (0 = first, same number = parallel)
completedbooleanNoMark as pre-completed (skip signing)
go_to_lastbooleanNoStart at the last unfilled field
require_phone_2fabooleanNoRequire phone OTP verification to access
require_email_2fabooleanNoRequire email OTP verification to access
consent_enabledbooleanNoPer-submitter consent override
consent_document_urlstringNoPer-submitter terms URL
consent_document_textstringNoPer-submitter consent checkbox text
reply_tostringNoReply-to email address for invitation
logo_urlstringNoWhite-label logo for this recipient only (overrides account default; never modifies account Personalization)
company_namestringNoWhite-label brand name for this recipient only
stamp_urlstringNoStamp image URL for this recipient only (falls back to logo_url)
message.subjectstringNoCustom email subject for this submitter
message.bodystringNoCustom email body for this submitter

Create Submission from DOCX

Code
POST /api/submissions/docx

Create a one-off submission from a DOCX file with embedded tags. The DOCX can contain [[variable]] data placeholders and {{Field;type=X}} form field tags. See TEMPLATE_TAGS.md for full tag syntax.

Top-Level Parameters

ParameterTypeRequiredDescription
documentsarrayYes[{ name: "file.docx", file: "BASE64..." }]
variablesobjectNoData variables for [[...]] placeholders
submittersarrayYesArray of submitter objects (see below)
namestringNoSubmission name
orderstringNopreserved (sequential) or random (parallel)
send_emailbooleanNoSend invitation emails (default: true)
consent_enabledbooleanNoRequire consent checkbox for all submitters
consent_document_urlstringNoTerms and conditions URL
consent_document_textstringNoConsent checkbox label text
preferencesobjectNoTemplate-level preferences (see Template Preferences)

Submitter-Level Parameters (submitters[])

ParameterTypeRequiredDescription
rolestringYesMust match role= in {{...}} tags
emailstringYes*Submitter email (* or phone required)
namestringNoDisplay name
phonestringNoPhone number (E.164 format, e.g. +628123456789)
external_idstringNoYour external identifier
valuesobjectNoPre-fill {{...;type=X}} form fields (keyed by field name)
variablesobjectNoRole-scoped [[...]] variables (merged with top-level variables)
fieldsarrayNoOverride field settings ([{ name, default_value, readonly, required }])
metadataobjectNoCustom key-value data stored with the submitter
send_emailbooleanNoSend invitation email (overrides top-level)
send_smsbooleanNoSend invitation SMS
completed_redirect_urlstringNoRedirect URL after signing
orderintegerNoPosition in signing sequence (0 = first, same number = parallel)
completedbooleanNoMark as pre-completed (skip signing)
go_to_lastbooleanNoStart at the last unfilled field
require_phone_2fabooleanNoRequire phone OTP verification to access
require_email_2fabooleanNoRequire email OTP verification to access
consent_enabledbooleanNoPer-submitter consent override
consent_document_urlstringNoPer-submitter terms URL
consent_document_textstringNoPer-submitter consent checkbox text
reply_tostringNoReply-to email address for invitation
logo_urlstringNoWhite-label logo for this recipient only (overrides account default; never modifies account Personalization)
company_namestringNoWhite-label brand name for this recipient only
stamp_urlstringNoStamp image URL for this recipient only (falls back to logo_url)
message.subjectstringNoCustom email subject for this submitter
message.bodystringNoCustom email body for this submitter

Variables vs Values

JSON KeyDOCX TagPurpose
variables (top-level or submitters[].variables)[[variable_name]]Static text replacement before PDF generation
submitters[].values{{FieldName;type=X}}Pre-fill interactive form fields

Top-level variables and each submitter's variables are merged into a single map. Later submitters override duplicate keys.

DOCX Formatting Inheritance

The API automatically carries your Word document's formatting onto the rendered form fields, so the signed PDF matches the look of your DOCX:

PropertySource in WordEffect
AlignmentParagraph alignment (center, right)Field is rendered with the same alignment
Font familyFont of the surrounding text (Times New Roman → Times, Arial → Helvetica, Courier New → Courier)Same font used for the rendered value
Font sizeFont size of the surrounding text or the document defaultSame point size used for the rendered value

Explicit tag attributes (e.g., font=Courier;font_size=14) override DOCX formatting. For full details see Template Tags → DOCX Formatting Inheritance.

Template Preferences

Both POST /api/submissions and POST /api/submissions/docx accept a top-level preferences object that is persisted on the submission's template. These flags override account-level defaults (configured under Settings → Personalization) for this specific submission.

KeyTypeDefaultDescription
completed_notification_email_enabledbooleantrueSend the sender a notification email when all submitters complete
completed_notification_email_attach_auditbooleantrueAttach the audit log PDF to the sender's completion-notification email
completed_notification_email_attach_documentsbooleantrueAttach signed document PDFs to the sender's completion-notification email
documents_copy_email_enabledbooleantrueEmail each signer a copy of the completed documents
documents_copy_email_attach_auditbooleantrueAttach the audit log PDF to the signer's copy email
documents_copy_email_attach_documentsbooleantrueAttach signed document PDFs to the signer's copy email
submitters_orderstring—preserved (sequential) or random (parallel). Same effect as top-level order.
bcc_completedstring—Comma-separated BCC addresses for completion notifications
require_email_2fabooleanfalseRequire email OTP for every signer
require_phone_2fabooleanfalseRequire phone OTP (requires phone OTP webhook config)
shared_link_2fabooleanfalseRequire email 2FA when the signing link is shared

Account-level toggles act as a ceiling: if e.g. attach_audit_log is disabled under Personalization, a template-level true here will not re-enable it. The audit trail PDF itself is always generated on completion regardless of these flags; they only control whether it is attached to outgoing emails.

Example

TerminalCode
curl -X POST https://sealroute.com/api/submissions/docx \ -H "X-Auth-Token: YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "Contract", "documents": [{"name": "contract.docx", "file": "BASE64_DATA"}], "variables": { "contract_number": "C-001", "contract_date": "April 15, 2026" }, "submitters": [ { "role": "anggota", "email": "member@example.com", "phone": "+628123456789", "variables": { "Nama_Anggota": "Muhammad", "NRP_Anggota": "1234567890" } }, { "role": "Buyer", "email": "buyer@example.com", "name": "John Doe" } ], "order": "preserved", "send_email": false, "logo_url": "https://example.com/logo.png", "company_name": "My Company", "preferences": { "completed_notification_email_attach_audit": true, "documents_copy_email_attach_audit": true } }'

Response (200): Array of submitter objects with signing URLs:

Code
[ { "id": 1, "submission_id": 100, "role": "anggota", "email": "member@example.com", "status": "pending", "embed_src": "https://sealroute.com/s/AbCdEf..." }, { "id": 2, "submission_id": 100, "role": "Buyer", "email": "buyer@example.com", "status": "pending", "embed_src": "https://sealroute.com/s/GhIjKl..." } ]

Create Submission from PDF

Code
POST /api/submissions/pdf

Create a submission from a PDF file with text tags.

ParameterTypeRequiredDescription
documentsarrayYes[{ name: "file.pdf", file: "BASE64..." }]
submittersarrayYesSubmitter objects
namestringNoSubmission name

Delete Submission

Code
DELETE /api/submissions/:id
ParameterTypeDescription
permanentlybooleanPermanently delete (default: archive)

Get Submission Documents

Code
GET /api/submissions/:id/documents

Returns signed document download URLs.

ParameterTypeDescription
mergestringSet to true to get a single merged PDF

Response:

Code
{ "id": 1, "documents": [ { "name": "contract.pdf", "url": "https://..." } ] }

Submitters

List Submitters

Code
GET /api/submitters
ParameterTypeDescription
qstringSearch by name/email
submission_idintegerFilter by submission
template_idintegerFilter by template
external_idstringFilter by external ID
slugstringFilter by slug
completed_afterstringFilter by completion date (ISO 8601)
completed_beforestringFilter by completion date (ISO 8601)
limitintegerMax results
afterintegerCursor pagination
beforeintegerCursor pagination

Get Submitter

Code
GET /api/submitters/:id

Update Submitter

Code
PUT /api/submitters/:id
ParameterTypeDescription
namestringDisplay name
emailstringEmail address
phonestringPhone number
valuesobjectField values
metadataobjectCustom metadata
send_emailbooleanRe-send invitation email
send_smsbooleanRe-send invitation SMS
completedbooleanMark as completed
fieldsarrayOverride field settings
logo_urlstringPer-submitter white-label logo URL (overrides account default; never modifies account Personalization). Pass empty string to clear.
company_namestringPer-submitter white-label brand name (overrides account default; never modifies account Personalization)
stamp_urlstringPer-submitter signature stamp image (falls back to logo_url)

Per-API-call White-Label Branding

You can override the SealRoute logo, brand name, and signature stamp image per recipient through the API. Branding sent through the API is scoped strictly to the receiving submitter — it never modifies your account's Personalization settings, never affects other recipients on the same submission, and never appears on the audit-trail certificate.

Precedence (first non-empty value wins):

  1. submitters[].logo_url / company_name / stamp_url — per-recipient (the only API surface)
  2. Account Personalization (Settings → Personalization, UI-only)
  3. SealRoute defaults

The values flow into:

  • The signing page header (logo + brand name) for that recipient
  • The post-completion receipt page (/document/:slug/completed) for that recipient
  • The signature stamp image rendered into the recipient's signed copy (stamp_url, then logo_url)

The values do not flow into:

  • Account-level Personalization (account_configs) — the API can never write here
  • The dashboard / settings UI
  • The audit-trail PDF header (always uses account defaults)
  • Other recipients on the same submission

Notes:

  • Only public URLs are fetched. Non-image responses or redirect loops are silently dropped — the next layer in the chain is used.
  • Sending an empty string on PUT /api/submitters/:id clears a previously stored override.
  • These overrides are persisted on the submitter record, so reopening the link later still shows the same branding.
  • Top-level logo_url / company_name / stamp_url on POST /api/submissions and POST /api/submissions/docx is ignored; supply them inside submitters[] instead.

Tools

Merge PDFs

Code
POST /api/tools/merge

Merge multiple PDF files into one.

ParameterTypeDescription
filesarrayArray of base64-encoded PDF strings

Response:

Code
{ "data": "BASE64_MERGED_PDF" }

Verify PDF Signature

Code
POST /api/tools/verify

Verify digital signatures in a PDF.

ParameterTypeDescription
filestringBase64-encoded PDF

Response:

Code
{ "checksum_status": "valid", "signatures": [...] }

Webhooks

Manage outgoing webhook URLs that receive HTTP POST callbacks when events occur. Admin only.

Supported Events

EventTriggered When
form.viewedA submitter views the signing form
form.startedA submitter starts filling the form
form.completedA submitter finishes signing
form.declinedA submitter declines to sign
submission.createdA new submission is created
submission.completedAll submitters have completed
submission.expiredA submission expires
submission.archivedA submission is archived
template.createdA new template is created
template.updatedA template is modified

List Webhooks

Code
GET /api/webhooks
ParameterTypeDescription
limitintegerMax results (default 10, max 100)
afterintegerCursor pagination (ID)
beforeintegerCursor pagination (ID)

Response:

Code
{ "data": [ { "id": 1, "url": "https://example.com/webhook", "events": ["form.completed", "submission.completed"], "secret": { "X-Webhook-Secret": "your_secret" }, "created_at": "2026-01-01T00:00:00Z", "updated_at": "2026-01-01T00:00:00Z" } ], "pagination": { "count": 1, "next": 1, "prev": 1 } }

Get Webhook

Code
GET /api/webhooks/:id

Create Webhook

Code
POST /api/webhooks
ParameterTypeRequiredDescription
urlstringYesDestination URL (receives POST requests)
eventsarrayNoEvent types to subscribe to (default: all form events)
secretobjectNoCustom HTTP header { "Header-Name": "value" } sent with each request

Example:

TerminalCode
curl -X POST https://sealroute.com/api/webhooks \ -H "X-Auth-Token: YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com/webhook", "events": ["form.completed", "submission.completed"], "secret": { "X-Webhook-Secret": "my_secret_token" } }'

Response (201):

Code
{ "id": 1, "url": "https://example.com/webhook", "events": ["form.completed", "submission.completed"], "secret": { "X-Webhook-Secret": "my_secret_token" }, "created_at": "2026-04-15T10:00:00Z", "updated_at": "2026-04-15T10:00:00Z" }

Update Webhook

Code
PUT /api/webhooks/:id
ParameterTypeDescription
urlstringNew destination URL
eventsarrayReplace subscribed events
secretobjectReplace secret header

Delete Webhook

Code
DELETE /api/webhooks/:id

Response:

Code
{ "message": "Webhook has been deleted" }

Test Webhook

Code
POST /api/webhooks/:id/test

Sends a test form.completed event using the most recently completed submitter. Useful for verifying your endpoint works.

Response:

Code
{ "message": "Test webhook request has been queued" }

Webhook Payload Format

When an event fires, SealRoute sends a POST request to your URL with this JSON body:

Code
{ "event_type": "form.completed", "timestamp": "2026-04-15T10:30:00Z", "data": { "id": 123, "submission_id": 456, "email": "signer@example.com", "status": "completed", ... } }

The data shape depends on the event type:

  • form.* events include submitter details (id, email, name, status, values, documents)
  • submission.* events include submission details (id, status, submitters, template)
  • template.* events include template details (id, name, fields, submitters)

If a secret header is configured, it is included in every request for your server to verify authenticity.


Events (Polling)

As an alternative to webhooks, you can poll for events.

Form Events

Code
GET /api/events/form/:type

List form-related events (e.g., form.completed).

ParameterTypeDescription
limitintegerMax results
afterstringUnix timestamp cursor
beforestringUnix timestamp cursor

Submission Events

Code
GET /api/events/submission/:type

List submission-related events (e.g., submission.completed).

Same pagination parameters as form events.


File Upload

Upload Attachment

Code
POST /api/attachments

No authentication required — uses submitter slug for authorization.

ParameterTypeDescription
submitter_slugstringSubmitter's unique slug
typestringField type (signature, initials, image, etc.)
filefileThe file to upload

Pagination

List endpoints support cursor-based pagination:

Code
{ "data": [...], "pagination": { "count": 10, "next": 123, "prev": 456 } }

Use after and before query parameters with the cursor values.


Error Responses

StatusDescription
401Missing or invalid X-Auth-Token
403Insufficient permissions (wrong role)
404Resource not found
422Validation error (check error field)
429Rate limited

Error format:

Code
{ "error": "Description of the error" }

Roles & Permissions

RoleTemplatesSubmissionsUsersSettings
adminFull accessFull accessCRUDFull access
editorOwn + sharedOwn templatesRead onlyLimited
viewerShared onlyShared onlySelf onlyNone

Rate Limits

The API does not enforce hard rate limits by default, but the phone verification endpoint (/api/send_phone_verification_code) has a 60-second cooldown per phone number.

Last modified on May 11, 2026
On this page
  • Authentication
  • User Management
    • List Users
    • Get Current User
    • Get User by ID
    • Create User
    • Update User
    • Delete User
    • Get User's API Key
    • Regenerate User's API Key
  • Templates
    • List Templates
    • Get Template
    • Update Template
    • Delete Template
    • Clone Template
  • Submissions
    • List Submissions
    • Get Submission
    • Create Submission
    • Create Submission from DOCX
    • Create Submission from PDF
    • Delete Submission
    • Get Submission Documents
  • Submitters
    • List Submitters
    • Get Submitter
    • Update Submitter
    • Per-API-call White-Label Branding
  • Tools
    • Merge PDFs
    • Verify PDF Signature
  • Webhooks
    • Supported Events
    • List Webhooks
    • Get Webhook
    • Create Webhook
    • Update Webhook
    • Delete Webhook
    • Test Webhook
    • Webhook Payload Format
  • Events (Polling)
    • Form Events
    • Submission Events
  • File Upload
    • Upload Attachment
  • Pagination
  • Error Responses
  • Roles & Permissions
  • Rate Limits
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON