Update Webhook
PATCH /v1/webhook_endpoints/:id
Overview
Updates the details of a specific webhook endpoint using its unique identifier. This endpoint allows modification of the webhook URL.
Authorization
- Header:
Authorization: Bearer sk_test_907...de66
Request Details
Request
- cURL
curl https://api-prod.paybytoken.io/v1/webhook_endpoints/we_1ZbSVMF8KXuhmXpKPXkt \
-X PATCH \
-H "Authorization: Bearer sk_test_907...de66" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/webhook2"
}'
Request Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Unique identifier of the webhook endpoint (e.g., we_1ZbSVMF8KXuhmXpKPXkt). |
url | string | The new URL where webhook events will be sent (e.g., https://example.com/webhook2). |
Response Details
Response
The response returns a WebhookEndpoint object containing the updated details of the webhook endpoint.
Example Response
- Success
{
"id": "we_1ZbSVMF8KXuhmXpKPXkt",
"account_id": "acct_1",
"url": "https://example.com/webhook2",
"enabled_events": [],
"description": null,
"secret": "whsec_67f8c3677abd4063da64ca3b11f1fe87",
"metadata": {},
"status": "enabled",
"created_at": "2025-09-05T14:32:30.000Z",
"updated_at": "2025-09-05T14:36:42.000Z"
}