Resend messages in bulk

Resend up to 500 never-delivered emails in one API call, with a clear outcome per message: resent, redelivered or skipped and why.

Resends up to 500 emails at once with exactly the same rules as Resend a message: only emails that were rejected, failed or soft-bounced can be resent; accepted ones are redelivered under the same id at no extra cost; ones refused at submission are sent again as new, linked emails that count once; and nothing is resent while the account is suspended or sending is paused. Each id gets its own outcome, so one ineligible id never fails the call.

POST /v3/messages/resend

Body parameters

ParameterTypeRequiredDescription
message_idsarray of stringsRequired1–500 message ids (msg_…) to resend.

Response

Returns { batch_id, results }, where results holds one { message_id, outcome, attempt, error?, new_message_id? } per id, with the same outcome values as the single resend (queued, resubmitted, refused, content_expired, in_progress, sending_paused, account_suspended, not_allowed, not_found, failed).

json200 OK
{
  "batch_id": "5b0c6f7e-2a41-4d3e-9b8a-1f2e3d4c5b6a",
  "results": [
    { "message_id": "msg_01HBYE7K9Z4PMQDR3W", "outcome": "queued", "attempt": 1 },
    { "message_id": "msg_01HBYE7K9Z4PMQDR3X", "outcome": "not_allowed", "attempt": null }
  ]
}

Responses

StatusDescription
200OK. Per-message outcomes — check each outcome.
400Validation error — message_ids empty or longer than 500.
401Missing or invalid API key.
403The key’s scope does not allow sending (read_only), or the account is suspended.

Code examples

cURL
curl -X POST https://api.wemail.io/v3/messages/resend \
  -H "Authorization: Bearer afn_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "message_ids": [ "msg_01HBYE7K9Z4PMQDR3W", "msg_01HBYE7K9Z4PMQDR3X" ] }'
Node.js
const res = await fetch("https://api.wemail.io/v3/messages/resend", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.WEMAIL_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ "message_ids": [ "msg_01HBYE7K9Z4PMQDR3W", "msg_01HBYE7K9Z4PMQDR3X" ] }),
});
const data = await res.json();
Python
import os, requests

r = requests.post(
    "https://api.wemail.io/v3/messages/resend",
    headers={"Authorization": f"Bearer {os.environ['WEMAIL_API_KEY']}"},
    json={ "message_ids": [ "msg_01HBYE7K9Z4PMQDR3W", "msg_01HBYE7K9Z4PMQDR3X" ] },
)
data = r.json()