For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
contact@agentmail.ccDiscord
DocumentationAPI ReferenceKnowledge BaseChangelog
DocumentationAPI ReferenceKnowledge BaseChangelog
  • API Reference
      • GETList Inboxes
      • GETGet Inbox
      • POSTCreate Inbox
      • PATCHUpdate Inbox
      • DELDelete Inbox
        • GETList Messages
        • GETGet Message
        • POSTBatch Get Messages
        • GETGet Attachment
        • GETGet Raw Message
        • PATCHUpdate Message
        • DELDelete Message
        • POSTSend Message
        • POSTReply To Message
        • POSTReply All Message
        • POSTForward Message
LogoLogo
contact@agentmail.ccDiscord
API ReferenceInboxesMessages

Get Raw Message

GET
/v0/inboxes/:inbox_id/messages/:message_id/raw
GET
/v0/inboxes/:inbox_id/messages/:message_id/raw
1from agentmail import AgentMail
2
3client = AgentMail(
4 api_key="YOUR_TOKEN_HERE",
5)
6
7client.inboxes.messages.get_raw(
8 inbox_id="inbox_id",
9 message_id="message_id",
10)
1{
2 "message_id": "message_id",
3 "size": 1,
4 "download_url": "download_url",
5 "expires_at": "2024-01-15T09:30:00Z"
6}
**CLI:** ```bash agentmail inboxes:messages get-raw --inbox-id <inbox_id> --message-id <message_id> ```
Was this page helpful?
Previous

Update Message

Next
Built with

CLI:

$agentmail inboxes:messages get-raw --inbox-id <inbox_id> --message-id <message_id>

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

inbox_idstringRequired
The ID of the inbox.
message_idstringRequired
ID of message.

Response

This endpoint returns an object.
message_idstring
ID of the message.
sizeinteger
Size of the raw message in bytes.
download_urlstring

S3 presigned URL to download the raw message. Expires at expires_at.

expires_atdatetime
Time at which the download URL expires.

Errors

404
Not Found Error