پیغامات API
Send a message on any connected channel and follow its delivery status.
POST/v1/messages/send
Queue one message to one recipient. Needs a Read & write key. The recipient is matched to an existing contact by email, phone or Telegram ID, and created as a new contact if there is none.
channel — WHATSAPP, SMS, EMAIL or TELEGRAM. Required.
to — phone number in international format (WhatsApp, SMS), email address (EMAIL) or Telegram ID. Required.
content — the message text. For EMAIL this is the HTML body. Required.
subject — EMAIL only, up to 255 characters. Defaults to “Message” when omitted. Ignored on other channels.
curl -X POST https://beecastly.com/api/v1/messages/send \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"channel": "EMAIL",
"to": "[email protected]",
"subject": "Your order has shipped",
"content": "<p>Hi Jane, your order is on its way.</p>"
}'
// 202 Accepted
{
"success": true,
"data": { "messageId": "cmg8x2k1…", "status": "queued" }
}WhatsApp sends through the number connected to your workspace. Outside WhatsApp's 24-hour customer-service window, Meta only delivers approved templates, so a free-text message to someone who has not written to you recently can fail — check its status.
GET/v1/messages/:id
Delivery status of a message you sent. Any key.
curl https://beecastly.com/api/v1/messages/cmg8x2k1… \
-H "x-api-key: YOUR_API_KEY"
{
"success": true,
"data": {
"id": "cmg8x2k1…",
"channel": "EMAIL",
"content": "<p>Hi Jane, your order is on its way.</p>",
"status": "SENT",
"sentAt": "2026-10-05T10:00:03.000Z",
"deliveredAt": null,
"failedAt": null,
"errorMessage": null,
"createdAt": "2026-10-05T10:00:00.000Z"
}
}status moves from PENDING to SENT, then DELIVERED / READ where the channel reports it, or FAILED with errorMessage set. Unknown id, or one from another workspace: 404.
Errors
400— a required field is missing orchannelis not one of the four.403 API_KEY_PERMISSION— the key is read-only.429— per-minute or daily limit. See Authentication.