Register a webhook endpoint
POST /v1/webhooks
The only response that ever carries secret. An idempotent replay of the same key answers without it.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ”The dated API version to speak. Defaults to 2026-09-01; an unsupported value is a 400.
Example
2026-09-01Which Bookrail tool the caller is, recorded as actor.via on every event the request writes. A closed list: an unknown value is a 400. Absent means the request declared no tool.
Retry-safety key, 1 to 255 characters. The same key within 24 hours replays the first response, errors included, and never produces a second effect.
Request Body required
Section titled “Request Body required ”object
Free-form key/value pairs stored with the object and returned untouched.
object
Responses
Section titled “ Responses ”Created.
object
Identifier of a webhook, prefixed with wh_.
Example
wh_0198f0c2a1b47e2e9a1c0f4d5e6a7b8cSubscribed event types. ["*"] means everything, future types included.
Free-form key/value pairs stored with the object and returned untouched.
object
The environment of the API key that created the object.
ISO 8601 instant in UTC.
Example
2026-09-08T07:00:00ZISO 8601 instant in UTC.
Example
2026-09-08T07:00:00ZThe signing secret, shown once, in the answer to the request that created the endpoint. Absent from an idempotent replay, and from every other response.
Example
whsec_...Headers
Section titled “Headers ”Identifier of this request. Quote it to support.
The API version this response was produced with.
true when the body is the stored answer of an earlier request with the same Idempotency-Key.
Error codes: idempotency_key_reused, invalid_body, invalid_webhook_url, parameter_invalid, parameter_missing, unsupported_api_version.
object
object
Machine readable code. The set is per operation; each response below lists the ones it can produce.
The field or header the error is about, when there is one.
Headers
Section titled “Headers ”Identifier of this request. Quote it to support.
The API version this response was produced with.
Error codes: invalid_api_key, invalid_authorization_header, missing_api_key, revoked_api_key.
object
object
Machine readable code. The set is per operation; each response below lists the ones it can produce.
The field or header the error is about, when there is one.
Headers
Section titled “Headers ”Identifier of this request. Quote it to support.
The API version this response was produced with.
Error codes: idempotency_key_in_progress.
object
object
Machine readable code. The set is per operation; each response below lists the ones it can produce.
The field or header the error is about, when there is one.
Headers
Section titled “Headers ”Identifier of this request. Quote it to support.
The API version this response was produced with.
Error codes: internal_error.
object
object
Machine readable code. The set is per operation; each response below lists the ones it can produce.
The field or header the error is about, when there is one.
Headers
Section titled “Headers ”Identifier of this request. Quote it to support.
The API version this response was produced with.