Webhooks

A webhook endpoint is a URL HL Hunt POSTs signed events to. Endpoints are scoped to the business and mode of the key that created them: a test key's endpoint receives only test events. The API creates and lists endpoints; to edit, disable, rotate the secret or delete one, use Developers → Webhooks in the dashboard. Payload shapes are documented on the Webhook payloads page; signature verification on Webhook Security.

POST
/v1/webhooks

Create a Webhook endpoint

Register a URL. The signing secret is returned once, in this response.

Request body

FieldTypeRequiredDescription
urlstringrequiredhttp(s) URL on a public host. Private, loopback and cloud-metadata addresses are refused (400 invalid_param), and the host is re-resolved before every delivery.
eventsarray of stringsoptionalEvent types to receive, e.g. ["charge.succeeded", "charge.failed"]. Default ["*"] (everything). See Webhook Events for the list.
descriptionstringoptionalLabel, up to 500 characters.

Response

FieldTypeDescription
idstringEndpoint id.
objectstring"webhook_endpoint".
url / description / active / eventsAs stored; active is true on creation.
secretstringwhsec_… signing secret. Shown only here.
createdstringISO 8601.
  • HTTP 201. 400 missing_required_param (url) · 400 invalid_param (unsafe or malformed URL).
curl -X POST https://api.hlhunt.org/v1/webhooks \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/hlhunt/webhook",
    "events": ["charge.succeeded", "charge.failed", "refund.created", "dispute.opened"],
    "description": "Production"
  }'
GET
/v1/webhooks

List Webhook endpoints

Endpoints of the key's business and mode. Secrets are not included.

Response

FieldTypeDescription
objectstring"list".
dataarray{ id, object, url, description, active, events, created }.
has_morebooleanAlways false.
curl -X GET https://api.hlhunt.org/v1/webhooks \
  -H "Authorization: Bearer sk_live_your_api_key"