Messages
Send email from your mailboxes, list messages, reply to conversations, and retrieve individual messages by ID.
Last updated
The message object
{
"object": "message",
"id": "msg_abc123",
"mailbox_id": "mbx_abc123",
"thread_id": "thr_abc123",
"subject": "Hello from shipmail",
"from_address": "hello@example.com",
"to_addresses": [{"address": "user@example.com"}],
"cc_addresses": null,
"bcc_addresses": null,
"attachments": null,
"source": "api",
"status": "queued",
"scheduled_at": null,
"created_at": "2025-01-15T12:00:00.000Z",
"updated_at": "2025-01-15T12:00:00.000Z"
}Message statuses
Message sources
Send a message
POST /v1/messagesScope: messages:write. Rate limit tier: send (100 / min).
For most sends, set from to the mailbox email address. Shipmail resolves it to the mailbox ID automatically. Use mailbox_id when you already have the ID or when an endpoint specifically requires a mailbox ID.
Request body
* At least one of html or text is required. Total recipients (to + cc + bcc) must not exceed 50.
** One of from or mailbox_id is required.
Recipient format
Recipients can be an object or a string:
// Object format
{"address": "user@example.com", "name": "Jane Doe"}
// String formats
"user@example.com"
"Jane Doe <user@example.com>"Example
curl -X POST https://shipmail.to/api/v1/messages \
-H "Authorization: Bearer sm_live_..." \
-H "Content-Type: application/json" \
-d '{
"from": "hello@example.com",
"to": ["user@example.com"],
"subject": "Hello from shipmail",
"text": "This is a test email."
}'Returns the message object with status 201.
Find a mailbox ID
If an endpoint requires mailbox_id, list your mailboxes and use the id field from the mailbox you want.
curl https://shipmail.to/api/v1/mailboxes \
-H "Authorization: Bearer sm_live_..."
{
"data": [
{
"object": "mailbox",
"id": "mbx_abc123",
"address": "hello@example.com"
}
]
}Example with attachment
curl -X POST https://shipmail.to/api/v1/messages \
-H "Authorization: Bearer sm_live_..." \
-H "Content-Type: application/json" \
-d '{
"from": "billing@yourcompany.com",
"to": [{ "address": "client@example.com" }],
"subject": "Invoice #1234",
"html": "<p>Please find your invoice attached.</p>",
"attachments": [
{
"filename": "invoice-1234.pdf",
"content": "JVBERi0xLjQK...",
"content_type": "application/pdf"
}
]
}'List messages
GET /v1/messages?mailbox_id=mbx_abc123Scope: messages:read. Rate limit tier: read.
The mailbox_id query parameter is required for listing messages. Get it from the id field returned by GET /v1/mailboxes. Supports cursor and limit pagination parameters. Returns a flat list of messages (not grouped by thread).
Retrieve a message
GET /v1/messages/:idScope: messages:read. Returns the message object or 404.
Reply to a message
POST /v1/messages/:id/replyScope: messages:write. Rate limit tier: send. Looks up the message's thread and sends a reply using the same mailbox.
Uses the same request body as POST /v1/threads/:id/reply. Returns the message object with status 201. Include scheduled_at to send the reply later.