Retrieve a sent message
Requires scope: read.
Request
- Base URL: https://api.mails.ai
- URL: https://api.mails.ai/v1/messages/{id}
- Auth: HTTP bearer
Path parameters
Sent message id (msg_…).
Response
The message, including full body and delivery timestamps.
Message id (msg_…), the {id} in /v1/messages/{id}.
Id of the agent that sent the message (agt_…).
The agent address this was sent as — the resolved from. Read it back when you pass from as a naming hint instead of an explicit agent: it is the receipt for which identity the API picked. On a verified custom domain the message goes out from this exact address. On the shared mails.ai domain it goes out from <name>.<workspace>@send.mails.ai, and replies come back through <name>.<workspace>@in.mails.ai.
The thread the message belongs to (thrd_…).
The message this one answers: the message replied to or forwarded, or the in_reply_to_message_id the send set. Present on reply responses and on the single-message GET, when set.
The To recipients, always a list. On a reply they come from the original: its Reply-To or sender for a received message, its to for one of your sent messages.
Cc recipients. Always present on reply responses ([] when none); on the list and the single-message GET, present when there are any.
Bcc recipients. Present only on the list and the single-message GET, when there are any.
The subject as sent. On a reply, Re: and the original's subject, unless that already starts with Re:; on a forward, the subject you gave or Fwd: and the original's.
The plain-text body as sent; on a forward it includes the quoted original. Present only on the single-message GET, when there is one.
The HTML body as sent. Present only on the single-message GET, when there is one.
The cold-email firewall's score for the message, from 0 (clean) to 1 (cold or spam). Present on the send response, the list and the single-message GET.
sent once handed off; delivered, bounced or complained when the receiving side reports it (with several recipients the latest report wins). delayed when a transient (soft) bounce came back: the receiving server has not taken the message yet; it is not a bounce, does not count toward the bounce rate, raises message.delayed (sent only to endpoints that list it) and may still become delivered; with no delivery confirmed within 5 days of sending, it becomes bounced. sending only while a scheduled send is going out; rejected when the send failed, or a scheduled send was refused when it came due; canceled when a scheduled send was stopped. A live send only to the reserved test address reply@test.mails.ai is delivered at once, with a message.delivered event, since it is never transmitted; with a test key it stays sent, as every test-mode send does. Either way its automatic reply arrives as reply.received (at most 3 replies in one thread; a 4th message there gets none).
The recipients the email service refused when the message was sent, while it took the message for the others: it went to everyone else, and not to these. The message is still a send, so sending it again with the same Idempotency-Key gives this answer back and sends nothing; to reach them, check the addresses and send them a new message. Present only when there were any: on the send, batch, reply and forward responses, the list, the single-message GET and the message's message.sent event. When every recipient is refused, nothing is sent and the send fails instead.
USD cost of the send. 0 for scheduled or test-mode sends.
The sending provider's id for the message, which its delivery, bounce and complaint reports refer to; test-<message id> for a test-mode send. Present only on the list and the single-message GET, once the message has been handed off.
The References chain kept with the message: the references the send passed, or on a reply the ids of the earlier messages it answers. Present only on the single-message GET, when there is one.
The metadata the send passed; a scheduled send refused when it came due also carries rejected_reason and rejected_at. Present only on the single-message GET, when there is any.
When the message was handed off for sending: at once for an immediate send, when it came due for a scheduled one. Present only on the list and the single-message GET, once that has happened.
When delivery was confirmed; with several recipients, the time of the latest report. Present only on the list and the single-message GET, once a delivery is confirmed.
The time a scheduled send was set for. On send, batch and reply responses it is present only when that time was in the future; the list and the single-message GET keep it after the message has gone out or been canceled.
When the scheduled send was canceled. Present only on the list and the single-message GET, for a canceled message.
When a bounce was last reported for the message; a soft bounce, which marks it delayed, does not set it. Present only on the single-message GET.
When a recipient's complaint about the message was last reported. Present only on the single-message GET.
Source message id (forward responses only).
True for a message sent with a test key (mk_test_…): nothing was transmitted and nothing was billed.
When the message was created; for a scheduled send, when it was scheduled, not when it went out.
Changes
No recorded changes to this operation across all 1 revision of this API.