Guides
Channel Selection
How to choose which WhatsApp number sends each API message when an account has multiple Cloud and Device channels.
Always be explicit in production
If you omit channel selectors on a multi-number account, Washeej picks a default. That may not be the number your customer expects.
1. List channels
cURL
curl -H "client-id: YOUR_CLIENT_ID" \
-H "client-secret: YOUR_CLIENT_SECRET" \
https://app.washeej.com/v1/devices
Each item includes id (use as whatsapp_account_id), phone_number, channel_type (cloud / device / coexistence), and connection status.
2. Selection priority
whatsapp_account_id— preferred; exact channel ID fromGET /devices.from_number— digits only (country code + national number, no+/ spaces). Matched after normalizing digits.- Default — connected Cloud channel when the endpoint prefers Cloud (templates), otherwise the account default / first available channel.
3. Examples
Send text on a specific Cloud number
curl -X POST "https://app.washeej.com/v1/messages" \
-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,
"message": "Hello from the sales line"
}'
Same send using from_number
curl -X POST "https://app.washeej.com/v1/messages" \
-H "client-id: YOUR_CLIENT_ID" \
-H "client-secret: YOUR_CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{
"mobile_code": "966",
"mobile": "500000000",
"from_number": "966920000000",
"message": "Hello from the sales line"
}'
4. Capability matrix
| Capability | Cloud / Coexistence | Device / QR |
|---|---|---|
| Free-form session messages | Yes (inside 24h) | Yes |
| Meta templates | Yes | No |
| Interactive lists / CTA URL | Yes | No |
| Catalog / product cards | Yes | No |
| Hosted Meta onboarding | Yes | — |
Sending a template on a Device channel returns capability_error.
5. Defaults
Mark a channel as default with POST /devices/{id}/default. Still pass whatsapp_account_id explicitly in multi-brand or multi-country setups.