Skip to content

Update a webhook

PUT
/api/admin/webhooks/{id}
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

id
required

Webhook ID

string
Media typeapplication/json
object
name
required

Webhook name

string
Example
my-webhook
url
required

Webhook URL endpoint

string format: uri
Example
https://example.com/webhook
events

Events that trigger the webhook

Array<string>
Example
[
"item.created",
"item.updated"
]
enabled

Whether webhook is active

boolean
Example
true
secret

Webhook secret for signature verification

string
headers

Custom headers to include

object
key
additional properties
string
payloadSize

Outgoing payload mode

string
Allowed values: full basic none custom
Example
full
customPayload

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.

string
Example
{"id": "{{data.id}}", "msg": "Updated {{data.name}}"}

Webhook updated successfully

Media typeapplication/json
object
id
required

Webhook ID

string
name
required

Webhook name

string
url
required

Webhook URL endpoint

string format: uri
events

Events that trigger the webhook

Array<string>
enabled

Whether webhook is active

boolean
secret

Webhook secret for signature verification

string
headers

Custom headers to include

object
key
additional properties
string
payloadSize

Outgoing payload mode

string
Allowed values: full basic none custom
customPayload

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.

string
createdAt

Creation timestamp

number
updatedAt

Last update timestamp

number
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