Webhooks - Update a Webook
Overview
This endpoint allows you to update a webhook.
Request
PUT /v1/accounts/{account_uuid}/webhooks/{webhook_uuid}
You can use the webhook update endpoint to:
To Change | Description |
---|---|
url | pass url key only |
enabled | pass enabled key only |
secret_token | pass secret_token key only |
events | pass events object only |
options | pass options object only |
Update the URL
When we want to update the URL
PUT/v1/accounts/3584a197b5a9/webhooks/DPTCye18PXXAG2gv
{
"url": "https://example.com/webhooks_updated"
}
Example Response
{
"uuid": "DPTCye18PXXAG2gv",
"url": "https://example.com/webhooks_updated",
...
}
Update the enabled state
When we want to update the enabled state
PUT/v1/accounts/3584a197b5a9/webhooks/DPTCye18PXXAG2gv
{
"enabled": false
}
Example Response
{
"uuid": "DPTCye18PXXAG2gv",
"enabled": false,
...
}
Update the secret token
When we want to update the secret token
PUT/v1/accounts/3584a197b5a9/webhooks/DPTCye18PXXAG2gv
{
"secret_token": "new_secret_token231"
}
Example Response
{
"uuid": "DPTCye18PXXAG2gv",
"secret_token": "new_secret_token231",
...
}
Update the events
When we want to update the events
PUT/v1/accounts/3584a197b5a9/webhooks/DPTCye18PXXAG2gv
{
"events": {
"driver_location_updated": false,
"order_status_updated": false,
}
}
Example Response
{
"uuid": "DPTCye18PXXAG2gv",
"events": {
"driver_location_updated": false,
"order_status_updated": false,
...
}
...
}
Update the options
When we want to update the options
PUT/v1/accounts/3584a197b5a9/webhooks/DPTCye18PXXAG2gv
{
"options": {
"skip_unassigned_if_assigned_to_other_task_group": false
}
}
Example Response
{
"uuid": "DPTCye18PXXAG2gv",
"options": {
"skip_unassigned_if_assigned_to_other_task_group": false
}
...
}