WEBHOOKS
Webhook Endpoints
Register HTTPS destinations for the event stream. The signing secret is returned exactly once on create and rotate.
/webhook-endpointswebhooks:manageRegister a destination (HTTPS, port 443, public hosts only). event_types empty = all events.
Request body
{
"url": "https://example.com/hooks",
"event_types": [
"payment.succeeded",
"case.closed"
]
}Response
{
"object": "webhook_endpoint",
"id": "…",
"secret": "whsec_… (shown once)",
"status": "enabled"
}Example
curl https://debt.hlhunt.org/api/v1/webhook-endpoints \
-H "Authorization: Bearer hlh_live_..." \
-X POST \
-H "Content-Type: application/json" \
-d '{ "url": "https://example.com/hooks", "event_types": [ "payment.succeeded", "case.closed" ] }'/webhook-endpointswebhooks:manageList endpoints (secret_last4 only — the secret is never readable).
Response
{
"object": "list",
"data": [
{
"id": "…",
"url": "https://…",
"secret_last4": "ab12"
}
]
}Example
curl https://debt.hlhunt.org/api/v1/webhook-endpoints \ -H "Authorization: Bearer hlh_live_..."
/webhook-endpoints/{id}webhooks:manageRetrieve one endpoint (secret_last4 only).
Response
{
"object": "webhook_endpoint",
"id": "…",
"url": "https://…",
"status": "enabled",
"secret_last4": "ab12"
}Example
curl https://debt.hlhunt.org/api/v1/webhook-endpoints/ID \ -H "Authorization: Bearer hlh_live_..."
/webhook-endpoints/{id}webhooks:manageUpdate url, description, event_types, or status (enabled/disabled).
Request body
{
"status": "disabled"
}Response
{
"object": "webhook_endpoint",
"id": "…",
"status": "disabled"
}Example
curl https://debt.hlhunt.org/api/v1/webhook-endpoints/ID \
-H "Authorization: Bearer hlh_live_..." \
-X PATCH \
-H "Content-Type: application/json" \
-d '{ "status": "disabled" }'/webhook-endpoints/{id}webhooks:manageSoft-delete the endpoint and cancel its pending deliveries.
Response
{
"object": "webhook_endpoint",
"id": "…",
"deleted": true
}Example
curl https://debt.hlhunt.org/api/v1/webhook-endpoints/ID \ -H "Authorization: Bearer hlh_live_..." \ -X DELETE
/webhook-endpoints/{id}/rotate-secretwebhooks:manageRotate the signing secret (returned once). The previous secret keeps verifying for 24 hours.
Response
{
"object": "webhook_endpoint",
"id": "…",
"secret": "whsec_… (shown once)"
}Example
curl https://debt.hlhunt.org/api/v1/webhook-endpoints/ID/rotate-secret \ -H "Authorization: Bearer hlh_live_..." \ -X POST