> For the complete documentation index, see [llms.txt](https://docs.channex.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.channex.io/api-v.1-documentation/webhook-collection/test-webhook-api.md). Agents can also search and read this documentation through its [MCP server](https://docs.channex.io/~gitbook/mcp).

# Test Webhook API

## Test a callback URL

> Send a test POST to the callback URL and return what the target answered — its status\
> code and body, whatever they are, plus the attempt as a \`delivery\` log entry. A\
> target that answers \`405\` or \`404\` is reported, not treated as an error. Neither the\
> webhook nor the delivery entry is stored.

```json
{"openapi":"3.1.0","info":{"title":"Channex.io — Public API","version":"0.0.0"},"tags":[{"name":"Webhooks","description":"Push notifications for what happens on an account. A webhook subscribes a callback URL\nto a set of events; when one occurs, Channex sends it a `POST` request.\n\nA webhook watches one property, or — created with `property_id: null` — every property\nof a billing account. A new webhook is inactive until `is_active` is set.\n\n## What is delivered\n\nEvery delivery is a `POST` to `callback_url` with a JSON body of five keys:\n\n- `event` — the event name, one of the values `/webhooks/events` lists.\n- `property_id` — the property the event happened on.\n- `user_id` — the user who caused it, or `null` for events the platform raises itself,\n  which is most of them. Useful for ignoring changes your own integration made.\n- `timestamp` — when the event happened, ISO 8601 UTC with microseconds, e.g.\n  `2026-09-21T13:58:55.587742Z`.\n- `payload` — the event's own data. Present only when the webhook's `send_data` is\n  true; when it is false the key is absent altogether and the other four are all the\n  delivery carries.\n\nA signed webhook carries three `x-hmac-*` headers besides. See the Webhook Signing Keys\nresource for what they hold and how to verify them — the `x-hmac-timestamp` header is\nUnix seconds, not the body's `timestamp`.\n\n## Retries\n\nA delivery is successful when the callback URL answers `2xx`. A `5xx`, a connection\nrefused, a DNS failure, a timeout (30 seconds to connect, 30 to read) or a TLS error is\nretried; a `4xx`, a redirect — which is never followed — and an expired TLS certificate\nare final and are not.\n\nThere are eleven retries after the first attempt, spaced 1 minute, 2, 4, 8, 15, 30\nminutes, then 1, 2, 4, 6 and 10 hours, so the last one lands about 24 hours after the\nevent. Those gaps are the earliest a retry is made, not the exact moment: a retry can\nrun up to a minute later.\n\nDeliveries to one host are made one at a time, so a slow endpoint delays its own queue.\nA webhook whose oldest unresolved failure is 72 hours old is deactivated — `is_active`\nbecomes false, the account is notified by email, and the pending deliveries for that\nhost are dropped. A `4xx` starts that clock as surely as a `5xx` does.\n\n## Order\n\nDeliveries are not ordered: a delivery retried after a failure arrives after ones raised\nlater, so a payload can describe a state older than the one before it. Treat a delivery\nas a signal that something changed rather than as the change itself, and read the\ncurrent state back through the API — `GET /booking_revisions/{id}` for a booking event,\nthe availability and restrictions endpoints for an `ari` one."}],"servers":[{"url":"https://app.channex.io/api/v1","description":"Production server","variables":{}},{"url":"https://staging.channex.io/api/v1","description":"Staging server","variables":{}}],"security":[{"UserApiKeyAuth":[]}],"components":{"securitySchemes":{"UserApiKeyAuth":{"type":"apiKey","in":"header","name":"user-api-key","description":"API key for programmatic access, sent in the `user-api-key` header."}},"schemas":{"Webhooks.WebhookTestResult":{"type":"object","required":["request_url","status","headers","body","is_signed","delivery"],"properties":{"request_url":{"type":"string","description":"URL the test request was sent to."},"status":{"type":"integer","format":"int32","description":"HTTP status code returned by the callback URL. `0` when no response was received (timeout or connection failure); `body` then carries the reason."},"headers":{"type":"object","unevaluatedProperties":{"type":"string"},"description":"Response headers returned by the callback URL, lower-cased."},"body":{"type":"string","description":"Response body returned by the callback URL, as text."},"is_signed":{"type":"boolean","description":"Whether the test request was HMAC-signed."},"hmac":{"allOf":[{"$ref":"#/components/schemas/Webhooks.WebhookHmac"}],"description":"HMAC facts of the test request: the signatures, key labels and timestamp sent. Omitted when unsigned."},"delivery":{"allOf":[{"$ref":"#/components/schemas/Webhooks.WebhookTestDelivery"}],"description":"The test attempt described as a webhook delivery log entry."}},"description":"Result of a webhook test: what the target callback URL answered."},"Webhooks.WebhookHmac":{"type":"object","required":["signatures","signing_keys","timestamp"],"properties":{"signatures":{"type":"array","items":{"type":"string"},"description":"Lowercase-hex HMAC-SHA256 signatures sent, the current key's first."},"signing_keys":{"type":"array","items":{"type":"string"},"description":"Masked labels (`...` + last 6 of the secret) of the signing key versions used, in the same order."},"timestamp":{"anyOf":[{"type":"integer","format":"int64"},{"type":"null"}],"description":"Unix-seconds timestamp of the signing string, as sent in `x-hmac-timestamp`."}},"description":"HMAC facts of a signed request: what was sent in the `x-hmac-*` headers,\nbroken out per signing key version."},"Webhooks.WebhookTestDelivery":{"type":"object","required":["id","webhook_id","property_id","event","is_test","success","status_code","error","response_time","attempt","is_signed","callback_url","payload","request_headers","response_headers","response","user_id","started_at","finished_at","inserted_at"],"properties":{"id":{"anyOf":[{"$ref":"#/components/schemas/Common.Scalars.id"},{"type":"null"}],"description":"Identifier the entry gets once stored. Null in the test response."},"webhook_id":{"anyOf":[{"$ref":"#/components/schemas/Common.Scalars.id"},{"type":"null"}],"description":"UUID of the tested webhook. Null for the callback-URL test, which is bound to no webhook."},"property_id":{"anyOf":[{"$ref":"#/components/schemas/Common.Scalars.id"},{"type":"null"}],"description":"UUID of the property associated with the tested webhook. Null for the callback-URL test and for a global webhook."},"event":{"type":"string","enum":["test"],"description":"Always `test`."},"is_test":{"type":"boolean","enum":[true],"description":"Always `true`: the entry was written by a test, not by a live delivery."},"success":{"type":"boolean","description":"Whether the test delivery succeeded."},"status_code":{"anyOf":[{"type":"integer","format":"int32"},{"type":"null"}],"description":"HTTP status code returned by the callback URL. Null when no response was received."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Failure reason (e.g. `timeout`), or null on success."},"response_time":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.nonNegativeInt"}],"description":"Delivery round-trip time in milliseconds."},"attempt":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.nonNegativeInt"}],"description":"Always `0`: a test is never retried."},"is_signed":{"type":"boolean","description":"Whether the test request was HMAC-signed."},"hmac":{"allOf":[{"$ref":"#/components/schemas/Webhooks.WebhookHmac"}],"description":"HMAC facts of the test request. Omitted when unsigned."},"callback_url":{"type":"string","format":"uri","description":"Callback URL the test request was sent to."},"payload":{"type":"string","description":"Serialized JSON payload of the test: always the standard test body — a `payload`\ngiven in the request is ignored. The delivered body omits it when `send_data` is\nfalse."},"request_headers":{"type":"string","description":"Serialized JSON request headers sent with the test request."},"response_headers":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Serialized JSON response headers returned by the callback URL. Null when no response was received."},"response":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Response body returned by the callback URL, or the failure reason."},"user_id":{"anyOf":[{"$ref":"#/components/schemas/Common.Scalars.id"},{"type":"null"}],"description":"UUID of the user who ran the test. Null when it was run by the system."},"started_at":{"type":"string","format":"date-time","description":"When the test attempt started (ISO 8601, no timezone offset)."},"finished_at":{"type":"string","format":"date-time","description":"When the test attempt finished (ISO 8601, no timezone offset)."},"inserted_at":{"type":"string","format":"date-time","description":"When the entry was written (ISO 8601, no timezone offset)."}},"description":"A webhook test attempt in the shape of a delivery log entry."},"Common.Scalars.id":{"type":"string","format":"uuid"},"Common.Scalars.nonNegativeInt":{"type":"integer","format":"int32","minimum":0},"Common.Errors.UnparsableRequest":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.UnparsableRequestObject"}},"description":"The request body could not be parsed as JSON."},"Common.Errors.UnparsableRequestObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"object","unevaluatedProperties":{"type":"string"},"description":"Maps the part of the request that could not be parsed to the reason."}},"description":"Error object for an unparsable request body, naming the malformed part."},"Common.Errors.Unauthorized":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"title":{"type":"string","enum":["Unauthorized"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"Authentication credentials are missing or invalid."},"Common.Errors.InvalidArguments":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.InvalidArgumentsObject"}},"description":"The request has missing or invalid arguments; `details` lists the messages per argument."},"Common.Errors.InvalidArgumentsObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"object","unevaluatedProperties":{"type":"array","items":{"type":"string"}},"description":"Maps each invalid argument to the list of validation messages for that argument."}},"description":"Error object for invalid request arguments, adding per-argument messages."},"Common.Errors.InvalidNestedArguments":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.InvalidNestedArgumentsObject"}},"description":"The request has invalid arguments; `details` lists the messages per argument, one level deeper for an argument that is itself a group."},"Common.Errors.InvalidNestedArgumentsObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"object","unevaluatedProperties":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"object","unevaluatedProperties":{"type":"array","items":{"type":"string"}}}]},"description":"Maps each invalid argument to its validation messages: a list of messages for a flat argument, and the messages per argument inside the group for a nested one."}},"description":"Error object for invalid request arguments, adding per-argument messages and, for an argument that is a group, the messages inside it."},"Webhooks.WebhookUpdateRequest":{"type":"object","required":["webhook"],"properties":{"webhook":{"$ref":"#/components/schemas/Webhooks.WebhookUpdate"}},"description":"Request body accepted when updating a webhook, and when testing a callback URL."},"Webhooks.WebhookUpdate":{"type":"object","properties":{"callback_url":{"type":"string","format":"uri","description":"URL called via POST when a subscribed trigger event occurs. Must carry a scheme and a resolvable host."},"event_mask":{"$ref":"#/components/schemas/Webhooks.EventMask"},"request_params":{"anyOf":[{"type":"object","unevaluatedProperties":{"type":"string"}},{"type":"null"}],"description":"Additional GET query parameters appended to the callback request, or null when none are set."},"headers":{"anyOf":[{"type":"object","unevaluatedProperties":{"type":"string"}},{"type":"null"}],"description":"Custom request headers for the callback request, or null when none are set. Use this\nto authenticate against a protected endpoint, e.g.\n`{ \"Authorization\": \"Basic user:password\" }`."},"is_active":{"type":"boolean","description":"Whether the webhook is active. Only active webhooks receive notifications. `false` by default."},"send_data":{"type":"boolean","description":"Whether to include event payload data in the callback. When `false`, the delivery\ncarries `event`, `property_id`, `user_id` and `timestamp` and no `payload`. `false`\nby default."},"is_global":{"type":"boolean","description":"Whether the webhook receives events from every property of the billing account rather\nthan from one. `false` by default, and fixed after creation: a property-level webhook\ncannot be converted to a global one.\n\nA global and a property-level webhook can cover the same event. When they point at\ndifferent callback URLs both are delivered; when they point at the same one the\ndelivery is made once, with the property-level webhook's settings."},"is_signed":{"type":"boolean","description":"Whether deliveries are signed. When `true`, every callback request carries the\n`x-hmac-timestamp`, `x-hmac-signature-256` and `x-hmac-keys-256` headers, computed\nwith the key referenced by `signing_key_id`. The Webhook Signing Keys resource\ndescribes the signed string and how to verify a delivery. `false` by default."},"signing_key_id":{"anyOf":[{"$ref":"#/components/schemas/Common.Scalars.id"},{"type":"null"}],"description":"UUID of the signing key deliveries are signed with, or null when none is assigned.\nRequired whenever `is_signed` is true; the key must belong to a billing account the\ncaller is a member of. Responses also expose the key, with its masked versions,\nthrough the `signing_key` relationship."},"property_id":{"anyOf":[{"$ref":"#/components/schemas/Common.Scalars.id"},{"type":"null"}],"description":"UUID of the property to associate the webhook with. Required unless `is_global` is\ntrue; a request that omits both answers `422`."}},"description":"Attributes accepted when updating a webhook. Every attribute is optional; attributes absent from the request are left unchanged."},"Webhooks.EventMask":{"type":"string","description":"Event mask. Use `*` for every event, or a semicolon-separated list of event names,\ne.g. `booking_new;booking_modification;booking_cancellation`. An unknown name\nrejects the request, naming it."}}},"paths":{"/webhooks/test":{"post":{"operationId":"WebhookTest_test","summary":"Test a callback URL","description":"Send a test POST to the callback URL and return what the target answered — its status\ncode and body, whatever they are, plus the attempt as a `delivery` log entry. A\ntarget that answers `405` or `404` is reported, not treated as an error. Neither the\nwebhook nor the delivery entry is stored.","parameters":[],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhooks.WebhookTestResult"}}}},"400":{"description":"The request body could not be parsed as JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.UnparsableRequest"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Unauthorized"}}}},"422":{"description":"The request has missing or invalid arguments; `details` lists the messages per argument.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Common.Errors.InvalidArguments"},{"$ref":"#/components/schemas/Common.Errors.InvalidNestedArguments"}]}}}}},"tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhooks.WebhookUpdateRequest"}}}}}}}}
```

## Test a webhook

> Send a test POST through a stored webhook and return what the target answered.\
> The request body is optional: attributes carried in it override the stored\
> configuration for this test only and are validated like on the callback-URL test.\
> The attempt is stored in the webhook's delivery log with \`is\_test: true\`; test\
> entries are not counted in delivery statistics.

```json
{"openapi":"3.1.0","info":{"title":"Channex.io — Public API","version":"0.0.0"},"tags":[{"name":"Webhooks","description":"Push notifications for what happens on an account. A webhook subscribes a callback URL\nto a set of events; when one occurs, Channex sends it a `POST` request.\n\nA webhook watches one property, or — created with `property_id: null` — every property\nof a billing account. A new webhook is inactive until `is_active` is set.\n\n## What is delivered\n\nEvery delivery is a `POST` to `callback_url` with a JSON body of five keys:\n\n- `event` — the event name, one of the values `/webhooks/events` lists.\n- `property_id` — the property the event happened on.\n- `user_id` — the user who caused it, or `null` for events the platform raises itself,\n  which is most of them. Useful for ignoring changes your own integration made.\n- `timestamp` — when the event happened, ISO 8601 UTC with microseconds, e.g.\n  `2026-09-21T13:58:55.587742Z`.\n- `payload` — the event's own data. Present only when the webhook's `send_data` is\n  true; when it is false the key is absent altogether and the other four are all the\n  delivery carries.\n\nA signed webhook carries three `x-hmac-*` headers besides. See the Webhook Signing Keys\nresource for what they hold and how to verify them — the `x-hmac-timestamp` header is\nUnix seconds, not the body's `timestamp`.\n\n## Retries\n\nA delivery is successful when the callback URL answers `2xx`. A `5xx`, a connection\nrefused, a DNS failure, a timeout (30 seconds to connect, 30 to read) or a TLS error is\nretried; a `4xx`, a redirect — which is never followed — and an expired TLS certificate\nare final and are not.\n\nThere are eleven retries after the first attempt, spaced 1 minute, 2, 4, 8, 15, 30\nminutes, then 1, 2, 4, 6 and 10 hours, so the last one lands about 24 hours after the\nevent. Those gaps are the earliest a retry is made, not the exact moment: a retry can\nrun up to a minute later.\n\nDeliveries to one host are made one at a time, so a slow endpoint delays its own queue.\nA webhook whose oldest unresolved failure is 72 hours old is deactivated — `is_active`\nbecomes false, the account is notified by email, and the pending deliveries for that\nhost are dropped. A `4xx` starts that clock as surely as a `5xx` does.\n\n## Order\n\nDeliveries are not ordered: a delivery retried after a failure arrives after ones raised\nlater, so a payload can describe a state older than the one before it. Treat a delivery\nas a signal that something changed rather than as the change itself, and read the\ncurrent state back through the API — `GET /booking_revisions/{id}` for a booking event,\nthe availability and restrictions endpoints for an `ari` one."}],"servers":[{"url":"https://app.channex.io/api/v1","description":"Production server","variables":{}},{"url":"https://staging.channex.io/api/v1","description":"Staging server","variables":{}}],"security":[{"UserApiKeyAuth":[]}],"components":{"securitySchemes":{"UserApiKeyAuth":{"type":"apiKey","in":"header","name":"user-api-key","description":"API key for programmatic access, sent in the `user-api-key` header."}},"schemas":{"Common.Scalars.id":{"type":"string","format":"uuid"},"Webhooks.WebhookTestResult":{"type":"object","required":["request_url","status","headers","body","is_signed","delivery"],"properties":{"request_url":{"type":"string","description":"URL the test request was sent to."},"status":{"type":"integer","format":"int32","description":"HTTP status code returned by the callback URL. `0` when no response was received (timeout or connection failure); `body` then carries the reason."},"headers":{"type":"object","unevaluatedProperties":{"type":"string"},"description":"Response headers returned by the callback URL, lower-cased."},"body":{"type":"string","description":"Response body returned by the callback URL, as text."},"is_signed":{"type":"boolean","description":"Whether the test request was HMAC-signed."},"hmac":{"allOf":[{"$ref":"#/components/schemas/Webhooks.WebhookHmac"}],"description":"HMAC facts of the test request: the signatures, key labels and timestamp sent. Omitted when unsigned."},"delivery":{"allOf":[{"$ref":"#/components/schemas/Webhooks.WebhookTestDelivery"}],"description":"The test attempt described as a webhook delivery log entry."}},"description":"Result of a webhook test: what the target callback URL answered."},"Webhooks.WebhookHmac":{"type":"object","required":["signatures","signing_keys","timestamp"],"properties":{"signatures":{"type":"array","items":{"type":"string"},"description":"Lowercase-hex HMAC-SHA256 signatures sent, the current key's first."},"signing_keys":{"type":"array","items":{"type":"string"},"description":"Masked labels (`...` + last 6 of the secret) of the signing key versions used, in the same order."},"timestamp":{"anyOf":[{"type":"integer","format":"int64"},{"type":"null"}],"description":"Unix-seconds timestamp of the signing string, as sent in `x-hmac-timestamp`."}},"description":"HMAC facts of a signed request: what was sent in the `x-hmac-*` headers,\nbroken out per signing key version."},"Webhooks.WebhookTestDelivery":{"type":"object","required":["id","webhook_id","property_id","event","is_test","success","status_code","error","response_time","attempt","is_signed","callback_url","payload","request_headers","response_headers","response","user_id","started_at","finished_at","inserted_at"],"properties":{"id":{"anyOf":[{"$ref":"#/components/schemas/Common.Scalars.id"},{"type":"null"}],"description":"Identifier the entry gets once stored. Null in the test response."},"webhook_id":{"anyOf":[{"$ref":"#/components/schemas/Common.Scalars.id"},{"type":"null"}],"description":"UUID of the tested webhook. Null for the callback-URL test, which is bound to no webhook."},"property_id":{"anyOf":[{"$ref":"#/components/schemas/Common.Scalars.id"},{"type":"null"}],"description":"UUID of the property associated with the tested webhook. Null for the callback-URL test and for a global webhook."},"event":{"type":"string","enum":["test"],"description":"Always `test`."},"is_test":{"type":"boolean","enum":[true],"description":"Always `true`: the entry was written by a test, not by a live delivery."},"success":{"type":"boolean","description":"Whether the test delivery succeeded."},"status_code":{"anyOf":[{"type":"integer","format":"int32"},{"type":"null"}],"description":"HTTP status code returned by the callback URL. Null when no response was received."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Failure reason (e.g. `timeout`), or null on success."},"response_time":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.nonNegativeInt"}],"description":"Delivery round-trip time in milliseconds."},"attempt":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.nonNegativeInt"}],"description":"Always `0`: a test is never retried."},"is_signed":{"type":"boolean","description":"Whether the test request was HMAC-signed."},"hmac":{"allOf":[{"$ref":"#/components/schemas/Webhooks.WebhookHmac"}],"description":"HMAC facts of the test request. Omitted when unsigned."},"callback_url":{"type":"string","format":"uri","description":"Callback URL the test request was sent to."},"payload":{"type":"string","description":"Serialized JSON payload of the test: always the standard test body — a `payload`\ngiven in the request is ignored. The delivered body omits it when `send_data` is\nfalse."},"request_headers":{"type":"string","description":"Serialized JSON request headers sent with the test request."},"response_headers":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Serialized JSON response headers returned by the callback URL. Null when no response was received."},"response":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Response body returned by the callback URL, or the failure reason."},"user_id":{"anyOf":[{"$ref":"#/components/schemas/Common.Scalars.id"},{"type":"null"}],"description":"UUID of the user who ran the test. Null when it was run by the system."},"started_at":{"type":"string","format":"date-time","description":"When the test attempt started (ISO 8601, no timezone offset)."},"finished_at":{"type":"string","format":"date-time","description":"When the test attempt finished (ISO 8601, no timezone offset)."},"inserted_at":{"type":"string","format":"date-time","description":"When the entry was written (ISO 8601, no timezone offset)."}},"description":"A webhook test attempt in the shape of a delivery log entry."},"Common.Scalars.nonNegativeInt":{"type":"integer","format":"int32","minimum":0},"Common.Errors.UnparsableRequest":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.UnparsableRequestObject"}},"description":"The request body could not be parsed as JSON."},"Common.Errors.UnparsableRequestObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"object","unevaluatedProperties":{"type":"string"},"description":"Maps the part of the request that could not be parsed to the reason."}},"description":"Error object for an unparsable request body, naming the malformed part."},"Common.Errors.Unauthorized":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"title":{"type":"string","enum":["Unauthorized"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"Authentication credentials are missing or invalid."},"Common.Errors.Forbidden":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["forbidden"]},"title":{"type":"string","enum":["Forbidden"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The authenticated user lacks permission to perform this action."},"Common.Errors.NotFound":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["resource_not_found"]},"title":{"type":"string","enum":["Resource Not Found"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The requested resource does not exist."},"Common.Errors.InvalidArguments":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.InvalidArgumentsObject"}},"description":"The request has missing or invalid arguments; `details` lists the messages per argument."},"Common.Errors.InvalidArgumentsObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"object","unevaluatedProperties":{"type":"array","items":{"type":"string"}},"description":"Maps each invalid argument to the list of validation messages for that argument."}},"description":"Error object for invalid request arguments, adding per-argument messages."},"Common.Errors.ValidationError":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.ValidationErrorObject"}},"description":"The request body failed validation."},"Common.Errors.ValidationErrorObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["validation_error"]},"title":{"type":"string","enum":["Validation Error"]},"details":{"type":"object","unevaluatedProperties":{"type":"array","items":{"type":"string"}},"description":"Maps each invalid field to the list of validation messages for that field."}},"description":"Error object for a failed validation, adding per-field messages."},"Webhooks.WebhookUpdateRequest":{"type":"object","required":["webhook"],"properties":{"webhook":{"$ref":"#/components/schemas/Webhooks.WebhookUpdate"}},"description":"Request body accepted when updating a webhook, and when testing a callback URL."},"Webhooks.WebhookUpdate":{"type":"object","properties":{"callback_url":{"type":"string","format":"uri","description":"URL called via POST when a subscribed trigger event occurs. Must carry a scheme and a resolvable host."},"event_mask":{"$ref":"#/components/schemas/Webhooks.EventMask"},"request_params":{"anyOf":[{"type":"object","unevaluatedProperties":{"type":"string"}},{"type":"null"}],"description":"Additional GET query parameters appended to the callback request, or null when none are set."},"headers":{"anyOf":[{"type":"object","unevaluatedProperties":{"type":"string"}},{"type":"null"}],"description":"Custom request headers for the callback request, or null when none are set. Use this\nto authenticate against a protected endpoint, e.g.\n`{ \"Authorization\": \"Basic user:password\" }`."},"is_active":{"type":"boolean","description":"Whether the webhook is active. Only active webhooks receive notifications. `false` by default."},"send_data":{"type":"boolean","description":"Whether to include event payload data in the callback. When `false`, the delivery\ncarries `event`, `property_id`, `user_id` and `timestamp` and no `payload`. `false`\nby default."},"is_global":{"type":"boolean","description":"Whether the webhook receives events from every property of the billing account rather\nthan from one. `false` by default, and fixed after creation: a property-level webhook\ncannot be converted to a global one.\n\nA global and a property-level webhook can cover the same event. When they point at\ndifferent callback URLs both are delivered; when they point at the same one the\ndelivery is made once, with the property-level webhook's settings."},"is_signed":{"type":"boolean","description":"Whether deliveries are signed. When `true`, every callback request carries the\n`x-hmac-timestamp`, `x-hmac-signature-256` and `x-hmac-keys-256` headers, computed\nwith the key referenced by `signing_key_id`. The Webhook Signing Keys resource\ndescribes the signed string and how to verify a delivery. `false` by default."},"signing_key_id":{"anyOf":[{"$ref":"#/components/schemas/Common.Scalars.id"},{"type":"null"}],"description":"UUID of the signing key deliveries are signed with, or null when none is assigned.\nRequired whenever `is_signed` is true; the key must belong to a billing account the\ncaller is a member of. Responses also expose the key, with its masked versions,\nthrough the `signing_key` relationship."},"property_id":{"anyOf":[{"$ref":"#/components/schemas/Common.Scalars.id"},{"type":"null"}],"description":"UUID of the property to associate the webhook with. Required unless `is_global` is\ntrue; a request that omits both answers `422`."}},"description":"Attributes accepted when updating a webhook. Every attribute is optional; attributes absent from the request are left unchanged."},"Webhooks.EventMask":{"type":"string","description":"Event mask. Use `*` for every event, or a semicolon-separated list of event names,\ne.g. `booking_new;booking_modification;booking_cancellation`. An unknown name\nrejects the request, naming it."}}},"paths":{"/webhooks/{id}/test":{"post":{"operationId":"WebhookTest_testWebhook","summary":"Test a webhook","description":"Send a test POST through a stored webhook and return what the target answered.\nThe request body is optional: attributes carried in it override the stored\nconfiguration for this test only and are validated like on the callback-URL test.\nThe attempt is stored in the webhook's delivery log with `is_test: true`; test\nentries are not counted in delivery statistics.","parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Common.Scalars.id"}}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhooks.WebhookTestResult"}}}},"400":{"description":"The request body could not be parsed as JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.UnparsableRequest"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Unauthorized"}}}},"403":{"description":"The authenticated user lacks permission to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Forbidden"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.NotFound"}}}},"422":{"description":"The request has missing or invalid arguments; `details` lists the messages per argument.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Common.Errors.InvalidArguments"},{"$ref":"#/components/schemas/Common.Errors.ValidationError"}]}}}}},"tags":["Webhooks"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhooks.WebhookUpdateRequest"}}}}}}}}
```
