Appearance
Send text
Sends a text message from the channel's WhatsApp number to a person or a group.
POST/api/user/whatsapp-qr/channels/{channel}/send/text
Required scope:
whatsapp-qr:sendPath parameters
integer
Request body (JSON)
curl -X POST "https://loopx-console.test/api/user/whatsapp-qr/channels/105/send/text" \
-H "Authorization: Bearer $TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"chat_id":"201066278084","text":"Hi Mahmoud, your order is ready for pickup."}'Example response
{
"status": true,
"code": 200,
"validation": [],
"message": "Message Sent",
"data": {
"key": {
"remoteJid": "201066278084@s.whatsapp.net",
"fromMe": true,
"id": "3EB0C431D5A2F1B7E9A4"
},
"message": {
"extendedTextMessage": {
"text": "Hi Mahmoud, your order is ready for pickup."
}
},
"messageTimestamp": "1791204800",
"status": "PENDING"
}
}Request body
| Field | Type | Required | Description |
|---|---|---|---|
chat_id | string | yes | Phone number with country code, a chat id (…@c.us, …@lid) or a group id (…@g.us) |
text | string | yes | Message text, up to 10,000 characters |
Send to a group
Use the group's id from List groups:
json
{ "chat_id": "120363025988123456@g.us", "text": "Morning team — 14 new leads today." }Response
data contains the sent WhatsApp message.
| Field | Type | Description |
|---|---|---|
key.id | string | WhatsApp message id |
key.remoteJid | string | The chat the message went to |
status | string | Delivery status at send time, usually PENDING |
A bare phone number is sent to …@c.us.
Sends count toward your account's rate limit of 30 requests per minute.