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#

AttributeTypeDescription
idstringUnique identifier
objectstringAlways "chat_message"
casestringCollection Case ID
senderenumcreditor or partner
messagestringMessage content
attachmentsarrayAttached file IDs
readbooleanWhether the message has been read
createdtimestampTime 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

ParameterTypeRequiredDescription
messagestringYesMessage content
attachmentsarrayNoFile 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"