POST
Upload Invoice Document For Debt

Overview

Upload a PDF invoice document and attach it directly to a debt using the debt’s stable encrypted API ID. This endpoint is intended for the two-step flow: create or update the debt first, then upload the invoice PDF for that debt.

Authentication

Requires a valid OAuth 2.0 access token with the invoice_documents:write scope. The legacy debts:write scope is also accepted during the transition.

Request

string
required
Bearer token for authentication
string
required
Must be multipart/form-data
string
required
Stable encrypted debt ID returned by the Debts API
file
required
PDF invoice file. Maximum size: 25 MB.
boolean
Set to true to replace an existing manually uploaded invoice document. Default: false.

Example Request

curl

Success Response

Errors

  • 400 - Missing file, invalid upload, non-PDF file, or file too large
  • 403 - Missing scope or invoice documents feature is not enabled
  • 404 - Debt not found or not accessible
  • 409 - The debt already has an invoice document and replace_manual was not set