Skip to main content
PATCH
/
api
/
v2
/
webhooks
/
{webhook_id}
Update a webhook
curl --request PATCH \
  --url https://agp.eu.hcompany.ai/api/v2/webhooks/{webhook_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "enabled_events": [
    "<string>"
  ],
  "description": "<string>",
  "disabled": true
}
'
Partially updates a webhook. Only the fields you send are changed. The signing secret cannot be changed; to rotate it, delete the webhook and create a new one. Returns the updated webhook object.

Path parameters

webhook_id
string
required
The webhook’s id (UUID).

Request body

url
string
New target URL. Must be https://.
enabled_events
string[]
Replacement list of event types, or ["*"] for all.
description
string
New label (max 255 characters).
disabled
boolean
Set true to pause deliveries without deleting the webhook.

Examples

curl -X PATCH https://agp.eu.hcompany.ai/api/v2/webhooks/f47ac10b-58cc-4372-a567-0e02b2c3d479 \
  -H "Authorization: Bearer $HAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"disabled": true}'

Errors

StatusCause
404Webhook not found or you don’t have access.
422Body failed validation: non-https URL, empty or unknown enabled_events.