Skip to content

Documents

RecovAI reads the documents on a case (agreements, statements, filings) to build its picture of the account. Uploading the right documents is usually what moves a case forward.

Method Path What it does
POST /cases/{id}/documents Upload a document
GET /cases/{id}/documents List a case’s documents
GET /documents/{docId}/file Download a document
POST/cases/{id}/documentsmultipart/form-dataChanges dataAPI key
Field Type Required Description
file file yes PDF, PNG, JPEG or TIFF, up to 25 MB.
type string yes One of the document types.
Terminal window
curl https://api.recovai.ai/cases/5b0e2c1a-7d4f-4c2b-9a61-2f8e3d4c5b6a/documents \
-H "X-API-Key: $RECOVAI_API_KEY" \
-F type=bank_statement \
{
"doc": {
"id": "0d9e8f7a-6b5c-4d3e-a2f1-0e9d8c7b6a50",
"case_id": "5b0e2c1a-7d4f-4c2b-9a61-2f8e3d4c5b6a",
"type": "bank_statement",
"status": "uploaded",
"ocr_status": "not_started",
"extraction_status": "not_started",
"original_file_name": "statement-2026-09.pdf",
"mime_type": "application/pdf",
"created_at": "2026-10-14T15:44:12.000Z"
},
"duplicate_of_case_id": null,
"readiness": "ready_for_extraction"
}
  • readiness is the case’s readiness after the upload.
  • If the identical file is already on another case, it is still uploaded, and duplicate_of_case_id names that case.
  • Uploading the same file twice to the same case is refused with 409 document_already_on_case.

400 file_required, 404 case_not_found, 409 document_already_on_case, 413 upload_rejected (too large), 415 unsupported_file_type, 422 validation_error (unknown type).

GET/cases/{id}/documentsRead onlyAPI key
Terminal window
curl https://api.recovai.ai/cases/5b0e2c1a-7d4f-4c2b-9a61-2f8e3d4c5b6a/documents \
-H "X-API-Key: $RECOVAI_API_KEY"

Returns the documents currently active on the case, newest first.

{
"documents": [
{
"id": "0d9e8f7a-6b5c-4d3e-a2f1-0e9d8c7b6a50",
"type": "bank_statement",
"status": "verified",
"verified": true,
"original_file_name": "statement-2026-09.pdf",
"mime_type": "application/pdf",
"created_at": "2026-10-14T15:44:12.000Z"
}
]
}
GET/documents/{docId}/fileRead onlyAPI key

Streams the stored file with its original content type. Add ?download=1 to receive it as an attachment; downloads are recorded in your workspace audit log.

Terminal window
curl "https://api.recovai.ai/documents/0d9e8f7a-6b5c-4d3e-a2f1-0e9d8c7b6a50/file?download=1" \
-H "X-API-Key: $RECOVAI_API_KEY" \
-o statement.pdf

404 file_not_found.

Value Document
contract The agreement.
ucc_filing UCC filing.
bank_statement Bank statement.
billing_statement Billing statement.
transaction_history Transaction history.
letter_of_representation Letter of representation.
letter_of_agency Letter of agency.
proof_of_assignment Proof of assignment.
state_disclosure State disclosure.
correspondence Correspondence.
return_receipt Return receipt.
redacted_packet Redacted packet.
generated_notice A notice generated outside RecovAI.
other Anything else.