AgentInvoiceAgentInvoice
API ReferenceGetting Started

Errors

All error responses return a JSON body with a single `error` field describing what went wrong:

All error responses return a JSON body with a single error field describing what went wrong:

{ "error": "Invoice not found" }

Status codes

CodeMeaning
400Bad request — missing or invalid parameters
401Unauthorized — missing or invalid API key
403Forbidden — authenticated but not permitted to access this resource
404Not found — resource does not exist or belongs to a different account
422Unprocessable — request is well-formed but violates a business rule (e.g. editing a finalized invoice)
500Internal server error — something went wrong on our end

Business rule errors (422)

A 422 response means the request was syntactically valid but the operation is not permitted in the current state. Common examples:

  • Attempting to update an invoice that is not in draft status
  • Sending an invoice that has not been finalized
  • Deleting a client that has associated invoices

On this page