Skip to main content

Webhooks - Create New Webook

Overview

This endpoint allows you to create a webhook.


Request

POST /v1/accounts/{account_uuid}/webhooks

Mandatory Request Values

KeyTypeDescriptionExample
urlstringThe URL where the webhooks will be sent tohttps://example.com/webhooks
eventsobject EventsThe subscribed events, you do not need to send every event but send the ones you want to enable

Optional Request Values

KeyTypeDescriptionExample
secret_tokenstringThe secret token which will be sent in the Auth-Token header of each requestsecretToken123
optionsobject OptionsExtra options for the webhook

Example Request

POST /v1/accounts/3584a197b5a9/orders

{
"url": "https://example.com/webhooks",
"secret_token": "secret_token123",
"events": {
"driver_location_updated": true,
"order_status_updated": true,
"driver_eta_updated": true,
"order_assigned": true,
"order_unassigned": true,
"delivery_status_updated": true,
"item_status_updated": {
"suggested": false,
"being_prepared": false,
"prepared": false
},
"analytics_report_ready": true,
"driver_shift_updated": true,
"order_preparation_updated": {
"suggested": false,
"being_prepared": false,
"prepared": false
},
"order_kds_print_request": false
},
"options": {
"skip_unassigned_if_assigned_to_other_task_group": true
}
}

Example Response

{
"uuid": "DPTCye18PXXAG2gv",
"url": "https://example.com/webhooks",
"secret_token": "secret_token123",
"enabled": true,
"events": {
"driver_location_updated": true,
"order_status_updated": true,
"driver_eta_updated": true,
"order_assigned": true,
"order_unassigned": true,
"delivery_status_updated": true,
"item_status_updated": {
"suggested": false,
"being_prepared": false,
"prepared": false
},
"analytics_report_ready": true,
"driver_shift_updated": true,
"order_preparation_updated": {
"suggested": false,
"being_prepared": false,
"prepared": false
},
"order_kds_print_request": false
},
"options": {
"skip_unassigned_if_assigned_to_other_task_group": true
}
}