Update a webhook
const url = 'https://example.com/api/admin/webhooks/example';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"my-webhook","url":"https://example.com/webhook","events":["item.created","item.updated"],"enabled":true,"secret":"example","headers":{"additionalProperty":"example"},"payloadSize":"full","customPayload":"{\"id\": \"{{data.id}}\", \"msg\": \"Updated {{data.name}}\"}"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/admin/webhooks/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "my-webhook", "url": "https://example.com/webhook", "events": [ "item.created", "item.updated" ], "enabled": true, "secret": "example", "headers": { "additionalProperty": "example" }, "payloadSize": "full", "customPayload": "{\"id\": \"{{data.id}}\", \"msg\": \"Updated {{data.name}}\"}" }'Updates an existing webhook
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Webhook ID
Request Body
Section titled “Request Body”object
Webhook name
Example
my-webhookWebhook URL endpoint
Example
https://example.com/webhookEvents that trigger the webhook
Example
[ "item.created", "item.updated"]Whether webhook is active
Example
trueWebhook secret for signature verification
Custom headers to include
object
Outgoing payload mode
Example
fullJSON template string used as the entire request body when payloadSize is ‘custom’. String values support {{path}} placeholders resolved against {event, data, webhook}; a value that is exactly one placeholder preserves the source value’s type.
Example
{"id": "{{data.id}}", "msg": "Updated {{data.name}}"}Responses
Section titled “Responses”Webhook updated successfully
object
Webhook ID
Webhook name
Webhook URL endpoint
Events that trigger the webhook
Whether webhook is active
Webhook secret for signature verification
Custom headers to include
object
Outgoing payload mode
JSON template string used as the entire request body when payloadSize is ‘custom’. String values support {{path}} placeholders resolved against {event, data, webhook}; a value that is exactly one placeholder preserves the source value’s type.
Creation timestamp
Last update timestamp
Example
{ "id": "webhook-123", "name": "content-update-webhook", "url": "https://example.com/webhook", "events": [ "item.created", "item.updated", "item.deleted" ], "enabled": true, "payloadSize": "full", "customPayload": "{\"id\": \"{{data.id}}\", \"msg\": \"Updated {{data.name}}\"}"}Error updating webhook