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/webhooksCreate a Webhook endpoint
Register a URL. The signing secret is returned once, in this response.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
| url | string | required | http(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. |
| events | array of strings | optional | Event types to receive, e.g. ["charge.succeeded", "charge.failed"]. Default ["*"] (everything). See Webhook Events for the list. |
| description | string | optional | Label, up to 500 characters. |
Response
| Field | Type | Description |
|---|---|---|
| id | string | Endpoint id. |
| object | string | "webhook_endpoint". |
| url / description / active / events | As stored; active is true on creation. | |
| secret | string | whsec_… signing secret. Shown only here. |
| created | string | ISO 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/webhooksList Webhook endpoints
Endpoints of the key's business and mode. Secrets are not included.
Response
| Field | Type | Description |
|---|---|---|
| object | string | "list". |
| data | array | { id, object, url, description, active, events, created }. |
| has_more | boolean | Always false. |
curl -X GET https://api.hlhunt.org/v1/webhooks \
-H "Authorization: Bearer sk_live_your_api_key"Endpoints
POST
/v1/webhooksGET
/v1/webhooksCreate a Webhook endpoint
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"
}'List Webhook endpoints
curl -X GET https://api.hlhunt.org/v1/webhooks \
-H "Authorization: Bearer sk_live_your_api_key"