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
| Extension | Type |
|---|---|
.pdf | PDF document |
.doc, .docx | Word document |
.xls, .xlsx | Excel spreadsheet |
.csv | CSV data file |
.jpg, .jpeg, .png | Image |
.txt | Plain text |
.zip | ZIP archive |
.eml | Email 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 Status | File Upload |
|---|---|
| Active | Allowed |
| PendingVerification | Allowed |
| Paused | Allowed |
| NeedsAdditionalDetails | Allowed |
| Closed | Allowed |
| Merged | Rejected (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.
| Value | Description |
|---|---|
OriginalInvoice | The original invoice document |
DebtorDocuments | Documents provided by the debtor |
CreditorDocuments | Documents provided by the creditor |
PartnerDocuments | Documents from the collection partner |
DemandLetter | Formal demand letter |
Miscellaneous | Other 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.