PATCH/v1/webhooks/:id
Update a webhook
Updates a webhook's URL, subscribed events, or active state.
Required scope:
webhooks.manageRate limit: 10 rpsParameters
idstringrequiredThe webhook ID.
urlstringoptionalNew HTTPS delivery URL.
eventsstring[]optionalReplaces the full set of subscribed event types.
activebooleanoptionalSet 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
| Status | Code |
|---|---|
| 404 | not_foundNo webhook with this ID belongs to this user. |
| 400 | validation_failedBody failed validation. |
| 400 | invalid_event_typeOne or more event types aren't recognized — see Events reference. |