API & WebhooksDocument Workflows

Document Workflows

Send and void documents via the API.

Document Workflows API

Trigger document lifecycle actions. These endpoints require an API token with the appropriate documents.send or documents.void ability.


Send Document

POST /api/v1/documents/{id}/send — Permission: documents.send

Sends a draft document to its recipient. The document must be in draft or viewed status and must have a recipient assigned.

Example Request

curl -X POST "https://your-domain.com/api/v1/documents/42/send" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Example Response

{
  "data": {
    "id": 42,
    "type": "invoice",
    "number": "INV-0042",
    "title": "March Services",
    "status": "sent",
    "total": "1500.00",
    "sent_at": "2025-06-02T10:30:00.000000Z",
    "created_at": "2025-06-01T09:00:00.000000Z",
    "updated_at": "2025-06-02T10:30:00.000000Z"
  }
}

Returns 422 if the document is not in a sendable status or has no recipient.


Void Document

POST /api/v1/documents/{id}/void — Permission: documents.void

Voids a document and any subsequent workflow steps. Cannot void documents that are already void, cancelled, paid, or refunded. Documents with partial payments must be refunded first.

Request Body

ParameterTypeRequiredDescription
void_reasonstringNoReason for voiding (max 500 characters)

Example Request

curl -X POST "https://your-domain.com/api/v1/documents/42/void" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"void_reason": "Client requested cancellation"}'

Example Response

{
  "data": {
    "id": 42,
    "type": "invoice",
    "number": "INV-0042",
    "status": "void",
    "total": "1500.00",
    "created_at": "2025-06-01T09:00:00.000000Z",
    "updated_at": "2025-06-02T11:00:00.000000Z"
  }
}

Returns 422 if the document cannot be voided in its current status.

Was this article helpful?