PATCH/v1/webhooks/:id

Update a webhook

Updates a webhook's URL, subscribed events, or active state.

Required scope: webhooks.manageRate limit: 10 rps

Parameters

idstringrequired

The webhook ID.

urlstringoptional

New HTTPS delivery URL.

eventsstring[]optional

Replaces the full set of subscribed event types.

activebooleanoptional

Set to false to pause deliveries without deleting the webhook.

Code samples

curl -X PATCH "https://samaprime.com/api/v1/webhooks/smsord_01J8X9AABBCCDD" \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{"url":"https://merchant.example/callbacks/salamcash","events":["order.completed"],"active":true}'

Response

200
{
"data": {
"id": "cm_wh_01J8Z9A1BBCCDD",
"url": "https://merchant.example/webhooks/samaprime",
"events": [
"order.completed",
"order.failed"
],
"active": true
},
"meta": {
"request_id": "req_abc123",
"timestamp": "2026-08-06T12:00:00Z"
}
}

Errors

StatusCode
404not_found

No webhook with this ID belongs to this user.

400validation_failed

Body failed validation.

400invalid_event_type

One or more event types aren't recognized — see Events reference.