Skip to content

Deliveries API

Track email deliveries for documents (invoices, credit notes, quotes, and so on).

Send a Document via Email

POST /api/v1/documents/{document_id}/send

Note

The document must be in finalized status before it can be sent, and it must have at least one render (send attaches the latest rendered PDF). See Document Lifecycle for details.

Request:

{
  "to": ["client@example.com"],
  "cc": ["accounting@acme.com"],
  "bcc": [],
  "subject": "Invoice INV-2026-001",
  "message": "Please find your invoice attached.",
  "attach_pdf": true
}
Field Required Default Description
to Yes List of recipient email addresses
cc No [] Carbon copy recipients
bcc No [] Blind carbon copy recipients
subject No Auto-generated Email subject line
message No null Email body text
attach_pdf No true Whether to attach the rendered PDF

The invoice_id field in the response holds the ID of the document that was sent.

Response 200 OK:

{
  "data": {
    "id": "dlv_01ABC",
    "invoice_id": "inv_01XYZ",
    "to": ["client@example.com"],
    "cc": ["accounting@acme.com"],
    "bcc": [],
    "subject": "Invoice INV-2026-001",
    "message": "Please find your invoice attached.",
    "attach_pdf": true,
    "status": "queued",
    "created_at": "2026-07-20T10:00:00Z",
    "sent_at": null
  }
}

Get Delivery

GET /api/v1/deliveries/{delivery_id}

Response:

{
  "data": {
    "id": "dlv_01ABC",
    "invoice_id": "inv_01XYZ",
    "to": ["client@example.com"],
    "cc": ["accounting@acme.com"],
    "bcc": [],
    "subject": "Invoice INV-2026-001",
    "message": "Please find your invoice attached.",
    "attach_pdf": true,
    "status": "delivered",
    "created_at": "2026-07-20T10:00:00Z",
    "sent_at": "2026-07-20T10:00:05Z"
  }
}
Try it

List Document Deliveries

GET /api/v1/documents/{document_id}/deliveries

Returns all deliveries for a specific document.

Response:

{
  "data": [
    {
      "id": "dlv_01ABC",
      "invoice_id": "inv_01XYZ",
      "to": ["client@example.com"],
      "status": "delivered",
      "created_at": "2026-07-20T10:00:00Z",
      "sent_at": "2026-07-20T10:00:05Z"
    }
  ],
  "pagination": {
    "has_more": false,
    "next_cursor": null
  }
}

Delivery Statuses

Status Description
queued Email is queued for delivery
sent Email has been handed off to the mail provider
delivered Email was successfully delivered to the recipient
bounced Email bounced (invalid address or mailbox full)
failed Delivery failed permanently

Retry Delivery

POST /api/v1/deliveries/{delivery_id}/retry

Re-send a delivery that didn't get through. Retry creates a new delivery to the same recipients — re-attaching the latest PDF render if the original had attach_pdf — and returns it. Only deliveries in failed or bounced status can be retried; anything else returns 409 conflict.

Response:

{
  "data": {
    "id": "dlv_09XYZ",
    "invoice_id": "doc_01ABC",
    "to": ["customer@example.com"],
    "cc": [],
    "bcc": [],
    "subject": "Invoice INV-2026-001",
    "message": "Thanks for your business.",
    "attach_pdf": true,
    "status": "queued",
    "created_at": "2026-08-06T09:00:00Z",
    "sent_at": null
  }
}

The response is a fresh delivery record — track it with Get Delivery, or watch for the delivery webhook.

Try it