Skip to content

Signing Requests API

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

Aoexl hosted signing request flow

Create Request

http
POST /functions/v1/create-signing-request

Example 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

FieldTypeNotes
documentIdstringSource document identifier
documentNamestringDisplay name for the signing request
sourceDocumentPathstringSupabase documents bucket path for the renderable PDF
sourcePdfUrlstringPublic or signed renderable PDF URL; alternative to sourceDocumentPath
signerNamestringRecipient display name
signerEmailstringRecipient email
signerPhonestringOptional recipient phone number in E.164 format (for SMS delivery)
routingModestringparallel or sequential
signingOrdernumberUsed for sequential chains
requestGroupIdstringShared group id for multi-signer workflows
fieldsarrayPrepared signing fields carried into the signer flow
sendEmailbooleanSends the invite through Resend when configured; defaults to enabled in sender flows
sendSmsbooleanSends the invite through Twilio when configured; requires signerPhone
licenseKeystringOptional SDK license key for domain validation and webhook linkage
webhookUrlstringOptional 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:

  • token
  • signingUrl
  • requestId and session identifiers
  • sourcePdfUrl when available
  • emailStatus, emailProviderId, and emailError when email delivery is attempted
  • smsStatus, smsProviderId, and smsError when SMS delivery is attempted
  • bulk-create counts and per-recipient results for bulk_create

Notes

  • Email delivery depends on Resend configuration and the sendEmail flag.
  • SMS delivery depends on Twilio configuration and sendSms with a valid E.164 signerPhone.
  • Sequential activation depends on request metadata plus completion handling.
  • License-key requests validate browser Origin or Referer against the configured license domains when those headers are present.
  • Reopened requests return a fresh signing URL and reactivated session metadata.

Built for product, engineering, and operations teams shipping PDF signing flows.