Get Message
curl -s "https://api.yoagent.dev/v0/messages/msg_01je56wqswfmn9pgbc1wq8tjgq" \ -H "Authorization: Bearer $YOAGENT_KEY"const response = await fetch("https://api.yoagent.dev/v0/messages/msg_01je56wqswfmn9pgbc1wq8tjgq", { headers: { Authorization: `Bearer ${process.env.YOAGENT_KEY}`, },});if (!response.ok) throw new Error(await response.text());const data = await response.json();import os
import requests
response = requests.get( "https://api.yoagent.dev/v0/messages/msg_01je56wqswfmn9pgbc1wq8tjgq", headers={"Authorization": f"Bearer {os.environ['YOAGENT_KEY']}"}, timeout=60,)response.raise_for_status()data = response.json()Get a message with bodies, links, codes and attachments.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”Successful Response
A full message: bodies, links, codes, attachments.
object
Goes up by one on every change: of two copies, the one with the higher version is the newer.
A name and address from a header.
object
A name and address from a header.
object
A name and address from a header.
object
Bcc of a message the inbox sent (only the sender’s copy knows them); empty for mail that came in
A name and address from a header.
object
A name and address from a header.
object
A link found in a message when it arrived: its URL, its text and what it is for.
object
What a link is for, guessed from its text and URL.
A one-time code found in a message when it arrived, with the text around it.
object
An attachment; download_url gives its bytes (REST, same API key).
The fields this answer cut for size (empty: nothing was cut). The REST API never cuts (always empty); the mail-MCP’s get_message cuts a body over its length limit (read it whole over REST). Fields an answer leaves out by choice (get_message’s html, extracted_html and headers without include_html) are not listed.
Example
{ "version": 1, "message_id": "msg_01je56wqswfmn9pgbc1wq8tjgq", "project_id": "prj_01je56wqswfmn9pgbc1wq8tjgq", "inbox_id": "inb_01je56wqswfmn9pgbc1wq8tjgq", "thread_id": "thr_01je56wqswfmn9pgbc1wq8tjgq", "envelope_to": "test@k7m2xq4p.yoagent.email", "envelope_from": "bounce@example.com", "plus_tag": null, "from": [ { "name": "Example App", "address": "noreply@example.com" } ], "to": [ { "name": "", "address": "test@k7m2xq4p.yoagent.email" } ], "subject": "Your sign-in code", "preview": "Your sign-in code is 482913.", "labels": [ "received", "unread" ], "size": 66000, "received_at": "2026-12-01T12:00:00Z", "cc": [], "bcc": [], "reply_to": [], "message_id_header": "<4821.1764590400@example.com>", "in_reply_to": null, "references": [], "text": "Your sign-in code is 482913.", "html": "<p>Your sign-in code is <b>482913</b>. Or <a href=\"https://example.com/sign-in?code=482913\">Sign in</a>.</p>", "extracted_text": "Your sign-in code is 482913.", "extracted_html": "<p>Your sign-in code is <b>482913</b>. Or <a href=\"https://example.com/sign-in?code=482913\">Sign in</a>.</p>", "headers": [ [ "Subject", "Your sign-in code" ], [ "From", "Example App <noreply@example.com>" ] ], "links": [ { "url": "https://example.com/sign-in?code=482913", "text": "Sign in", "kind": "verify" } ], "codes": [ { "code": "482913", "context": "Your sign-in code is 482913." } ], "attachments": [ { "attachment_id": "att_01je56wqswfmn9pgbc1wq8tjgq", "filename": "invoice.pdf", "content_type": "application/pdf", "size": 48213, "inline": false, "download_url": "https://api.yoagent.dev/v0/messages/msg_01je56wqswfmn9pgbc1wq8tjgq/attachments/att_01je56wqswfmn9pgbc1wq8tjgq" } ], "truncated": []}default
Section titled “default”An error (400, 401, 403, 404, 405, 409, 413, 429, 500, 503), in the one shape every call answers: Errors.