Skip to main content

Send Chat Messages

Send messages to creditors via the Collection Partner API.

Overview

Use POST /cases/{id}/chats to send messages to the creditor on a case. This is the programmatic equivalent of typing a message in the Partner Portal chat.

For reading messages (including creditor replies), use GET /cases/{id}/chats.

Implementation

Sending a message requires identifying the sender — the team member who will appear as the author. Identify them with either userEmail or userId; at least one is required. Retrieve valid team members from GET /users before calling this endpoint.

POST https://collectionpartner-api.debitura.com/cases/{id}/chats
XApiKey: YOUR_API_KEY
Content-Type: application/json

{
"message": "Could you please provide the original signed contract for this case?",
"userEmail": "collector@agency.com"
}
ParameterTypeRequiredDescription
messagestringYesThe message text to send to the creditor (1–10,000 characters)
userEmailstringYes*Email of the active team member who will appear as the sender. Recommended over userId. Use GET /users to list valid users
userIdUUIDYes*Deprecated — legacy alternative to userEmail. Still accepted for backwards compatibility

* Provide at least one of userEmail or userId (userEmail takes precedence if both are sent). If neither is supplied, the request returns 400 with error MissingUserIdentifier.

A successful call returns 200 OK with the created chat message:

{
"id": "468d2906-6ba2-4534-b092-dafd54a1131e",
"dateCreated": "2026-04-07T10:34:35.214Z",
"dateUpdated": "2026-04-07T10:34:35.214Z",
"role": 0,
"message": "Could you please provide the original signed contract for this case?",
"isSeen": false,
"user": {
"id": 1400,
"dateCreated": "2026-01-13T08:30:50.561Z",
"dateUpdated": "2026-01-13T08:30:50.561Z",
"firstName": "Jane",
"lastName": "Smith",
"email": "jane.smith@example.com"
}
}

The role field indicates the message sender: 0 = Collection Partner, 1 = Creditor, 2 = ManagedByPartner (collection partner acting on behalf of the creditor).

What Happens When You Send a Message

  1. The message is posted in the case chat thread, attributed to the specified user
  2. The creditor receives an email notification about the new message
  3. A task is created in the Debitura platform for the creditor to review

The creditor can reply through the Debitura portal. Poll GET /cases/{id}/chats to check for replies.

Error Handling

StatusCause
400Empty or missing message; message too short or too long; neither userEmail nor userId provided (MissingUserIdentifier); or the resolved user is not an active member of your team
404Case not found or not assigned to your agency
500Internal server error

What's Next

For the full API reference, see Send a Chat Message. To document collection activities instead of messaging the creditor directly, use notes.