Skip to main content

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

PUT /webhook_endpoints/{id}

Path parameters

id string (必选) Webhook ID, format wep_<ULID>

Request body

description string | null (可选)Max 256 characters; null or empty string clears the description; omitted means unchangedurl string (可选)New callback URL; re-validated when provided; private, loopback, link-local, and reserved addresses are rejectedevents array<string> (可选)Replaces 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

id string—description string | null—url string—events array<string>—status string—disabled_reason string | null—consecutive_fail integerCurrent value at the time of updatelast_success_at string | nullCurrent value at the time of updatelast_failure_at string | nullCurrent value at the time of updatecreated_at string—updated_at string—request_id stringUnique identifier for this request; include it when troubleshooting

Response

{
  "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 statusError codeDescription
40011800016invalid webhook request
40411800001webhook not found