Skip to main content

Enable Webhook

Enables a disabled Webhook. The request body is empty. Re-enabling does not redeliver events that occurred during the disabled period.

Prerequisites

Endpoint and authentication configured. For details, see API overview and authentication.

Endpoint

POST /webhook_endpoints/{id}/enable

Path parameters

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

Request example

curl -X POST "$AGENTSTUDIO_URL/webhook_endpoints/wep_01JXX7YQGPRPV1BZXA35QE7WDP/enable" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY"

Response fields

id string—description string | null—url string—events array<string>—status stringACTIVE after enablingdisabled_reason string | null—consecutive_fail integerCurrent value when the enable completeslast_success_at string | nullCurrent value when the enable completeslast_failure_at string | nullCurrent value when the enable completescreated_at string—updated_at string—request_id stringUnique identifier of this request; include it when troubleshooting issues

Response

{
  "id": "wep_01JXX7YQGPRPV1BZXA35QE7WDP",
  "description": "Production session events",
  "url": "https://example.com/managedagent/webhooks",
  "events": [
    "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:20:00Z",
  "request_id": "8e1d16e4"
}

Error codes

HTTP statusError codeDescription
40411800001webhook not found