GET · Bearer

GET /api/v1/inboxes/:id/messages/:msgId/raw

Summary

Download the message as message/rfc822. Content-Disposition is attachment with filename {msgId}.eml. Quotes, CR, LF, other control characters, and path separators are removed from that filename. A non-ASCII name also sets filename* (RFC 5987 UTF-8). The response sets X-Content-Type-Options: nosniff, Content-Security-Policy: default-src 'none'; sandbox; frame-ancestors 'none', X-Frame-Options: DENY, and Referrer-Policy: no-referrer. Cache-Control is private. There is no Cross-Origin-Resource-Policy header. ?download=1 also forces attachment. Inbound mail returns the raw body stored at receive time. When that body is 200,000 characters or longer Cooper stores only the first 200,000 characters and the response sets x-cooper-raw-truncated: 1. Inbound mail with no stored raw returns 404 raw_not_available. Outbound mail is rebuilt from Date, From, To, Cc, Subject (RFC 2047 when the subject is not ASCII), Message-ID, In-Reply-To, References, text, html, and base64 attachments, and the response sets X-Cooper-Reconstructed: 1. A held message returns HTTP 409 message_held until release. :id accepts inbox id, username, or email. Another account's message is 404.

Request

GET /api/v1/inboxes/inb_example/messages/msg_example/raw

Response

The OpenAPI document does not declare a JSON response schema for this call. The summary is the contract.

Errors

  • HTTP 404 raw_not_available
  • HTTP 409 message_held

Idempotency

This route does not document Idempotency-Key or client_id.