FlightByte
API referenceSubscriptions

Create a subscription

Validates that the flight exists, seeds the change-detection baseline and starts adaptive polling. The signing secret is returned in full only here.

POST
/v1/subscriptions

Validates that the flight exists, seeds the change-detection baseline and starts adaptive polling. The signing secret is returned in full only here.

x-api-key<token>

Your FlightByte API key. Request one at https://flightbyte.dev/get-api-key.

In: header

Header Parameters

idempotency-key*string
Idempotency-Key?string

Replaying the same key within 24h returns the original subscription.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/subscriptions" \  -H "idempotency-key: string" \  -H "Content-Type: application/json" \  -d '{    "carrier": "TK",    "flightNumber": "1848",    "date": "2026-09-08",    "webhookUrl": "https://example.com/hooks/flights"  }'
{  "id": "sub_7Kd91mQx0Zb2",  "status": "active",  "flightKey": "TK1848:2026-09-08",  "carrier": "TK",  "flightNumber": "1848",  "date": "2026-09-08",  "webhookUrl": "https://example.com/hooks/flights",  "secret": "whsec_...",  "headers": {},  "events": [    "status.changed"  ],  "delayThresholdMinutes": 1,  "metadata": {},  "createdAt": "string",  "updatedAt": "string",  "lastPolledAt": {},  "lastChangeAt": {},  "lastDeliveryAt": {},  "deliveredCount": 0,  "failedCount": 0,  "flightResolved": true,  "statusReason": {}}