Register a webhook endpoint

POST
/webhooks

url must be HTTPS. events must be a non-empty array drawn from the enum — an unknown value is a 400 that names the offenders.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Authorization: Bearer hh_live_.... Create and revoke keys in Organizer → Settings → API. A key carries full access to its partner's data, including refunds and promo codes — treat it as a production credential and keep it server-side.

Request Body

application/json
  1. body
url*string

Must be HTTPS.

Formaturi
events*array<>
Items1 <= items

Response Body

The created endpoint, including its signing secret.

application/json
  1. response
data?
Example Request
curl -X POST 'https://hanghut.com/api/v1/webhooks' \  -H 'Content-Type: application/json' \  -d '{  "url": "http://example.com",  "events": [    "ticket.purchased"  ]}'
Example Response
{  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "url": "http://example.com",    "events": [      "ticket.purchased"    ],    "is_active": true,    "secret": "string",    "created_at": "2019-08-24T14:15:22Z"  }}