Skip to content

Test a webhook

POST
/api/v1/partnership/webhooks/{id}/test/
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.

id
required
string

The unique identifier of the webhook to 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
id

Unique numeric identifier for the webhook, assigned by the server.

integer
created_at

ISO 8601 timestamp indicating when the webhook was created.

string format: date-time
updated_at

ISO 8601 timestamp indicating when the webhook was last modified.

string format: date-time
url
required

The publicly accessible URL that will receive event POST requests. Must be a valid URI (HTTP or HTTPS). Maximum length is 500 characters.

string format: uri
<= 500 characters
name

Optional human-readable label for the webhook, useful for identifying it in dashboards or logs. Maximum length is 125 characters.

string
nullable <= 125 characters
is_enabled

When true, the webhook is active and will receive event deliveries. Set to false to pause deliveries without deleting the webhook.

boolean
last_use_at

ISO 8601 timestamp of the most recent delivery attempt (successful or not). null if the webhook has never been triggered.

string format: date-time
nullable
last_response_status_code

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.

integer
nullable <= 32767
last_response

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
key
additional properties
subscribed_events

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
key
additional properties
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"
}
}

The webhook object with updated delivery metadata after the test.

Media type application/json

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
id

Unique numeric identifier for the webhook, assigned by the server.

integer
created_at

ISO 8601 timestamp indicating when the webhook was created.

string format: date-time
updated_at

ISO 8601 timestamp indicating when the webhook was last modified.

string format: date-time
url
required

The publicly accessible URL that will receive event POST requests. Must be a valid URI (HTTP or HTTPS). Maximum length is 500 characters.

string format: uri
<= 500 characters
name

Optional human-readable label for the webhook, useful for identifying it in dashboards or logs. Maximum length is 125 characters.

string
nullable <= 125 characters
is_enabled

When true, the webhook is active and will receive event deliveries. Set to false to pause deliveries without deleting the webhook.

boolean
last_use_at

ISO 8601 timestamp of the most recent delivery attempt (successful or not). null if the webhook has never been triggered.

string format: date-time
nullable
last_response_status_code

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.

integer
nullable <= 32767
last_response

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
key
additional properties
subscribed_events

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
key
additional properties
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"
}
}