Update Webhook
Modify an existing webhook configuration
Updates an existing webhook configuration. Only include the fields you want to change — omitted fields are left unchanged. Supports changing the name, endpoint URL, subscribed events, authentication type and credentials, timeout, and status.
Requires a valid `api_key` in the JSON request body
Tip:
Send `{"help": true}` as the request body to receive full usage documentation and the complete list of supported events.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
api_key |
body | string |
Yes | Your Zyntro API key |
org_id |
body | string |
Yes | Your organization UUID |
wh_id |
body | string |
Yes | The UUID of the webhook to update |
wh_name |
body | string |
No | New display name (max 100 characters) |
wh_endpoint |
body | string |
No | New destination URL — must be a valid URL |
wh_events |
body | array |
No | New array of event slugs. **Replaces** the entire event list — not additive. |
wh_auth_type |
body | string |
No | New auth type: `none`, `bearer`, `basic`, `api_key`, or `custom_header` |
wh_auth_data |
body | object |
No | New auth credentials matching the auth type |
wh_timeout |
body | integer |
No | New timeout in seconds (5-120) |
wh_status |
body | string |
No | New status: `active`, `paused`, or `disabled` |
Warning:
When updating `wh_events`, the new array **replaces** the existing event list entirely. If you want to add an event, you must include all existing events plus the new one. To see current events, use **Fetch Webhooks** first.
Request Body
Content-Type: application/json
Example
json
{
"wh_id": "d4e5f6a7-b8c9-0123-defg-456789012345",
"org_id": "YOUR_ORG_ID",
"api_key": "YOUR_API_KEY",
"wh_events": [
"new_contact",
"form_filled",
"invoice_paid",
"subscription.created"
],
"wh_status": "active"
}
Code Samples
bash
curl -X POST https://app.zyntrohq.com/public/account/updateWebhook \
-H "Content-Type: application/json" \
-d '{"api_key": "YOUR_API_KEY", "org_id": "YOUR_ORG_ID", "wh_id": "d4e5f6a7-b8c9-0123-defg-456789012345", "wh_status": "paused"}'
bash
curl -X POST https://app.zyntrohq.com/public/account/updateWebhook \
-H "Content-Type: application/json" \
-d '{"api_key": "YOUR_API_KEY", "org_id": "YOUR_ORG_ID", "wh_id": "d4e5f6a7-b8c9-0123-defg-456789012345", "wh_endpoint": "https://new-endpoint.example.com/webhook"}'
Response
200
Webhook updated
json
{
"data": {
"wh_id": "d4e5f6a7-b8c9-0123-defg-456789012345",
"action": "updated"
},
"status": "success",
"message": "Webhook updated successfully"
}
200
No fields to update
json
{
"status": "error",
"message": "No fields to update. Include at least one of: wh_name, wh_endpoint, wh_events, wh_auth_type, wh_auth_data, wh_timeout, wh_status"
}
200
Not found or access denied
json
{
"status": "error",
"message": "Webhook not found or access denied"
}
Errors
| Code | Message | Resolution |
|---|---|---|
MISSING_API_KEY |
Missing API Key The api_key is missing. |
Include your API key. |
INVALID_API_KEY |
Invalid API Key No active user matches. |
Verify your key. |
MISSING_ORG |
Missing org ID The org_id is missing. |
Include your org ID. |
MISSING_WH_ID |
Missing webhook ID (wh_id) The wh_id is missing. |
Provide the webhook UUID from Fetch Webhooks. |
NOT_FOUND |
Webhook not found or access denied No webhook with that ID belongs to the authenticated user in the specified org. |
Verify the wh_id and org_id. |
INVALID_URL |
Invalid endpoint URL The wh_endpoint is not a valid URL. |
Provide a valid URL. |
INVALID_EVENTS |
Invalid event(s): ... One or more event slugs are not recognized. |
Send `{"help": true}` to see supported events. |
INVALID_AUTH |
Invalid wh_auth_type The auth type is not recognized. |
Use: none, bearer, basic, api_key, or custom_header. |
INVALID_STATUS |
Invalid wh_status The status is not recognized. |
Use: active, paused, or disabled. |
NO_FIELDS |
No fields to update No updatable fields were included in the request. |
Include at least one field to change. |
UPDATE_FAILED |
Failed to update webhook Database update failed. |
Retry the request. |