Docs
Get an API key
Flight Webhooks

Create a subscription

POST
/v1/flight/webhook-subscriptions

Register an HTTPS endpoint and the events it receives. You receive the signing secret only in this response, so store it on your server. Your organisation holds at most five subscriptions, one per URL, shared by all its credentials; a sixth or a repeated URL is a 409.

Authorization

x-api-key<token>

Your API key. Issued and revoked from the TrustPixel dashboard; the gateway resolves it to an owning organization on every request.

In: header

Header Parameters

x-request-id?string

Correlation id echoed to the upstream service and returned on the response. Generated as req_<uuid> when omitted.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/flight/webhook-subscriptions" \  -H "Content-Type: application/json" \  -d '{    "url": "https://partner.example/hooks/flight",    "event_types": [      "flight.booking.confirmed",      "flight.booking.canceled"    ]  }'
{  "data": {    "id": "whs_0192f3a4b5c64d7e8f9a0b1c2d3e4f5b",    "url": "https://partner.example/hooks/flight",    "event_types": [      "flight.booking.confirmed"    ],    "status": "ACTIVE",    "previous_secret_expires_at": "string",    "created_at": "string",    "updated_at": "string",    "signing_secret": "string"  }}