# Create a new webhook subscription Create a new webhook subscription for receiving near real-time event notifications. - Validates callback URL format, only https is supported - Sets automatic expiration date (1 month) for subscriptions An operations manager needs to receive near real-time notifications when flight times change. By creating a webhook subscription for events, they can automatically sync flight data with external systems. Endpoint: POST /api/v2/webhooks/subscriptions Version: 2.0.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" - `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"