Managing subscriptions

Create a Subscription

curl -X POST "https://api.aviowiki.com/webhooks" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-server.com/webhook",
    "types": ["AIRPORT", "RUNWAY", "PROVIDER"],
    "authHeader": "Bearer your-custom-auth-token"
  }'

Request Body

Field
Type
Required
Description

url

string

Yes

The HTTPS endpoint where notifications will be sent. Must be unique across all subscriptions.

types

array

Yes

The event types you want to subscribe to. See Event Types.

authHeader

string

No

A custom Authorization header value that will be included in every webhook delivery to your endpoint.

Response 201 Created

{
  "aid": "WSAxxxxxxxx",
  "url": "https://your-server.com/webhook",
  "types": ["AIRPORT", "RUNWAY", "PROVIDER"],
  "secret": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}

The aid is your subscription identifier, used for updating and deleting the subscription.

Update a Subscription

Returns the updated subscription object.

Delete a Subscription

Returns 200 OK on success.

List Your Subscriptions

Returns an array of all your active webhook subscriptions.

Last updated