List forward deliveries

Audit every HTTP attempt a route’s forward actions made — status code, duration, error class and whether the attempt was final.

One row per HTTP attempt of the route’s forward actions, newest first. Each item is { id, message_id, target_key, attempt, status_code, success, terminal, duration_ms, error_class, attempted_at } — message_id is the inbound message (fetch it with Get an inbound message), target_key identifies the forward URL, attempt counts 1–7, error_class is empty on success or one of ssrf_rejected, timeout, network, http_<status>, and terminal is true when no further attempt follows.

GET /v3/routes/{id}/deliveries

Query parameters

ParameterTypeRequiredDescription
statusstringOptionaldelivered (2xx) or failed. Omit for every attempt.
pageintegerOptionalPage number (1-based). Default 1.
per_pageintegerOptionalItems per page, 1–100. Default 25.
message_iduuidOptionalOnly attempts for this inbound message.

Each item also carries url (the forward URL), response_snippet (first 256 characters of your response body), next_retry_at (approximate time of the next automatic attempt), manual (an attempt of a manual replay, POST /v3/inbound/messages/{id}/replay) and recipient. The page adds a 7-day summary: { delivered_pct, p50_ms, failing, retrying, terminal, window_days }.

Failed forwards retry up to 7 times with increasing back-off (30 s … 24 h); 4xx responses and rejected URLs are not retried. Attempts are purged together with their message after 30 days. Requires a full_access or read_only key — a send_only key is denied.

Responses

StatusDescription
200OK. { items, pagination, summary }, newest first.
401Missing or invalid API key.
403insufficient_scope — a send_only key cannot read routes.
404No such route on your workspace.

Code examples

cURL
# Failed forward attempts of a route, newest first
curl -G https://api.wemail.io/v3/routes/0b7e4c2d-9a1f-4e6b-8c3d-5f2a1b9e7d40/deliveries \
  -H "Authorization: Bearer afn_live_…" \
  --data-urlencode "status=failed" \
  --data-urlencode "per_page=50"
Node.js
const res = await fetch("https://api.wemail.io/v3/routes/0b7e4c2d-9a1f-4e6b-8c3d-5f2a1b9e7d40/deliveries?status=failed", {
  headers: { Authorization: `Bearer ${process.env.WEMAIL_API_KEY}` },
});
const { items } = await res.json();
for (const a of items) console.log(a.message_id, a.attempt, a.status_code, a.error_class, a.terminal);
Python
import os, requests

r = requests.get(
    "https://api.wemail.io/v3/routes/0b7e4c2d-9a1f-4e6b-8c3d-5f2a1b9e7d40/deliveries",
    headers={"Authorization": f"Bearer {os.environ['WEMAIL_API_KEY']}"},
    params={"status": "failed", "per_page": 50},
)
for a in r.json()["items"]:
    print(a["message_id"], a["attempt"], a["status_code"], a["error_class"], a["terminal"])
Go
client, _ := wemail.NewClient(os.Getenv("WEMAIL_API_KEY"))
ctx := context.WithValue(context.Background(), wemail.ContextAccessToken, os.Getenv("WEMAIL_API_KEY"))
page, _, err := client.API.RoutesAPI.ListInboundRouteDeliveries(ctx, "0b7e4c2d-9a1f-4e6b-8c3d-5f2a1b9e7d40").
    Status("failed").PerPage(50).Execute()
ResponseExample response
{
  "items": [
    {
      "id": "9c2d4e6f-1a3b-4c5d-8e7f-0a1b2c3d4e5f",
      "message_id": "6f1c2a1e-7d3b-4b7e-9f0e-2a4c8d9b1e55",
      "target_key": "synthetic:4b1f9c0a7e2d3b65",
      "attempt": 2,
      "status_code": 503,
      "success": false,
      "terminal": false,
      "duration_ms": 412,
      "error_class": "http_503",
      "attempted_at": "2026-11-03T08:15:02.000Z"
    },
    {
      "id": "7e5f3a1b-9c8d-4e2f-a0b1-c2d3e4f5a6b7",
      "message_id": "6f1c2a1e-7d3b-4b7e-9f0e-2a4c8d9b1e55",
      "target_key": "synthetic:4b1f9c0a7e2d3b65",
      "attempt": 1,
      "status_code": null,
      "success": false,
      "terminal": false,
      "duration_ms": 30004,
      "error_class": "timeout",
      "attempted_at": "2026-11-03T08:14:32.000Z"
    }
  ],
  "pagination": { "page": 1, "per_page": 25, "total_count": 2, "total_pages": 1 }
}