Signing Requests API
The current signing-request flow is powered by the create-signing-request edge function.

Create Request
http
POST /functions/v1/create-signing-requestExample Payload
json
{
"documentId": "doc_123",
"documentName": "Merchant.pdf",
"sourceDocumentPath": "user_123/doc_123.pdf",
"signerName": "Jane Doe",
"signerEmail": "jane@example.com",
"signerPhone": "+14155550123",
"routingMode": "parallel",
"sendEmail": true,
"sendSms": true
}Use sourcePdfUrl instead of sourceDocumentPath when the PDF is already available through a public or signed URL.
Common Fields
| Field | Type | Notes |
|---|---|---|
documentId | string | Source document identifier |
documentName | string | Display name for the signing request |
sourceDocumentPath | string | Supabase documents bucket path for the renderable PDF |
sourcePdfUrl | string | Public or signed renderable PDF URL; alternative to sourceDocumentPath |
signerName | string | Recipient display name |
signerEmail | string | Recipient email |
signerPhone | string | Optional recipient phone number in E.164 format (for SMS delivery) |
routingMode | string | parallel or sequential |
signingOrder | number | Used for sequential chains |
requestGroupId | string | Shared group id for multi-signer workflows |
fields | array | Prepared signing fields carried into the signer flow |
sendEmail | boolean | Sends the invite through Resend when configured; defaults to enabled in sender flows |
sendSms | boolean | Sends the invite through Twilio when configured; requires signerPhone |
licenseKey | string | Optional SDK license key for domain validation and webhook linkage |
webhookUrl | string | Optional license-linked completion destination |
Create and bulk-create calls require either sourceDocumentPath or sourcePdfUrl. A request with only documentId is rejected because hosted signing links need a PDF that can be fetched by the signing page.
Supported Operations
The frontend/service layer currently supports:
- create
- bulk create (
bulk_create) - resend
- cancel
- duplicate
- reopen
Operation Examples
json
{ "action": "resend", "requestId": "req_123", "sendEmail": true }json
{ "action": "cancel", "requestId": "req_123" }json
{ "action": "reopen", "requestId": "req_123", "sendEmail": true }Use cancel to invalidate an active pending link. Use reopen when a cancelled or expired request should produce a fresh active signing URL.
Response Shape
Typical response data includes:
tokensigningUrlrequestIdand session identifierssourcePdfUrlwhen availableemailStatus,emailProviderId, andemailErrorwhen email delivery is attemptedsmsStatus,smsProviderId, andsmsErrorwhen SMS delivery is attempted- bulk-create counts and per-recipient results for
bulk_create
Notes
- Email delivery depends on Resend configuration and the
sendEmailflag. - SMS delivery depends on Twilio configuration and
sendSmswith a valid E.164signerPhone. - Sequential activation depends on request metadata plus completion handling.
- License-key requests validate browser
OriginorRefereragainst the configured license domains when those headers are present. - Reopened requests return a fresh signing URL and reactivated session metadata.