Legacy Cloud API
Messages
Send free-form Cloud session messages via POST /inbox/send-message
(text, media, location, interactive, commerce) inside the customer care window.
24-hour window
Outside the Cloud customer care window use
POST /inbox/send-template-message instead. Decision table: Session Window vs Templates.
POST
/inbox/send-message
Public
https://staging-mobile.washeej.com/external-api/inbox/send-message
Send a free-form Cloud session message (text, media, location, interactive, commerce).
| Parameter | Type | Required | Description |
|---|---|---|---|
mobile_code
|
string | required | Dial code without +. |
mobile
|
string | required | National number. |
message
|
string | optional | Text body or media caption (required unless media/interactive/location/product). |
whatsapp_account_id
|
integer | optional | Cloud account ID (preferred in multi-number accounts). |
from_number
|
string | optional | Alternative channel selector (digits only). |
image
|
file | optional | Image upload (multipart). |
document
|
file | optional | Document upload (multipart). |
video
|
file | optional | Video upload (multipart). |
audio
|
file | optional | Audio upload (multipart). |
latitude
|
number | optional | Location latitude (with longitude). |
longitude
|
number | optional | Location longitude (with latitude). |
name
|
string | optional | Optional location title. |
address
|
string | optional | Optional location address. |
cta_url_id
|
integer | optional | Dashboard CTA URL asset ID. |
interactive_list_id
|
integer | optional | Dashboard interactive list ID. |
product
|
json | optional | Commerce product payload. |
created_order_data
|
json | optional | Commerce order payload. |
cURL
curl -X POST https://staging-mobile.washeej.com/external-api/inbox/send-message \
-H "client-id: YOUR_CLIENT_ID" \
-H "client-secret: YOUR_CLIENT_SECRET" \
-H "Content-Type: multipart/form-data" \
-F "mobile_code=966" \
-F "mobile=500000000" \
-F "whatsapp_account_id=YOUR_CLOUD_ACCOUNT_ID" \
-F "message=Your invoice is attached" \
-F "document=@/path/to/INV-1001.pdf;type=application/pdf"
Notes
- Requires IP whitelist.
- Outside the 24h window use POST /inbox/send-template-message.
- Session media on Cloud External API: multipart file fields only. Session *_url fields are not implemented on this surface.
- For native PDF/image bubbles outside the session window use templates with header_media_url.
- CTA / lists / product require Cloud + open session.
- Prefer whatsapp_account_id or exact from_number (mismatched from_number returns sender_not_found).
Scenario — session PDF via URL
cURL
curl -X POST "https://staging-mobile.washeej.com/external-api/inbox/send-message" \
-H "client-id: YOUR_CLIENT_ID" \
-H "client-secret: YOUR_CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{
"mobile_code": "966",
"mobile": "500000000",
"whatsapp_account_id": YOUR_CLOUD_ACCOUNT_ID,
"document_url": "https://files.example.com/docs/INV-1001.pdf",
"filename": "INV-1001.pdf",
"message": "Your invoice is attached"
}'
Scenario — multipart upload
cURL
curl -X POST "https://staging-mobile.washeej.com/external-api/inbox/send-message" \
-H "client-id: YOUR_CLIENT_ID" \
-H "client-secret: YOUR_CLIENT_SECRET" \
-F "mobile_code=966" \
-F "mobile=500000000" \
-F "whatsapp_account_id=YOUR_CLOUD_ACCOUNT_ID" \
-F "message=Your invoice is attached" \
-F "document=@/path/to/INV-1001.pdf;type=application/pdf"
Scenario — CTA / interactive list
Create CTA URL / list assets in the dashboard, then send by ID (Cloud only, open session):
CTA URL
curl -X POST "https://staging-mobile.washeej.com/external-api/inbox/send-message" \
-H "client-id: YOUR_CLIENT_ID" \
-H "client-secret: YOUR_CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{
"mobile_code": "966",
"mobile": "500000000",
"whatsapp_account_id": YOUR_CLOUD_ACCOUNT_ID,
"cta_url_id": YOUR_CTA_ID
}'
Interactive list
curl -X POST "https://staging-mobile.washeej.com/external-api/inbox/send-message" \
-H "client-id: YOUR_CLIENT_ID" \
-H "client-secret: YOUR_CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{
"mobile_code": "966",
"mobile": "500000000",
"whatsapp_account_id": YOUR_CLOUD_ACCOUNT_ID,
"interactive_list_id": YOUR_LIST_ID
}'
Scenario — location
cURL
curl -X POST "https://staging-mobile.washeej.com/external-api/inbox/send-message" \
-H "client-id: YOUR_CLIENT_ID" \
-H "client-secret: YOUR_CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{
"mobile_code": "966",
"mobile": "500000000",
"whatsapp_account_id": YOUR_CLOUD_ACCOUNT_ID,
"latitude": 24.7136,
"longitude": 46.6753,
"name": "Riyadh Branch",
"address": "Olaya St"
}'
Channel selection
Prefer whatsapp_account_id; alternatively from_number (digits only). Details: Channel Selection.
Related guides
- Session Media
- Interactive Messages
- Session Window vs Templates
- Templates (legacy) — outside 24h / DOCUMENT PDF