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.

The response returns as soon as the delivery is recorded — the email is sent in the background. A send that fails for a transient reason is retried automatically with backoff; poll Get Delivery for the outcome.

Response 202 Accepted:

{
  "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": "sent",
    "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": "sent",
      "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. This is the terminal success — see the note below
failed Delivery failed permanently, after automatic retries were exhausted

sent is as far as we can honestly claim

Nothing reports back what the mail provider did with the message after we handed it over, so the API does not claim to know whether it reached the mailbox. delivered and bounced used to be listed here; they were never set by anything, which made them a promise about bounce handling the product does not have.

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 status can be retried; anything else returns 409 conflict. Transient failures are already retried automatically, so this is for after those attempts are exhausted.

Response 202 Accepted:

{
  "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