Dokumente
Dateien zu Kontakten, Forderungen und Belegen.
GET
/api/v1/documentsBerechtigung: documents:read
Query-Parameter
contactIdstringmax. 128 ZeichendebtIdstringmax. 128 ZeichenlimitintegerAnzahl Einträge (1–100)1–100 · Standard: 25cursorstring`nextCursor` der vorherigen Seitemax. 500 Zeichen
Antwort 200
object"list"PflichtdataArray<Document>PflichtidstringPflichtobject"document"PflichtcontactIdstring | nullPflichtdebtIdstring | nullPflichtfileNamestringPflichttypestringPflichtdescriptionstringPflichtcontentTypestring | nullPflichtsizeinteger | nullPflicht-9007199254740991–9007199254740991downloadPathstringPflichtGET-Pfad zum Herunterladen (mit Authorization-Header)createdAtstring (date-time)PflichtZeitpunkt (ISO 8601)
hasMorebooleanPflichtnextCursorstring | nullPflicht
curl 'https://www.debt-flow.io/api/v1/documents' \
-H "Authorization: Bearer $DEBTFLOW_API_KEY"Antwort 200
{
"object": "list",
"data": [
{
"id": "string",
"object": "document",
"contactId": "string",
"debtId": "string",
"fileName": "string",
"type": "string",
"description": "string",
"contentType": "string",
"size": 0,
"downloadPath": "string",
"createdAt": "2026-11-01T09:30:00.000Z"
}
],
"hasMore": false,
"nextCursor": "string"
}POST
/api/v1/documentsmultipart/form-data mit Feld file (PDF, JPG, PNG, WebP, DOC, DOCX; max. 10 MB) und optional contactId, debtId, type, description.
Berechtigung: documents:write
Body (multipart/form-data)
filestring (binary)Pflichtapplication/pdf, image/jpeg, image/png, image/webp, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, max. 10240 KBcontactIdstringmax. 128 ZeichendebtIdstringmax. 128 ZeichentypeenumWerte: invoice, contract, payment_reminder, reminder, final_reminder, enforcement_order, court_order, bailiff_notice, correspondence, other · Standard: "other"descriptionstringmax. 500 Zeichen
Antwort 201 · Document
idstringPflichtobject"document"PflichtcontactIdstring | nullPflichtdebtIdstring | nullPflichtfileNamestringPflichttypestringPflichtdescriptionstringPflichtcontentTypestring | nullPflichtsizeinteger | nullPflicht-9007199254740991–9007199254740991downloadPathstringPflichtGET-Pfad zum Herunterladen (mit Authorization-Header)createdAtstring (date-time)PflichtZeitpunkt (ISO 8601)
curl
curl -X POST 'https://www.debt-flow.io/api/v1/documents' \
-H "Authorization: Bearer $DEBTFLOW_API_KEY" \
-F 'file=@datei' \
-F 'contactId=…' \
-F 'debtId=…' \
-F 'type=…' \
-F 'description=…'Antwort 201
{
"id": "string",
"object": "document",
"contactId": "string",
"debtId": "string",
"fileName": "string",
"type": "string",
"description": "string",
"contentType": "string",
"size": 0,
"downloadPath": "string",
"createdAt": "2026-11-01T09:30:00.000Z"
}GET
/api/v1/documents/{id}Metadaten; die Datei selbst unter downloadPath.
Berechtigung: documents:read
Pfadparameter
idstringPflichtID der Ressourcemax. 128 Zeichen
Antwort 200 · Document
idstringPflichtobject"document"PflichtcontactIdstring | nullPflichtdebtIdstring | nullPflichtfileNamestringPflichttypestringPflichtdescriptionstringPflichtcontentTypestring | nullPflichtsizeinteger | nullPflicht-9007199254740991–9007199254740991downloadPathstringPflichtGET-Pfad zum Herunterladen (mit Authorization-Header)createdAtstring (date-time)PflichtZeitpunkt (ISO 8601)
curl 'https://www.debt-flow.io/api/v1/documents/ID' \
-H "Authorization: Bearer $DEBTFLOW_API_KEY"Antwort 200
{
"id": "string",
"object": "document",
"contactId": "string",
"debtId": "string",
"fileName": "string",
"type": "string",
"description": "string",
"contentType": "string",
"size": 0,
"downloadPath": "string",
"createdAt": "2026-11-01T09:30:00.000Z"
}PATCH
/api/v1/documents/{id}Berechtigung: documents:write
Pfadparameter
idstringPflichtID der Ressourcemax. 128 Zeichen
Body (JSON) · DocumentUpdate
typeenumWerte: invoice, contract, payment_reminder, reminder, final_reminder, enforcement_order, court_order, bailiff_notice, correspondence, otherdescriptionstringmax. 500 ZeichenfileNamestringmax. 200 Zeichen
Antwort 200 · Document
idstringPflichtobject"document"PflichtcontactIdstring | nullPflichtdebtIdstring | nullPflichtfileNamestringPflichttypestringPflichtdescriptionstringPflichtcontentTypestring | nullPflichtsizeinteger | nullPflicht-9007199254740991–9007199254740991downloadPathstringPflichtGET-Pfad zum Herunterladen (mit Authorization-Header)createdAtstring (date-time)PflichtZeitpunkt (ISO 8601)
curl -X PATCH 'https://www.debt-flow.io/api/v1/documents/ID' \
-H "Authorization: Bearer $DEBTFLOW_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"type": "invoice",
"description": "string",
"fileName": "string"
}'Antwort 200
{
"id": "string",
"object": "document",
"contactId": "string",
"debtId": "string",
"fileName": "string",
"type": "string",
"description": "string",
"contentType": "string",
"size": 0,
"downloadPath": "string",
"createdAt": "2026-11-01T09:30:00.000Z"
}DELETE
/api/v1/documents/{id}GET
/api/v1/documents/{id}/fileLiefert die Datei (auch ältere, im Dashboard oder in der App hochgeladene Dateien) aus dem DebtFlow-Speicher.
Berechtigung: documents:read
Pfadparameter
idstringPflichtID der Ressourcemax. 128 Zeichen
Antwort 200
Datei (application/octet-stream).
curl 'https://www.debt-flow.io/api/v1/documents/ID/file' \
-H "Authorization: Bearer $DEBTFLOW_API_KEY"