Skip to main content
POST
/
connect
/
v1
/
operators
/
{operatorId}
/
webhook-subscriptions
Create a webhook subscription
curl --request POST \
  --url https://api.voyant.travel/connect/v1/operators/{operatorId}/webhook-subscriptions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "https://example.com/webhooks/connect",
  "events": [
    "booking.confirmed",
    "booking.cancelled"
  ],
  "connectionId": "<string>",
  "secret": "<string>"
}
'
{
  "id": "<string>",
  "operatorId": "<string>",
  "url": "<string>",
  "events": [
    "<string>"
  ],
  "hasSecret": true,
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "connectionId": "<string>"
}

Authorizations

Authorization
string
header
required

Provide either a static platform API key or an OAuth2 access token (from /connect/v1/oauth/token) as Authorization: Bearer <token>. Scopes are connect:* (e.g. connect:bookings:write).

Path Parameters

operatorId
string
required

Operator id.

Body

application/json
url
string<uri>
required
Example:

"https://example.com/webhooks/connect"

events
string[]
required
Example:
["booking.confirmed", "booking.cancelled"]
connectionId
string
secret
string

Response

201 - application/json

Created subscription.

id
string
required
operatorId
string
required
url
string<uri>
required
events
string[]
required
status
enum<string>
required
Available options:
active,
paused
hasSecret
boolean
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
connectionId
string | null