Skip to main content

Document Sending API (v1)

The Document Sending API allows integration with the document sending platform to deliver quote documents (PDFs) to customers via SMS and/or Email, and track engagement events.

Authentication

All API requests require authentication. Details will be provided later.

Error Handling

All error responses follow the standard ApiError format with:

  • error.code - Machine-readable error code (e.g., ValidationError, InternalServerError)
  • error.message - Human-readable description
  • error.innerErrors - Optional nested errors for field-level validation details

Callbacks

After a document sending is initiated, lifecycle and engagement events are delivered to the callback URL provided in the request as POST requests with a JSON body. See the callbacks section on the Initiate endpoint for the payload schema and examples.

DocumentSending

Initiate document sending

Starts the process of sending a document (PDF) to a customer via one or more delivery methods (SMS, Email, or both).

What happens after initiation:

  1. The document is validated and stored
  2. Organization settings are resolved (templates, send-window, expiry)
  3. A hosted document link is generated
  4. Delivery channels are processed (Email send, SMS send with quiet-hours scheduling)
  5. Lifecycle and engagement events are sent to the provided callback URL

Dual-channel semantics: When both SMS and Email are requested, both channels share the same hosted document link. Partial success is valid: one channel may complete while the other is blocked or failed.

Request Body schema: multipart/form-data
required

Document sending request with recipient, initiator, organization, callback URL, and PDF file

callbackUrl
required
string <uri>

HTTPS endpoint that will receive document sending event updates

file
required
string <binary>

PDF document to be sent to the customer

required
object (DocumentSendingInitiator)

Information about the agent initiating the document sending

organizationCode
required
string

Organization code used to resolve configuration

required
object (DocumentSendingRecipient)

Information about the recipient customer

Responses

Response Schema: application/json
documentSendingId
required
string <uuid>

Unique identifier for the document sending request

Callbacks

Response samples

Content type
application/json
{
  • "documentSendingId": "619c271f-51b8-773f-865c-fe5c71e5c9cb"
}

Callback payload samples

Callback
POST: Document sending event callback
Content type
application/json
Example
{
  • "documentSendingId": "619c271f-51b8-773f-865c-fe5c71e5c9cb",
  • "documentSendingEvent": "linkOpened",
  • "timestamp": "2026-06-01T12:00:00Z"
}