Send a text reply
Reply to a customer with a plain text message.
Send a text message to a customer who has written to you in the last 24 hours.
Before you start
The customer's app user ID (
<APP_USER_ID>), from themessage:appUserwebhook event. See Reply to a customer.
Send the reply
POST /org/<ORG_ID>/whatsapp/appuser/<APP_USER_ID>/reply
Field
Required
What to put
text
Yes
The text of the message.
type
No
Leave it out, or set it to "text".
curl -X POST "https://channel360.co.za/v1.1/org/<ORG_ID>/whatsapp/appuser/<APP_USER_ID>/reply" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"text": "Hello World"
}'const response = await fetch(
"https://channel360.co.za/v1.1/org/<ORG_ID>/whatsapp/appuser/<APP_USER_ID>/reply",
{
method: "POST",
headers: {
Authorization: "Bearer <API_KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({ text: "Hello World" })
}
);
console.log(await response.json());import requests
response = requests.post(
"https://channel360.co.za/v1.1/org/<ORG_ID>/whatsapp/appuser/<APP_USER_ID>/reply",
headers={
"Authorization": "Bearer <API_KEY>",
"Content-Type": "application/json",
},
json={"text": "Hello World"},
)
print(response.json())Check it worked
The API returns 201 with the message that was sent:
{ "messages": [ { "type": "text", "text": "Hello World" } ] }The real response includes more fields on the message, such as its _id.
If it fails, see the error table on Reply to a customer.
Next
Send a media replyLast updated
Was this helpful?