Update Webhook
Updates the description, callback URL, or subscribed events of a Webhook. Omitted fields remain unchanged.
Prerequisites
Endpoint and authentication configured. For details, see Overview and authentication.
Endpoint
/webhook_endpoints/{id}Path parameters
idstringRequiredWebhook ID, format wep_<ULID>
Request body
descriptionstring | nullOptionalMax 256 characters; null or empty string clears the description; omitted means unchanged
urlstringOptionalNew callback URL; re-validated when provided; private, loopback, link-local, and reserved addresses are rejected
eventsarray<string>OptionalReplaces the entire subscription list with named event types; omitted means unchanged
Request example
curl -X PUT "$AGENTSTUDIO_URL/webhook_endpoints/wep_01JXX7YQGPRPV1BZXA35QE7WDP" \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "Production Agent and Session events",
"url": "https://example.com/managedagent/webhooks-v2",
"events": [
"agent.updated",
"session.status_idled"
]
}'
Response fields
idstringResource ID
descriptionstring | nullDescription
urlstringWebhook callback URL
eventsarray<string>Subscribed event types
statusstringResource status
disabled_reasonstring | nullDisable reason
consecutive_failintegerCurrent value at the time of update
last_success_atstring | nullCurrent value at the time of update
last_failure_atstring | nullCurrent value at the time of update
created_atstringCreation time, ISO 8601
updated_atstringLast update time, ISO 8601
request_idstringUnique identifier for this request; include it when troubleshooting
Response example
{
"id": "wep_01JXX7YQGPRPV1BZXA35QE7WDP",
"description": "Production Agent and Session events",
"url": "https://example.com/managedagent/webhooks-v2",
"events": [
"agent.updated",
"session.status_idled"
],
"status": "ACTIVE",
"disabled_reason": null,
"consecutive_fail": 2,
"last_success_at": "2026-08-06T10:05:00Z",
"last_failure_at": "2026-08-06T10:10:00Z",
"created_at": "2026-08-06T10:00:00Z",
"updated_at": "2026-08-06T10:15:00Z",
"request_id": "8e1d16e4"
}
Error codes
| HTTP status | Error code | Description |
|---|---|---|
| 400 | 11800016 | invalid webhook request |
| 404 | 11800001 | webhook not found |