List Webhook events
List Webhook events
Note for users in mainland China: Please use https://api.toapis.cn as the API endpoint (Base URL). Replace https://api.toapis.com with https://api.toapis.cn in the examples in this document.
Behavior
Lists webhook delivery events, for confirming delivery and debugging failures. Without api_key_id it returns all events under the account. When provided, it must be an own ordinary model key (soft-deleted keys also work). The default range is the last 24 hours.
from/to must be given together with a maximum span of 31 days. limit defaults to 50, max 100, paginated by internal ID descending. Cursors bind to the account and filters — keep filters unchanged across pages.
If from/to are omitted on later pages, the time range fixed by the first-page request is reused instead of being recomputed at page-turn time.
Authentication
AuthorizationstringheaderrequiredUse the system access token Bearer YOUR_SYSTEM_ACCESS_TOKEN. Access is limited to your own account. Model keys are not accepted. X-User-Id is not required. There is no administrator or team bypass.
Request parameters
api_key_idintegerqueryPositive integer ID of your own ordinary model key, not the sk- secret or access token. The query parameter must be a positive integer; omissions and null are rejected.
task_idstringqueryPlatform task ID.
statusstringqueryDelivery status. pending/delivering/delivered/dead/cancelled.
fromstringqueryRFC 3339 time with timezone. Supply from/to together.
tostringqueryRFC 3339 time with timezone. Supply from/to together.
limitintegerqueryPage size, default 50, maximum 100.
cursorstringqueryCursor from the previous page.
Invalid parameters return 400; a filtered key that is missing or foreign returns 404; rate limiting returns 429.
Request examples
requestExample
curl --request GET \
--url 'https://api.toapis.com/api/v1/webhook/events' \
--header 'Authorization: Bearer YOUR_SYSTEM_ACCESS_TOKEN'Response examples
responseExample
{
"code": 0,
"message": "",
"data": {
"items": [
{
"event_id": "evt_example",
"api_key_id": 123,
"task_id": "example-task",
"type": "generation.completed",
"status": "delivered",
"attempts": 1,
"reason": "delivered",
"last_http_status": 200,
"created_at": "2026-11-13T00:00:00Z",
"next_attempt_at": null,
"delivered_at": "2026-11-13T00:00:01Z",
"expires_at": "2026-11-14T12:00:00Z"
}
],
"has_more": false,
"next_cursor": null,
"meta": {
"scope": "self",
"from": "2026-11-12T01:00:00Z",
"to": "2026-11-13T01:00:00Z",
"consistency": "eventual"
}
}
}For the onboarding order and signature verification, see Get Webhook configuration.