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

POST/api/v1/messages/sendSend a WhatsApp text

Permission: write.

ParameterTypeRequiredDescription
tostringrequiredRecipient with country code, for example +201012345678. Non-digits are stripped.
messagestringrequiredThe 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

json
{
  "success": true,
  "data": {
    "chatId": 42,
    "messageId": 9876,
    "to": "201012345678",
    "status": "sent"
  }
}
FieldTypeRequiredDescription
chatIdnumberoptionalThe Inboxi conversation the message was added to. Use it with the Conversations endpoints.
messageIdnumber | stringoptionalId of the stored message.
tostringoptionalThe normalized recipient (digits only).
statusstringoptionalAlways sent: the message was handed to WhatsApp. Delivery and read receipts arrive later as webhooks.

Errors

Statuserror
400Required fields: to (phone number), message (text)
400No active WhatsApp connection found for this organization
500Sending 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.