# Create a new webhook subscription Creates a new webhook subscription for receiving near‑real‑time event notifications. Features: - Validates the callback URL format; only HTTPS is supported - Sets an automatic expiration date of 30 days for subscriptions Example Use Case: An operations manager needs to receive near‑real‑time notifications when flight times change. By creating a webhook subscription for FLIGHT_TIME_UPDATE events, they can automatically sync flight data with external systems. For more information on setting up and managing webhooks, see the Event Notifications (Webhook) Guide. Endpoint: POST /api/v2/webhooks/subscriptions Version: 2.4.0 Security: X-Api-Client-Id, X-Auth-Token ## Request fields (application/json): - `event` (string, required) The type of event that triggers the webhook notification. Each event type corresponds to specific flight-related changes or operations. Enum: "FLIGHT_CREATE", "FLIGHT_CANCEL", "FLIGHT_TIME_UPDATE", "FLIGHT_AIRCRAFT_UPDATE", "FLIGHT_AIRPORT_UPDATE", "FLIGHT_POST_FLIGHT_STATUS", "FLIGHT_MOVEMENT_UPDATE", "FLIGHT_PAX_COUNT_UPDATE", "FLIGHT_PAX_LIST_UPDATE", "FLIGHT_PERMIT_ASSIGNMENT", "FLIGHT_PERMIT_UNASSIGNMENT", "FLIGHT_SLOT_PPR_ASSIGNMENT", "FLIGHT_SLOT_PPR_UNASSIGNMENT", "FLIGHT_FBO_ASSIGNMENT", "FLIGHT_FBO_UNASSIGNMENT", "FLIGHT_HOTEL_ASSIGNMENT", "FLIGHT_HOTEL_UNASSIGNMENT", "FLIGHT_CATERING_ASSIGNMENT", "FLIGHT_CATERING_UNASSIGNMENT", "FLIGHT_TRANSPORT_ASSIGNMENT", "FLIGHT_TRANSPORT_UNASSIGNMENT", "FLIGHT_CREW_ASSIGNMENT", "FLIGHT_CREW_DOCUMENT_UPDATE", "FLIGHT_CREW_ADDRESS_UPDATE" - `callbackUrl` (string, required) The URL where webhook notifications will be sent. Must be a valid HTTPS URL. Example: "https://example.com/webhooks/flight-updates" - `signingKey` (string, required) A secret key used to verify webhook authenticity. This key will be used to sign webhook payloads. Example: "your-secret-signing-key-123" ## Response 201 fields (application/json): - `id` (string) Unique identifier for the webhook subscription. Example: "webhook-sub-12345" - `event` (string) The event type that this subscription is listening for. Example: "FLIGHT_UPDATE" - `callbackUrl` (string) The URL where webhook notifications will be sent. Example: "https://example.com/webhooks" - `status` (string) Status of the webhook subscription indicating whether it is active and receiving notifications or inactive. Enum: "ACTIVE", "INACTIVE" - `createdAtDateTime` (string) The date and time when the webhook subscription was created. Example: "2024-01-15T10:30:00.000Z" - `updatedAtDateTime` (string) The date and time when the webhook subscription was last updated. Example: "2024-01-15T10:30:00.000Z" - `expirationDateTime` (string) The date and time when the webhook subscription will expire. Example: "2024-02-15T10:30:00.000Z" ## Response 400 fields ## Response 401 fields ## Response 403 fields