/v1/webhook-endpoints (POST)
POST
/v1/webhook-endpoints
const url = 'http://localhost:8787/v1/webhook-endpoints';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"eventTypes":["reservation.created"],"url":"https://example.com"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8787/v1/webhook-endpoints \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "eventTypes": [ "reservation.created" ], "url": "https://example.com" }'Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Media typeapplication/json
object
eventTypes
required
Array<string>
url
required
string format: uri
Responses
Section titled “Responses”The signing secret is shown EXACTLY ONCE here — save it now. Losing it means deleting and re-creating the endpoint, never a re-display (domain/webhook/signing.ts).
Media typeapplication/json
object
createdAt
required
string
enabled
required
boolean
eventTypes
required
Array<string>
failureCount
required
integer
id
required
string format: uuid
lastFailureAt
required
string | null
lastSuccessAt
required
string | null
secret
required
string
url
required
string
Example
{ "eventTypes": [ "reservation.created" ]}No API key context resolved for this request.
Media typeapplication/problem+json
object
code
required
string
detail
required
string
status
required
number
title
required
string
type
required
string
Example
{ "code": "webhook_endpoint_not_found"}