direction and the presence of user differ. These are account-level webhooks, delivered to the endpoints you register under Account → Webhooks. See the overview.
All examples show the full request body, including the envelope. Fields with empty values are omitted from payloads: they are never sent as null. Fields shown in bold are always present. A bold field nested inside an optional object is always present whenever that object is. Everything else is optional.
message.sent
Fires when a message is sent from one of your CloudTalk numbers. The payload carries the complete message (the text, both phone numbers, any media attachments), the contact it went to when one matches, and the user who sent it. Use it to log outbound messages in your CRM or helpdesk automatically, or to trigger follow-up workflows the moment a message goes out.Example
message.received
Fires when a message arrives on one of your CloudTalk numbers. Use it to route inbound messages to your helpdesk or CRM the moment they arrive, or to trigger auto-replies and notifications. The payload has the same shape asmessage.sent, with two differences: direction is inbound, and there is no user; inbound messages have no sending user.
Example
channel: "whatsapp". Everything else is identical: external_number and internal_number are the two phone numbers, media carries any attachments, and contact and user resolve the same way.
A WhatsApp number that is not enabled for WhatsApp on your account is reported with
channel: "sms". If you see WhatsApp traffic labelled sms, check that WhatsApp is switched on for both the account and the number under Account → Settings → WhatsApp.Delivery status updates (delivered / failed) are not covered by these events:
message.sent means CloudTalk sent the message to the carrier, not that the recipient’s phone received it.