Retry a failed email
POST/api/v1/email/{id}/retry
POST /email/{id}/retry
curl -X POST 'https://www.unitpost.com/api/v1/email/email_123/retry' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'User-Agent: my-app/1.0'Response · 200
{
"object": "email",
"id": "id_123",
"to": [
"customer@example.com"
],
"from": "you@yourdomain.com",
"subject": "Welcome to Acme",
"template_id": "template_123",
"campaign_id": "campaign_123",
"status": "scheduled",
"last_event": "string",
"scheduled_at": "2026-01-01T00:00:00.000Z",
"sent_at": "2026-01-01T00:00:00.000Z",
"delivered_at": "2026-01-01T00:00:00.000Z",
"opened_at": "2026-01-01T00:00:00.000Z",
"clicked_at": "2026-01-01T00:00:00.000Z",
"canceled_at": "2026-01-01T00:00:00.000Z",
"last_error": "string",
"created_at": "2026-01-01T00:00:00.000Z",
"cc": [
"string"
],
"bcc": [
"string"
],
"reply_to": [
"string"
],
"tags": [
{
"name": "Example",
"value": "string"
}
]
}Send a failed email again on the same id, as the dashboard's Retry does. Only a one-off send whose failure was temporary is retried: a campaign recipient, a template test, a suppressed or rejected send, or a content error is a 409 saying why (send a new email instead). It passes the same checks as a new send: the sending domain, your plan and quota. Pass an Idempotency-Key so a retried call can't send it twice. Takes no body; follow the email with Retrieve an email. Requires the emails:send capability.
Parameters2 fields
| Field | Type | Description |
|---|---|---|
idrequired | string · path | — |
Idempotency-Key | string · header | Any unique string (1–256 characters, e.g. a UUID). Retrying with the same key and the same body within 24 hours returns the first result instead of sending again; the same key with a different body is `409 invalid_idempotent_request`, and one still in flight is `409 concurrent_idempotent_requests`. |
Response · 200 fields21 fields
| Field | Type | Description |
|---|---|---|
objectrequired | string | — |
idrequired | string | — |
torequired | string[] | — |
fromrequired | string | — |
subjectrequired | string | — |
template_idrequired | string | null | — |
campaign_idrequired | string | null | — |
statusrequired | enumscheduled | queued | sent | delivered | bounced | complained | canceled | failed | — |
last_eventrequired | string | — |
scheduled_atrequired | string | null | — |
sent_atrequired | string | null | — |
delivered_atrequired | string | null | — |
opened_atrequired | string | null | — |
clicked_atrequired | string | null | — |
canceled_atrequired | string | null | — |
last_errorrequired | string | null | — |
created_atrequired | string | — |
cc | string[] | Cc recipients, as sent. Empty when none. Only on `GET /email/{id}`. |
bcc | string[] | Bcc recipients, as sent. Empty when none. Only on `GET /email/{id}`. |
reply_to | string[] | Reply-To addresses, as sent. Empty when none. Only on `GET /email/{id}`. |
tags | object[] | The send's tags. Empty when none. Only on `GET /email/{id}`. |
200400401403404409422429