API Reference · Endpoints
Messages
Send a WhatsApp text message to any number through your connected WhatsApp Business account.
Send a plain WhatsApp text from your backend. The message leaves from your connected WhatsApp number, appears in the Inboxi inbox like any agent reply, and is added to the customer's conversation (Inboxi creates the conversation if it does not exist yet).
Send a message
/api/v1/messages/sendSend a WhatsApp textPermission: write.
| Parameter | Type | Required | Description |
|---|---|---|---|
to | string | required | Recipient with country code, for example +201012345678. Non-digits are stripped. |
message | string | required | The text to send. |
curl -X POST "https://inboxi.app/api/v1/messages/send" \
-H "X-API-Key: inx_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"to": "+201012345678",
"message": "Your appointment is confirmed for tomorrow at 3 PM"
}'Response
{
"success": true,
"data": {
"chatId": 42,
"messageId": 9876,
"to": "201012345678",
"status": "sent"
}
}| Field | Type | Required | Description |
|---|---|---|---|
chatId | number | optional | The Inboxi conversation the message was added to. Use it with the Conversations endpoints. |
messageId | number | string | optional | Id of the stored message. |
to | string | optional | The normalized recipient (digits only). |
status | string | optional | Always sent: the message was handed to WhatsApp. Delivery and read receipts arrive later as webhooks. |
Errors
| Status | error |
|---|---|
| 400 | Required fields: to (phone number), message (text) |
| 400 | No active WhatsApp connection found for this organization |
| 500 | Sending failed (the message explains why, for example an error returned by WhatsApp). |
The 24-hour window
WhatsApp only delivers free-form text within 24 hours of the customer's last message. To reach a customer outside that window, trigger an event (Inboxi falls back to its template automatically) or send an approved WhatsApp template.
Tracking delivery
Each send fires a message.sent webhook. Subscribe to message.delivered, message.read and message.failed to follow what happened next without polling; see Webhooks.