cherami.
API referenceReceived messages

Download raw MIME

GET /v1/messages/{message_id}/raw

Read as Markdown ↗

GET /v1/messages/{message_id}/raw

Requires an API key: Authorization: Bearer YOUR_CREDENTIAL.

Returns the message exactly as received, as message/rfc822 bytes. It works in every processing state, including failed.

Parameters

ParameterLocationRequiredTypeMeaning
message_idpathYesstringCherami resource ID returned by the API.

curl example

Supply CHERAMI_API_KEY privately.

curl --silent --show-error --dump-header response-headers.txt --request GET \
  "https://cherami.to/v1/messages/MESSAGE_ID/raw" \
  --header "Authorization: Bearer $CHERAMI_API_KEY" \
  --output download.bin

Responses

HTTP 200

The original bytes, as a download.

  • X-Request-ID: Identifies this request; include it when reporting a problem.
  • Content-Disposition: Attachment disposition with a safely encoded suggested filename.
  • Content-Length: Original byte count.
  • Cache-Control: Includes no-store.
  • X-Content-Type-Options: "nosniff"
  • Content-Security-Policy: Sandbox with default-src 'none'.

Content type: message/rfc822.

Binary response body, not a JSON string. Save the original bytes.

HTTP 401

unauthorized: Send a valid API key as Authorization: Bearer <key>. If the key stopped working, get a new one through recovery.

  • X-Request-ID: Identifies this request; include it when reporting a problem.
  • WWW-Authenticate: "Bearer"

Content type: application/json.

Error

HTTP 404

not_found: The resource does not exist or does not belong to this account. A reply or forward source must also be in the sending inbox.

  • X-Request-ID: Identifies this request; include it when reporting a problem.

Content type: application/json.

Error

HTTP 500

internal_error: The operation failed. Retry a read; after a write the change may have happened, so recover as retry by operation describes.

  • X-Request-ID: Identifies this request; include it when reporting a problem.

Content type: application/json.

Error

HTTP 503

content_unavailable: Stored content could not be read. Retry later.

  • X-Request-ID: Identifies this request; include it when reporting a problem.

Content type: application/json.

Error

Schema: Error

FieldRequiredTypeMeaning and constraints
errorYesobject

error fields

FieldRequiredTypeMeaning and constraints
codeYesstringCode to handle. Handle a code you don't recognize by its HTTP status.
messageYesstringExplanation of this case; its wording can change.

Errors, limits and pagination · Download OpenAPI 3.1

On this page