WATI supports webhooks that can alert you on an incoming message via a callback URL.

Other functionalities like alert on outgoing message, status (eg DELIVERED/READ) on outgoing message are not currently available through WATI CRM plan. The complete official Whatsapp API/webhooks access is available through our API Gateway plan.

How to set the callback URL?

  1. Click on 'Webhooks' on the top navigation on WATI Dashboard
  1. Click on 'Add Webhook'
  1. Add the webhook URL and set the status as 'Enabled'
  1. Wait for a message on your WhatsApp number

  2. When a message is received, a callback happens on your webhook URL with the below payload

{
   "id":"5fa131d8450201778fd394a3",
   "created":"2020-11-03T10:32:56.6410622Z",
   "conversationId":"5fa12754450201778fd38d7f",
   "ticketId":"5fa12754450201778fd38d80",
   "text":"hello",
   "type":"text",
   "data":null,
   "timestamp":"1604399575",
   "owner":false,
   "eventType":"message",
   "statusString":"SENT",
   "avatarUrl":null,
   "assignedId":null,
   "operatorName":null,
   "operatorEmail": null,
   "waId":"919920842422",
   "senderName":"Bob"
}

Payload Structure

Name

Type

Nullable

Notes

id

String

No

Forward message id

created

String

No

Forward message created time (UTC time in unix format)

conversationId

String

No

WATI conversation ID

ticketId

String

No

WATI ticket ID

text

String

Yes

Message text

type

String

No

value type: image/text/document/location/voice/audio/button/video/sticker

data

String

Yes

Media path if message is media, null for text message

timestamp

Timestamp

No

message sent time (UTC time in unix format)

owner

Boolean

No

true = sent by WATI
false = incoming message

eventType

String

No

WATI message type, "message"

statusString

String

Yes

WATI message status

avatarUrl

String

Yes

WATI avatar URL

assignedId

String

Yes

WATI assigned ID

operatorName

String

Yes

WATI assigned Operator Name

operatorEmail

String

Yes

WATI assigned Operator Email

waId

String

No

WhatsApp ID: country code + phone number

senderName

String

No

original WhatsApp name of sender

Note:
If the webhook provided cannot process the request, the same message will be retried at a later time (up to 5 times). The message will not be sent after 5 attempts. The retry jobs (can contain multiple previously failed messages) run in 10 minute intervals.
If the webhook has more than 100 consecutive failed jobs, it will be considered Defective and you shall receive an email alert about this.