Get a message

Retrieve a message and its current delivery state by id.

Returns a single message with its current delivery state, timestamps and tags. Use it to check on a send without waiting for a webhook — the same lookup backs the MCP get_message tool.

GET /v3/messages/{id}

Path parameters

ParameterTypeRequiredDescription
idstringRequiredThe message id returned by POST /v3/messages — always starts with msg_.

Response

Returns { id, status, from, to[], subject, tags[], headers, created_at, send_at, delivered_at, opened_at, clicked_at }. status is one of queued, sent, delivered, bounced, complained, deferred, rejected or failed; the nullable timestamps fill in as the matching events arrive.

headers contains the sender-supplied custom X-* headers (e.g. a correlation id like X-TES-MSGID, attached via the API headers field or as MIME headers on an SMTP submission) — the same set stamped on the delivered email and echoed on every webhook payload for the message.

Responses

StatusDescription
200OK. The message object with its current status and delivery timestamps.
401Missing or invalid API key.
404The message doesn't exist or belongs to another account.

Code examples

cURL
curl https://api.wemail.io/v3/messages/{id} \
  -H "Authorization: Bearer afn_live_…"
Node.js
const res = await fetch("https://api.wemail.io/v3/messages/{id}", {
  headers: {
    Authorization: `Bearer ${process.env.WEMAIL_API_KEY}`,
  },
});
const data = await res.json();
Python
import os, requests

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