Reply to a customer
Answer a customer who messaged you with text, media, buttons or lists, within 24 hours.
When a customer writes to you, you can answer with free-form messages — text, images, files, buttons, lists — for 24 hours.
Before you start
A webhook that receives the
message:appUserevent — see Receive delivery updates.An API key and your Organisation API URL — see Authentication.
Steps
1. Receive the customer's message
When the customer writes to you, your webhook receives a message:appUser event.
2. Read the app user ID
Take appUser._id from that event. This is Channel360's ID for the customer, and it is where the reply is sent. In the examples below it is <APP_USER_ID>.
3. Send the reply
POST /org/<ORG_ID>/whatsapp/appuser/<APP_USER_ID>/reply
https://channel360.co.za/v1.1/org/<ORG_ID>/whatsapp/appuser/<APP_USER_ID>/replyHeaders:
The type field picks the kind of message. Leave it out for text.
type
Also send
Result
Page
file also exists for older integrations. Use document instead.
Check it worked
The API returns
201with{ "messages": [ { … } ] }, containing the message that was sent.Your webhook receives
message:delivery:channel, thenmessage:delivery:user. Replies use thesemessage:*events, not thenotification:*ones.
What can go wrong
400 A customer must reply to the conversation first.
This customer has never messaged you.
Send a template notification instead.
400 The 24-hour chat window has expired
Their last message is more than 24 hours old.
Send a template notification, and reply when they answer.
400 about an unsupported type
type is not one of the values above.
Use a value from the table.
400 with a WhatsApp error message and code
WhatsApp rejected the message, for example a bad media link or a malformed interactive object.
Read the message. Check the link is public and the object matches WhatsApp's format.
429 Rate limit hit (meta code …)
WhatsApp is limiting how fast your number can send. Nothing was sent.
Wait, then send again. There is no Retry-After header.
A 400 saying an integration is "not set up" means WhatsApp is not connected for your organisation. Contact Channel360 support.
Next
Send a text replyMatch replies to your recordsLast updated
Was this helpful?