RESOURCES
Debtors
People who owe money. Create them first; cases, conversations, and payments all hang off a debtor.
/debtorsaccounts:readList debtors (cursor pagination).
Response
{
"object": "list",
"data": [
{
"object": "debtor",
"id": "…",
"given_name": "Avery",
"email": "a@example.com"
}
],
"has_more": false,
"next_cursor": null
}Example
curl https://debt.hlhunt.org/api/v1/debtors \ -H "Authorization: Bearer hlh_live_..."
/debtorsaccounts:writeIdempotency-Key requiredCreate a debtor. At least one of givenName, familyName, or email.
Request body
{
"givenName": "Avery",
"familyName": "Quinn",
"email": "avery@example.com",
"phone": "+15555550100",
"externalRef": "crm-1042"
}Response
{
"object": "debtor",
"id": "a1b2…",
"given_name": "Avery",
"external_ref": "crm-1042"
}Example
curl https://debt.hlhunt.org/api/v1/debtors \
-H "Authorization: Bearer hlh_live_..." \
-X POST \
-H "Idempotency-Key: my-unique-key" \
-H "Content-Type: application/json" \
-d '{ "givenName": "Avery", "familyName": "Quinn", "email": "avery@example.com", "phone": "+15555550100", "externalRef": "crm-1042" }'/debtors/{id}accounts:readRetrieve one debtor.
Response
{
"object": "debtor",
"id": "a1b2…",
"given_name": "Avery"
}Example
curl https://debt.hlhunt.org/api/v1/debtors/ID \ -H "Authorization: Bearer hlh_live_..."
/debtors/{id}accounts:writeIdempotency-Key optionalUpdate debtor metadata (only the metadata object is mutable).
Request body
{
"metadata": {
"notes": "Prefers SMS"
}
}Response
{
"metadata": {
"notes": "Prefers SMS"
}
}Example
curl https://debt.hlhunt.org/api/v1/debtors/ID \
-H "Authorization: Bearer hlh_live_..." \
-X PATCH \
-H "Idempotency-Key: my-unique-key" \
-H "Content-Type: application/json" \
-d '{ "metadata": { "notes": "Prefers SMS" } }'