Skip to main content

Overview

First, what you need to understand about messages is that they can be sent to a contact, a group, or a broadcast list. In the “contacts” topic we’ll come back to this, but it’s important that you also know that for WhatsApp everything is a chat, whether it’s a contact, group, or broadcast list. To send any message, it needs the chat ID, which are:
  • For contacts, it’s the phone number itself;
  • For groups, it’s the concatenation of the group founder’s number with a timestamp;
  • For broadcast lists, it’s the concatenation of the string ‘broadcast’ with the timestamp.
These IDs are all returned by the get/chats method, which you’ll learn about a little further ahead.
Speaking of IDs, we strongly recommend that you store in your application the messageId that our response will return, because if you need to reply to, mark, or even delete a message, you will need to provide the messageId as an attribute in the method.

Standard response

Every successfully sent message returns the following attributes:
{
  "zaapId": "3999984263738042930CD6ECDE9VDWSA",
  "messageId": "D241XXXX732339502B68",
  "id": "D241XXXX732339502B68"
}

Text formatting

You can format your texts by sending formatting characters to make your message more elegant.
FormatSyntaxExample
Bold*text*text
Italic_text_text
Strikethrough~text~text
Monospace```text```text