Skip to main content

Upload Files

Attach documents and evidence to a case using POST /cases/{id}/files.

The existing GET /cases/{id}/files endpoint retrieves files — this guide covers the write direction.

When to Use This

Upload files when you need to attach:

  • The original invoice or claim document
  • Correspondence with the debtor (letters, emails)
  • Legal filings or court documents
  • Payment proof or receipts
  • Evidence supporting the claim
  • Settlement agreements

Allowed File Types

ExtensionType
.pdfPDF document
.doc, .docxWord document
.xls, .xlsxExcel spreadsheet
.csvCSV data file
.jpg, .jpeg, .pngImage
.txtPlain text
.zipZIP archive
.emlEmail file

Files outside this list are rejected with 415 Unsupported Media Type.

Maximum size: 25 MB. Files larger than this are rejected with 413 Request Entity Too Large.

Visibility

All files uploaded through this endpoint are visible to the creditor. There is no visibility toggle.

Status Gate

Case StatusFile Upload
ActiveAllowed
PendingVerificationAllowed
PausedAllowed
NeedsAdditionalDetailsAllowed
ClosedAllowed
MergedRejected (409)

:::note Asymmetry with claim amount edit File uploads are allowed on Closed cases. This matches the partner portal — you can still add evidence to a closed case. Merged cases are the only status where uploads are blocked. :::

Document Types

The optional documentType field classifies the file. Omit it to leave the file uncategorised.

ValueDescription
OriginalInvoiceThe original invoice document
DebtorDocumentsDocuments provided by the debtor
CreditorDocumentsDocuments provided by the creditor
PartnerDocumentsDocuments from the collection partner
DemandLetterFormal demand letter
MiscellaneousOther supporting documents

Request Example

Upload is multipart/form-data:

POST /cases/{id}/files
Content-Type: multipart/form-data

file=@/path/to/invoice.pdf
documentType=OriginalInvoice
description=Original invoice from creditor

Using curl:

curl -X POST https://api.debitura.com/cases/{id}/files \
-H "XApiKey: your-api-key" \
-F "file=@invoice.pdf" \
-F "documentType=OriginalInvoice" \
-F "description=Original invoice"

Response Example

{
"id": "f1e2d3c4-...",
"fileName": "invoice.pdf",
"documentType": "OriginalInvoice",
"dateCreated": "2026-06-01T10:00:00Z",
"dateUpdated": "2026-06-01T10:00:00Z",
"caseId": "a1b2c3d4-...",
"entityType": "Case",
"entityId": "a1b2c3d4-...",
"description": "Original invoice from creditor",
"url": "https://storage.debitura.com/..."
}

The url is a temporary signed link. Generate a fresh URL by calling GET /cases/{id}/files again if your link expires.

For full endpoint details, see Upload a File to a Case.