Create a message
Permission
messages:writeRate limit writesIdempotent with Idempotency-Keychannel email (default) needs subject and body_html; preheader is optional. channel sms needs body_text (up to 1600 characters); subject, preheader and body_html are not stored for a text. Bodies may use merge fields as {{key}} or {{key|default}} (see GET /v1/merge-fields). The message is saved published, ready for broadcasts and automation steps. A name already taken in the project gets a numeric suffix ("Welcome email 2").
Authorization
ESTAGE-API-KeystringheaderrequiredA project key, est_live_…, from Settings → API keys. Call from server code only.
Body
application/jsonnamestringrequired≤ 255 charschannelstringdefault "email"One of email, sms
subjectstringnullable≤ 255 charsRequired unless channel is sms.
preheaderstringnullable≤ 255 charsbody_htmlstringnullableRequired unless channel is sms.
body_textstringnullable≤ 1600 charsRequired when channel is sms.
Headers
Idempotency-Keystring≤ 255 charsAny unique string per attempt. A retry with the same key gets the first answer back instead of doing the work twice.
RequestcURL
curl --request POST \ --url 'https://api.estage.com/v1/messages' \ --header 'ESTAGE-API-Key: est_live_your-api-key' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: your-unique-key' \ --data '{ "name": "Welcome email", "channel": "email", "subject": "Welcome to Studio Nova, {{first_name|there}}", "preheader": "Your first steps inside", "body_html": "<p>Hi {{first_name|there}},</p><p>Thanks for joining Studio Nova.</p><p><a href=\"{{unsubscribe_url}}\">Unsubscribe</a></p>" }'
Created
{
"data": {
"id": 311,
"name": "Welcome email",
"channel": "email",
"type": null,
"status": "public",
"subject": "Welcome to Studio Nova, {{first_name|there}}",
"preheader": "Your first steps inside",
"created_at": "2026-11-02T10:15:00Z",
"updated_at": "2026-11-10T08:40:12Z",
"body_html": "<p>Hi {{first_name|there}},</p><p>Thanks for joining Studio Nova.</p><p><a href=\"{{unsubscribe_url}}\">Unsubscribe</a></p>",
"body_text": null
}
}Example. Errors are
{ error: { code, message, details } }.