For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

The 24-hour rule. You can only reply after the customer has messaged you, and only within 24 hours of their latest message. Outside that window, send a template notification instead. When the customer answers it, the window opens again.

Before you start

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>/reply

Headers:

The type field picks the kind of message. Leave it out for text.

type

Also send

Result

Page

(none) or text

text

A text message

image

mediaUrl, optional text (caption)

An image

video

mediaUrl, optional text, filename

A video

audio

mediaUrl, optional filename

An audio clip

document

mediaUrl, optional filename, text

A downloadable file

interactive

interactive (object)

A list, buttons, or a WhatsApp Flow

file also exists for older integrations. Use document instead.

Check it worked

  • The API returns 201 with { "messages": [ { … } ] }, containing the message that was sent.

  • Your webhook receives message:delivery:channel, then message:delivery:user. Replies use these message:* events, not the notification:* ones.

What can go wrong

What you see
Why
What to do

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.

401 / 403

Wrong API key or organisation.

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 records

Last updated

Was this helpful?