Skip to main content

Create a webhook

Create a webhook.

Parameters

url
string
required
The URL of the webhook endpoint.
events_types
array
A list of event types that trigger the webhook. Each event type corresponds to a specific action or update in the system.

Returns

Returns the created webhook object. Throws an error if some parameters are not valid.

post
/api/webhooks
curl -X POST https://{workspace}.kitchen.co/api/webhooks \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Requested-With: XMLHttpRequest' \
-H 'Authorization: Bearer {API_KEY}'
Response
{
"id": "wh_4c49373b8698d4ceac793e0f",
"url": "http://www.goodwin.com/unde-aut-iusto-quidem-amet-nihil",
"events_types": [
"invoice.deleted",
"list.deleted",
"quote.updated"
],
"attempts_count": 0,
"failed_attempts_count": 0,
"enabled": true,
"secret": "secret",
"created_at": "2024-06-22T23:08:44+00:00",
"updated_at": "2024-06-22T23:08:44+00:00"
}