Replay the forwards of an inbound message
Run the forward actions of the route that matched an inbound message again — after fixing your endpoint, or to push a message a second time.
Queues the forward actions of the route that matched this message again, for a kept message as well as a forward-only one. Typical use: your endpoint was down or answered 5xx for longer than the automatic retries lasted, you fixed it, and you want the message pushed once more without the sender resending it.
POST /v3/inbound/messages/{id}/replay
The response tells you what happened per forward URL. A delivery that is still waiting for its next automatic retry is run now instead of being duplicated — it is counted in promoted. Every other forward action gets one new delivery, counted in enqueued; that attempt is recorded with manual: true in List forward deliveries and in the inbound log, and it is not retried automatically — call replay again if it fails.
The message must still exist (kept messages live 30 days, forward-only ones 72 hours) and its route must still have a forward action; otherwise the call answers 409 nothing_to_replay. Requires a `full_access` key. Limit: 30 calls per minute per key.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | uuid | Required | The inbound message ID (from the poll API, a forward payload or the inbound log). |
Responses
| Status | Description |
|---|---|
202 | Accepted. { message_id, enqueued, promoted } — the forwards run in the background; watch them in the forward deliveries or the inbound log. |
400 | validation_error — the id is not a uuid. |
401 | Missing or invalid API key. |
403 | insufficient_scope — only a full_access key may replay. |
404 | No such inbound message on your workspace (expired or deleted messages included). |
409 | nothing_to_replay — the route that matched has no forward action any more. |
429 | Rate limit exceeded (30 calls per minute). |
Code examples
curl -X POST https://api.wemail.io/v3/inbound/messages/6f1c2a1e-7d3b-4b7e-9f0e-2a4c8d9b1e55/replay \
-H "Authorization: Bearer afn_live_…"
# 202 {"message_id":"6f1c2a1e-7d3b-4b7e-9f0e-2a4c8d9b1e55","enqueued":1,"promoted":0}const res = await fetch("https://api.wemail.io/v3/inbound/messages/6f1c2a1e-7d3b-4b7e-9f0e-2a4c8d9b1e55/replay", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.WEMAIL_API_KEY}` },
});
const { enqueued, promoted } = await res.json();
console.log(res.status, enqueued, promoted); // 202 1 0import os, requests
r = requests.post(
"https://api.wemail.io/v3/inbound/messages/6f1c2a1e-7d3b-4b7e-9f0e-2a4c8d9b1e55/replay",
headers={"Authorization": f"Bearer {os.environ['WEMAIL_API_KEY']}"},
)
print(r.status_code, r.json()) # 202 {'message_id': …, 'enqueued': 1, 'promoted': 0}client, _ := wemail.NewClient(os.Getenv("WEMAIL_API_KEY"))
ctx := context.WithValue(context.Background(), wemail.ContextAccessToken, os.Getenv("WEMAIL_API_KEY"))
out, _, err := client.API.InboundAPI.ReplayInboundMessage(ctx, "6f1c2a1e-7d3b-4b7e-9f0e-2a4c8d9b1e55").Execute()
fmt.Println(out.Enqueued, out.Promoted){
"message_id": "6f1c2a1e-7d3b-4b7e-9f0e-2a4c8d9b1e55",
"enqueued": 1,
"promoted": 0
}