Skip to main content

List Webhook Events

Returns delivery events for the specified Webhook from the last 7 days, sorted by event_id descending. Each event includes delivery information for the current Webhook. Returns an empty array when no records match. Past delivery events remain queryable for 7 days after Webhook deletion.

Prerequisites

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

Endpoint

GET /webhook_endpoints/{id}/events

Path parameters

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

Query parameters

limit integer (可选)Items per page; default 20, range 1–100page string (可选)Opaque pagination cursor; omit on the first request, and pass the next_page returned by the previous page on subsequent requests

Request example

curl "$AGENTSTUDIO_URL/webhook_endpoints/wep_01JXX7YQGPRPV1BZXA35QE7WDP/events?limit=20" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY"

Response fields

data array<object>Array of event objectsdata[].type stringAlways eventdata[].id stringEvent ID, format whe_<ULID>; all delivery attempts for the same event share the same outer iddata[].created_at stringEvent creation time, ISO 8601data[].data objectEvent payloaddata[].data.id stringResource identifier; for Thread events, this is the Session identifierdata[].data.type stringEvent typedata[].data.workspace_id stringWorkspace IDdata[].data.session_thread_id stringFor Thread events, the specific Thread identifierdata[].delivery objectDelivery information for the current Webhookdata[].delivery.webhook_id stringWebhook IDdata[].delivery.status stringDelivery status, e.g. SUCCEEDEDdata[].delivery.attempt_count integerNumber of delivery attemptsdata[].delivery.delivery_at stringDelivery start time, ISO 8601data[].delivery.finish_at stringDelivery finish time, ISO 8601data[].delivery.failure_reason string | nullFailure reason; null on successnext_page string | nullNext page cursor; null on the last pagerequest_id stringUnique identifier of this request; attach it when troubleshooting issues

Response

The response contains data (an array of Webhook objects) and next_page (the cursor for the next page; null when there is no more data).
{
  "data": [
    {
      "type": "event",
      "id": "whe_01JXX8JY9BBM4BK4C2P7K3M3ZR",
      "created_at": "2026-08-06T10:30:21.123Z",
      "data": {
        "id": "sesn_xxx",
        "type": "session.thread_idled",
        "workspace_id": "ws_xxx",
        "session_thread_id": "sthread_xxx"
      },
      "delivery": {
        "webhook_id": "wep_01JXX7YQGPRPV1BZXA35QE7WDP",
        "status": "SUCCEEDED",
        "attempt_count": 1,
        "delivery_at": "2026-08-06T10:30:21.450Z",
        "finish_at": "2026-08-06T10:30:21.780Z",
        "failure_reason": null
      }
    }
  ],
  "next_page": null,
  "request_id": "8e1d16e4"
}

Error codes

HTTP statusError codeDescription
40011800016invalid webhook event query