import { createClient } from "@mailsai/sdk";
const client = createClient(); // reads MAILS_API_KEY
const result = await client.events.redeliver(
"evt_01JZX8K3M9Q4P7VN2YB6RTDC0E",
);
console.log(result);from mailsai import create_client
client = create_client() # reads MAILS_API_KEY
result = client.redeliver_event(
"evt_01JZX8K3M9Q4P7VN2YB6RTDC0E",
)
print(result)curl -X POST 'https://api.mails.ai/v1/events/evt_01JZX8K3M9Q4P7VN2YB6RTDC0E/redeliver' \
-H "Authorization: Bearer $MAILS_API_KEY"mails events redeliver evt_01JABC{
"name": "mails_events_redeliver",
"arguments": {
"event_id": "evt_01JZX8K3M9Q4P7VN2YB6RTDC0E"
}
}{
"event_id": "evt_01JZX8K3M9Q4P7VN2YB6RTDC0E",
"webhook_endpoint_ids": [
"whe_01JZX8K3M9Q4P7VN2YB6RTDC0E"
],
"scheduled_at": "2026-10-04T12:00:00.000Z"
}202 Redelivery scheduled.
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).
429 Rate or quota limit exceeded. The body's resets_at
and retry_after_seconds say when the request can
succeed. A Retry-After header is sent only when
that is 60 seconds or less; a longer wait (an
hourly, daily or monthly cap) sends none, so retry
at resets_at or raise the limit instead of
sleeping.
500 Internal server error.Redeliver an event
Re-dispatches a stored event to all matching webhook endpoints.
import { createClient } from "@mailsai/sdk";
const client = createClient(); // reads MAILS_API_KEY
const result = await client.events.redeliver(
"evt_01JZX8K3M9Q4P7VN2YB6RTDC0E",
);
console.log(result);from mailsai import create_client
client = create_client() # reads MAILS_API_KEY
result = client.redeliver_event(
"evt_01JZX8K3M9Q4P7VN2YB6RTDC0E",
)
print(result)curl -X POST 'https://api.mails.ai/v1/events/evt_01JZX8K3M9Q4P7VN2YB6RTDC0E/redeliver' \
-H "Authorization: Bearer $MAILS_API_KEY"mails events redeliver evt_01JABC{
"name": "mails_events_redeliver",
"arguments": {
"event_id": "evt_01JZX8K3M9Q4P7VN2YB6RTDC0E"
}
}{
"event_id": "evt_01JZX8K3M9Q4P7VN2YB6RTDC0E",
"webhook_endpoint_ids": [
"whe_01JZX8K3M9Q4P7VN2YB6RTDC0E"
],
"scheduled_at": "2026-10-04T12:00:00.000Z"
}202 Redelivery scheduled.
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).
429 Rate or quota limit exceeded. The body's resets_at
and retry_after_seconds say when the request can
succeed. A Retry-After header is sent only when
that is 60 seconds or less; a longer wait (an
hourly, daily or monthly cap) sends none, so retry
at resets_at or raise the limit instead of
sleeping.
500 Internal server error.Path Parameters
idstringrequired
Event id.
Needs a key that is not tied to an agent, since an endpoint can receive every agent's mail (403 insufficient_scope).
Response
event_idstring
The event that was sent again: the id in the path.
webhook_endpoint_idsstring[]
Ids of the endpoints it was sent to: every active endpoint whose event_types take this event. Empty when there is none.
scheduled_atstring
When the redelivery finished (UTC). Each endpoint has been tried once by then, and one that failed is retried like any delivery.
Was this page helpful?