Messages API

API Documentation

Send messages, check status, and retrieve delivery events via REST.

The Messages API allows you to send transactional and marketing emails via REST. Messages are queued immediately and delivered via your dedicated IP pool.

Send a Message

POST/v1/messages

Request body

FieldTypeRequiredDescription
fromstringrequiredSender email. Use format: Name <email@domain.com> or bare email@domain.com
toarrayrequiredArray of recipient email addresses. Max 1,000 per request.
subjectstringrequiredMessage subject line
htmlstringoptionalHTML message body. At least one of html or text is required.
textstringoptionalPlain text fallback body
ccarrayoptionalCC recipients
reply_tostringoptionalReply-To address
headersobjectoptionalCustom headers as key-value pairs
ip_poolstringoptionalSpecific IP pool to use. Defaults to your account's default pool.
track_opensbooleanoptionalEnable open tracking (default: true)
track_clicksbooleanoptionalEnable click tracking (default: true)
scheduled_atstringoptionalISO 8601 datetime to schedule delivery. Max 72 hours in advance.
tagsarrayoptionalArray of string tags for reporting segmentation (max 3)

Example

curl -X POST https://api.cloudserverforemail.com/v1/messages \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "from": "Acme Corp <hello@acme.com>", "to": ["customer@example.com"], "subject": "Your order has shipped", "html": "<p>Your order #12345 has shipped.</p>", "text": "Your order #12345 has shipped.", "ip_pool": "transactional", "tags": ["transactional", "shipping"] }'

Response

{"id":"msg_01JQRT...","status":"queued","queued_at":"2026-04-08T12:00:00Z"}

Get Message Status

GET/v1/messages/{id}
curl https://api.cloudserverforemail.com/v1/messages/msg_01JQRT \ -H "Authorization: Bearer YOUR_API_KEY"
{ "id": "msg_01JQRT...", "status": "delivered", "from": "hello@acme.com", "to": "customer@example.com", "subject": "Your order has shipped", "queued_at": "2026-04-08T12:00:00Z", "delivered_at": "2026-04-08T12:00:01Z", "opens": 1, "clicks": 0 }