Test a webhook
const url = 'https://public.api.barestho.com/api/v1/partnership/webhooks/example/test/';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"url":"https://example.com","name":"example","is_enabled":true,"last_use_at":"2026-04-15T12:00:00Z","last_response_status_code":1,"last_response":{"additionalProperty":"example"},"subscribed_events":{"additionalProperty":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://public.api.barestho.com/api/v1/partnership/webhooks/example/test/ \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "url": "https://example.com", "name": "example", "is_enabled": true, "last_use_at": "2026-04-15T12:00:00Z", "last_response_status_code": 1, "last_response": { "additionalProperty": "example" }, "subscribed_events": { "additionalProperty": "example" } }'Sends a test payload to the webhook’s registered URL. Use this after creating or updating a webhook to confirm that your endpoint is reachable, correctly parses the payload, and returns a 2xx HTTP response.
The test delivery is recorded in last_use_at and last_response_status_code, just like a real event delivery.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The unique identifier of the webhook to test.
Request Body
Section titled “Request Body ”Represents a webhook endpoint registered by the partner. When subscribed events occur (e.g. a reservation is created or cancelled), the platform sends an HTTP POST request to the registered url containing the event payload.
object
Unique numeric identifier for the webhook, assigned by the server.
ISO 8601 timestamp indicating when the webhook was created.
ISO 8601 timestamp indicating when the webhook was last modified.
The publicly accessible URL that will receive event POST requests. Must be a valid URI (HTTP or HTTPS). Maximum length is 500 characters.
Optional human-readable label for the webhook, useful for identifying it in dashboards or logs. Maximum length is 125 characters.
When true, the webhook is active and will receive event deliveries. Set to false to pause deliveries without deleting the webhook.
ISO 8601 timestamp of the most recent delivery attempt (successful or not). null if the webhook has never been triggered.
HTTP status code returned by the target URL on its most recent delivery attempt. null if no delivery has been made yet. A 2xx value indicates success.
The response body returned by the target URL on its most recent delivery attempt, stored as a JSON object. null if no delivery has been made or the response body was empty.
object
A JSON object mapping event type keys to boolean values, specifying which platform events should trigger a delivery to this webhook. Consult the event catalogue in your partner documentation for available event type keys.
object
Example generated
{ "url": "https://example.com", "name": "example", "is_enabled": true, "last_use_at": "2026-04-15T12:00:00Z", "last_response_status_code": 1, "last_response": { "additionalProperty": "example" }, "subscribed_events": { "additionalProperty": "example" }}Represents a webhook endpoint registered by the partner. When subscribed events occur (e.g. a reservation is created or cancelled), the platform sends an HTTP POST request to the registered url containing the event payload.
object
Unique numeric identifier for the webhook, assigned by the server.
ISO 8601 timestamp indicating when the webhook was created.
ISO 8601 timestamp indicating when the webhook was last modified.
The publicly accessible URL that will receive event POST requests. Must be a valid URI (HTTP or HTTPS). Maximum length is 500 characters.
Optional human-readable label for the webhook, useful for identifying it in dashboards or logs. Maximum length is 125 characters.
When true, the webhook is active and will receive event deliveries. Set to false to pause deliveries without deleting the webhook.
ISO 8601 timestamp of the most recent delivery attempt (successful or not). null if the webhook has never been triggered.
HTTP status code returned by the target URL on its most recent delivery attempt. null if no delivery has been made yet. A 2xx value indicates success.
The response body returned by the target URL on its most recent delivery attempt, stored as a JSON object. null if no delivery has been made or the response body was empty.
object
A JSON object mapping event type keys to boolean values, specifying which platform events should trigger a delivery to this webhook. Consult the event catalogue in your partner documentation for available event type keys.
object
Example generated
url=https%3A%2F%2Fexample.com&name=example&is_enabled=true&last_use_at=2026-04-15T12%3A00%3A00Z&last_response_status_code=1&additionalProperty=example&additionalProperty=exampleRepresents a webhook endpoint registered by the partner. When subscribed events occur (e.g. a reservation is created or cancelled), the platform sends an HTTP POST request to the registered url containing the event payload.
object
Unique numeric identifier for the webhook, assigned by the server.
ISO 8601 timestamp indicating when the webhook was created.
ISO 8601 timestamp indicating when the webhook was last modified.
The publicly accessible URL that will receive event POST requests. Must be a valid URI (HTTP or HTTPS). Maximum length is 500 characters.
Optional human-readable label for the webhook, useful for identifying it in dashboards or logs. Maximum length is 125 characters.
When true, the webhook is active and will receive event deliveries. Set to false to pause deliveries without deleting the webhook.
ISO 8601 timestamp of the most recent delivery attempt (successful or not). null if the webhook has never been triggered.
HTTP status code returned by the target URL on its most recent delivery attempt. null if no delivery has been made yet. A 2xx value indicates success.
The response body returned by the target URL on its most recent delivery attempt, stored as a JSON object. null if no delivery has been made or the response body was empty.
object
A JSON object mapping event type keys to boolean values, specifying which platform events should trigger a delivery to this webhook. Consult the event catalogue in your partner documentation for available event type keys.
object
Responses
Section titled “ Responses ”The webhook object with updated delivery metadata after the test.
Represents a webhook endpoint registered by the partner. When subscribed events occur (e.g. a reservation is created or cancelled), the platform sends an HTTP POST request to the registered url containing the event payload.
object
Unique numeric identifier for the webhook, assigned by the server.
ISO 8601 timestamp indicating when the webhook was created.
ISO 8601 timestamp indicating when the webhook was last modified.
The publicly accessible URL that will receive event POST requests. Must be a valid URI (HTTP or HTTPS). Maximum length is 500 characters.
Optional human-readable label for the webhook, useful for identifying it in dashboards or logs. Maximum length is 125 characters.
When true, the webhook is active and will receive event deliveries. Set to false to pause deliveries without deleting the webhook.
ISO 8601 timestamp of the most recent delivery attempt (successful or not). null if the webhook has never been triggered.
HTTP status code returned by the target URL on its most recent delivery attempt. null if no delivery has been made yet. A 2xx value indicates success.
The response body returned by the target URL on its most recent delivery attempt, stored as a JSON object. null if no delivery has been made or the response body was empty.
object
A JSON object mapping event type keys to boolean values, specifying which platform events should trigger a delivery to this webhook. Consult the event catalogue in your partner documentation for available event type keys.
object
Example generated
{ "url": "https://example.com", "name": "example", "is_enabled": true, "last_use_at": "2026-04-15T12:00:00Z", "last_response_status_code": 1, "last_response": { "additionalProperty": "example" }, "subscribed_events": { "additionalProperty": "example" }}