Elora Logo

Home

Introduction

Errors

WhatsApp

Send Message

Send Template

Incoming Messages

Incoming Notifications

Post/v1/whatsapp/messages

Send Message

Start sending whatsapp messages through the Elora messaging API. You can send using plain text. To get the sender's mobile number after completing onboarding, navigate to the dashboard and select:WhatsApp Onboarding → Onboarding Status → Phone Number

Body Parameters

FromstringRequired

Sender mobile number. This is the business mobile number. Starts with mandatory +, then 7 to 15 digits. eg '+2547xxxxxxxx'.

TostringRequired

Recipient mobile number. **REQUIRED (Either/Or):** Must be supplied if 'ToUserId' is omitted. This is the customer mobile number. Starts with mandatory +, then 7 to 15 digits. eg '+2547xxxxxxxx'.

ToUserIdstringRequired

Recipient user id. **REQUIRED (Either/Or):** Must be supplied if 'To' is omitted. This is the customer {user id} that is a unique user identifier that can be used to message a WhatsApp user when you don’t know their mobile number. It is prefixed with the user’s ISO 3166 alpha-2⁠ two-letter country code and a period, followed by up to 128 alphanumeric characters eg 'KE.98103xxxxxxxxxx'.

BodystringRequired

The plain text version of the message. Min 1. Max 1024.

Success Acknowledgement

The Elora messaging API will acknowledge the request by returning the following HTTP status code:

202
Accepted

WhatsApp Messaging Rules

  • Inbound messages open a 24-hour service window.
  • Inside the window: Send any message (text, media, etc.).
  • Outside the window: Only template messages are allowed.
Request Example
cURL

curl -X POST "https://api.eloratechnology.com/v1/whatsapp/messages" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  --data-urlencode "From=+2547xxx" \
  --data-urlencode "To=+2547xxx" \
  --data-urlencode "Body=hello world"
Response
json
{
  "messageId": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
}