Case Chats#
Case Chats allow you to exchange messages with the assigned collection partner about a specific case. Use chats to provide additional information or ask about case progress.
The Chat Message object#
| Attribute | Type | Description |
|---|---|---|
id | string | Unique identifier |
object | string | Always "chat_message" |
case | string | Collection Case ID |
sender | enum | creditor or partner |
message | string | Message content |
attachments | array | Attached file IDs |
read | boolean | Whether the message has been read |
created | timestamp | Time at which the message was created |
{
"id": "msg_abc123",
"object": "chat_message",
"case": "dc_a1b2c3d4",
"sender": "partner",
"message": "We've made contact with the debtor. They have acknowledged the debt and are willing to discuss a payment plan. We'll follow up next week.",
"attachments": [],
"read": false,
"created": 1706832000
}Send a Message#
POST /v1/collection_cases/:id/chat
| Parameter | Type | Required | Description |
|---|---|---|---|
message | string | Yes | Message content |
attachments | array | No | File IDs to attach |
curl https://api.casapay.com/v1/collection_cases/dc_a1b2c3d4/chat \
-H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc" \
-H "Content-Type: application/json" \
-d '{
"message": "Please find attached the original lease agreement for reference."
}'List Chat Messages#
GET /v1/collection_cases/:id/chat
curl https://api.casapay.com/v1/collection_cases/dc_a1b2c3d4/chat \
-H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc"