- Create Webhook Subscription
Defines the scope of source companies whose events this subscription will receive. If not provided, defaults to a COMPANY scope targeting the subscriberId.
Optional human-readable display name for the subscription. If not provided, a default name will be assigned.
List of event types this subscription should receive. At least one is required.
HTTPS endpoint that Spotnana will POST event payloads to. Must use the https scheme and accept POST requests.
Whether the subscription is active. When false, the subscription is preserved but incoming events will not be matched against it and no deliveries will be made.
Additional HTTP headers to include on every webhook request sent to url. Provided as a map of header name to header value. Reserved headers managed by Spotnana (such as Authorization and Content-Type) will override any values supplied here.
{ "X-Custom-Header": "my-value", "Authorization-Extra": "token123" }
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v3/webhooks/subscriptions
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/webhooksubscriptionapi/v3/webhooks/subscriptions
curl -i -X POST \
https://api-ext-sboxmeta.partners.spotnana.com/v3/webhooks/subscriptions \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"subscriberId": "96d0a1b8-7f77-4d5c-847e-2afd90ed23b3",
"eventSource": {
"scopes": [
{
"predicates": [
{
"type": "COMPANY",
"values": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"comparator": "IN"
}
]
}
]
},
"name": "string",
"eventTypes": [
"TRAVELER_V2"
],
"url": "http://example.com",
"isActive": true,
"customHeaders": {
"X-Custom-Header": "my-value",
"Authorization-Extra": "token123"
}
}'Successful Webhook Subscription Response
Secret used to verify the HMAC-SHA256 signature on incoming webhook requests. Returned only once, at subscription creation, and cannot be retrieved later. Store it securely.
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "hmacSigningSecret": "string", "createdAt": { "iso8601": "2017-07-21" } }