Browse documentation

RESOURCES

Conversations & Messages

Read the AI conversation with a debtor and send messages into it. Sends pass the full compliance pipeline (DNC, quiet hours, contact caps) and may be blocked.

GET/conversations/{id}conversations:read

Retrieve one conversation.

Response

{
  "object": "conversation",
  "id": "…",
  "debtor_id": "a1b2…",
  "case_id": "c3d4…",
  "status": "active",
  "channel": "sms",
  "message_count": 6
}

Example

curl https://debt.hlhunt.org/api/v1/conversations/ID \
  -H "Authorization: Bearer hlh_live_..."
GET/conversations/{id}/messagesconversations:read

Messages for one conversation, oldest first (cursor pagination).

Response

{
  "object": "list",
  "data": [
    {
      "object": "message",
      "id": "…",
      "role": "user",
      "content": "Can I pay Friday?"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Example

curl https://debt.hlhunt.org/api/v1/conversations/ID/messages \
  -H "Authorization: Bearer hlh_live_..."
POST/conversations/{id}/messagesconversations:writeIdempotency-Key required

Send an outbound message into the addressed conversation. Blocked sends return an RFC 7807 problem (message-blocked / validation / usage-limit).

Request body

{
  "body": "Thanks — here to help.",
  "channel": "sms"
}

Response

{
  "channel": "sms",
  "outcome": "queued",
  "outboxId": "…"
}

Example

curl https://debt.hlhunt.org/api/v1/conversations/ID/messages \
  -H "Authorization: Bearer hlh_live_..." \
  -X POST \
  -H "Idempotency-Key: my-unique-key" \
  -H "Content-Type: application/json" \
  -d '{ "body": "Thanks — here to help.", "channel": "sms" }'