import { createClient } from "@mailsai/sdk";
const client = createClient(); // reads MAILS_API_KEY
const result = await client.webhooks.deliveries(
"whe_01JZX8K3M9Q4P7VN2YB6RTDC0E",
{
limit: 10,
},
);
console.log(result);from mailsai import create_client
client = create_client() # reads MAILS_API_KEY
result = client.list_webhook_deliveries(
"whe_01JZX8K3M9Q4P7VN2YB6RTDC0E",
limit=10,
)
print(result)curl 'https://api.mails.ai/v1/webhooks/whe_01JZX8K3M9Q4P7VN2YB6RTDC0E/deliveries?limit=10' \
-H "Authorization: Bearer $MAILS_API_KEY"mails webhooks deliveries whe_01JABC --limit 20{
"name": "mails_webhooks_list_deliveries",
"arguments": {
"webhook_id": "whe_01JZX8K3M9Q4P7VN2YB6RTDC0E",
"limit": 10
}
}{
"data": [
{
"id": "whd_01JZX8K3M9Q4P7VN2YB6RTDC0E",
"webhook_endpoint_id": "whe_01JZX8K3M9Q4P7VN2YB6RTDC0E",
"event_id": "evt_01JZX8K3M9Q4P7VN2YB6RTDC0E",
"attempt_number": 0,
"status": "pending",
"http_status": 0,
"response_body_excerpt": "<response_body_excerpt>",
"next_retry_at": "2026-10-04T12:00:00.000Z",
"delivered_at": "2026-10-04T12:00:00.000Z",
"created_at": "<created_at>"
}
],
"has_more": false,
"next_cursor": "<next_cursor>"
}200 A page of delivery attempts for this endpoint.
400 Invalid request — malformed JSON or a field failed
validation. Also feature_not_enabled when this
server has a feature switched off (custom domains
before they are available).
401 Missing or invalid API key.
403 The API key lacks the required scope
(insufficient_scope), or the token belongs to an
app connected by sign-in and this operation is
closed to connected apps
(connected_app_not_allowed).
404 Resource not found in this workspace, or the agent
a send names is archived (agent_archived).
500 Internal server error.List delivery attempts
import { createClient } from "@mailsai/sdk";
const client = createClient(); // reads MAILS_API_KEY
const result = await client.webhooks.deliveries(
"whe_01JZX8K3M9Q4P7VN2YB6RTDC0E",
{
limit: 10,
},
);
console.log(result);from mailsai import create_client
client = create_client() # reads MAILS_API_KEY
result = client.list_webhook_deliveries(
"whe_01JZX8K3M9Q4P7VN2YB6RTDC0E",
limit=10,
)
print(result)curl 'https://api.mails.ai/v1/webhooks/whe_01JZX8K3M9Q4P7VN2YB6RTDC0E/deliveries?limit=10' \
-H "Authorization: Bearer $MAILS_API_KEY"mails webhooks deliveries whe_01JABC --limit 20{
"name": "mails_webhooks_list_deliveries",
"arguments": {
"webhook_id": "whe_01JZX8K3M9Q4P7VN2YB6RTDC0E",
"limit": 10
}
}{
"data": [
{
"id": "whd_01JZX8K3M9Q4P7VN2YB6RTDC0E",
"webhook_endpoint_id": "whe_01JZX8K3M9Q4P7VN2YB6RTDC0E",
"event_id": "evt_01JZX8K3M9Q4P7VN2YB6RTDC0E",
"attempt_number": 0,
"status": "pending",
"http_status": 0,
"response_body_excerpt": "<response_body_excerpt>",
"next_retry_at": "2026-10-04T12:00:00.000Z",
"delivered_at": "2026-10-04T12:00:00.000Z",
"created_at": "<created_at>"
}
],
"has_more": false,
"next_cursor": "<next_cursor>"
}200 A page of delivery attempts for this endpoint.
400 Invalid request — malformed JSON or a field failed
validation. Also feature_not_enabled when this
server has a feature switched off (custom domains
before they are available).
401 Missing or invalid API key.
403 The API key lacks the required scope
(insufficient_scope), or the token belongs to an
app connected by sign-in and this operation is
closed to connected apps
(connected_app_not_allowed).
404 Resource not found in this workspace, or the agent
a send names is archived (agent_archived).
500 Internal server error.Path Parameters
idstringrequired
Webhook endpoint id.
Query Parameters
limitinteger
Page size (1–100).
cursorstring
Opaque cursor from a previous page's next_cursor.
Response
dataobject[]
The items on this page, at most limit of them.
has_moreboolean
True when more items follow this page: pass next_cursor as cursor to get them.
next_cursorstring
Pass as cursor to fetch the next page. Absent on the last page.
Was this page helpful?