Update a webhook
Changes a webhook.
Setting status to active resumes a disabled or failed webhook and clears its failure count.
Guide: Webhook delivery
A project secret key: vh_sk_... for production, vh_sk_test_... for test. Keep it on your servers.
In: header
Path parameters
The project's id, proj_.... A secret key works only in the project it belongs to.
The webhook's id, wh_ep_....
Request body
application/json
TypeScript definitions
Use the request body type in TypeScript.
The new name.
The new note; null removes it.
The new URL, reachable from the internet.
Every event the webhook receives from now on; at least one.
Whose purchase events it receives from now on.
disabled stops deliveries; active resumes them and clears the failure count of a failed webhook.
Examples
curl -X PATCH "https://api.voidhash.com/api/v1/projects/proj_tz4a98xxat96iws9zmbrgj3a/webhooks/wh_ep_q5w8e2r7t1y4u9i3o6p0a2s5" \ -H "Authorization: Bearer vh_sk_..." \ -H "Content-Type: application/json" \ -d '{ "events": [ "subscription.created", "subscription.renewed", "subscription.expired", "purchase.refunded" ] }'{ "id": "wh_ep_q5w8e2r7t1y4u9i3o6p0a2s5", "projectId": "proj_tz4a98xxat96iws9zmbrgj3a", "name": "Orders backend", "description": null, "url": "https://example.com/webhooks/voidhash", "events": [ "subscription.created", "subscription.renewed", "subscription.expired", "purchase.refunded" ], "environment": "production", "status": "active", "consecutiveFailures": 0, "lastSuccessAt": "2026-03-14T09:31:54.000Z", "createdAt": "2026-03-01T10:00:00.000Z"}{ "error": { "type": "invalid_request", "code": "invalid_webhook_url", "message": "Webhook URL must point to a public address, not localhost or a private network", "param": "url" }}{ "error": { "type": "unauthenticated", "code": "invalid_api_key", "message": "This secret key is not valid." }}{ "error": { "type": "permission_denied", "code": "permission_denied", "message": "Insufficient permissions." }}{ "error": { "type": "not_found", "code": "project_not_found", "message": "There is no project proj_tz4a98xxat96iws9zmbrgj3a, or this credential cannot use it.", "param": "projectId" }}{ "error": { "type": "internal", "code": "internal_error", "message": "Something went wrong on our side. Try again, and contact support with the Request-Id header if it keeps failing." }}Response body
application/json
application/json
application/json
application/json
application/json
application/json
Errors
| Status | type | code | When |
|---|---|---|---|
| 400 | invalid_request | invalid_webhook_url | For a URL Voidhash cannot deliver to. |
It can also fail with the errors every operation shares, such as unauthenticated; see Errors.
More in Webhooks
- List webhooks
GET - Create a webhook
POST - Retrieve a webhook
GET - Delete a webhook
DELETE - Rotate a webhook's secret
POST - Send a test event
POST - List a webhook's deliveries
GET - Retrieve a webhook delivery
GET - Retry a webhook delivery
POST
Something wrong or missing on this page? Tell us by email or on Discord.