Skip to main content
POST
/
api
/
webhooks
Register webhook
curl --request POST \
  --url https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/webhooks \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "https://api.example.com/webhooks",
  "events": [
    "quote.created",
    "booking.confirmed"
  ],
  "secret": "webhook-secret-123"
}
'
{
  "webhookId": "webhook-123",
  "url": "https://api.example.com/webhooks",
  "events": [
    "quote.created",
    "booking.confirmed"
  ],
  "createdAt": "2024-01-01T10:00:00Z"
}
Register endpoints for quotes, booking confirmations, status, and document events.

Authorizations

Authorization
string
header
required

Body

application/json
url
string<uri>
required
Example:

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

events
enum<string>[]
required
Available options:
quote.created,
quote.priced,
booking.confirmed,
shipment.status,
document.uploaded
Example:
["quote.created", "booking.confirmed"]
secret
string
Example:

"webhook-secret-123"

Response

201 - application/json

Webhook registered

webhookId
string
Example:

"webhook-123"

url
string
Example:

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

events
string[]
Example:
["quote.created", "booking.confirmed"]
createdAt
string<date-time>
Example:

"2024-01-01T10:00:00Z"