Upload .eml
Capture a raw RFC 5322 `.eml` message.
Capture a raw RFC 5322 .eml message.
Scope: email_testing.messages.write
Request Body
Send the raw .eml file bytes as the request body. Set Content-Type: message/rfc822. The body must not be empty.
Query Parameters
mailbox_idstringoptionalOptional. The ID of the test inbox to store the uploaded email in.
Sample Request
Request
curl -X POST "https://api.maileroo.com/v1/email-testing/messages/upload?mailbox_id=35a3cb89-ea59-4ea3-8edc-a5c5f7bf0bda" \
-H "Authorization: Bearer roo_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: message/rfc822" \
--data-binary @message.emlSample Response
The response is wrapped in a data object.
Response
{
"data": {
"id": "d5949378-3069-4d8f-a8f3-6e5edf5d6060",
"source": "upload",
"subject": "Uploaded message",
"analysis_status": "pending",
"preview_status": "pending",
"size_bytes": 1842,
"received_at": "2025-01-01T12:00:00Z"
}
}Errors
400 Bad Request— the upload is empty or the optional mailbox ID is invalid.413 Payload Too Large— the raw message exceeds the account or service size limit.