Sent messages#
This section describes the general format of incoming notifications with the outgoingMessageReceived and outgoingAPIMessageReceived types. A description of all incoming notification types is presented in the Incoming notification types section.
The system supports receiving notifications about outgoing messages of the following kinds:
- Sent text message
- Message sent from the phone
- Message sent through the API
- Sent message with an image
- Sent message with a video
- Sent message with a document
- Sent message with audio
- Sent message with a sticker
Fields of the outgoingMessageReceived notification#
| Parameter | Type | Description |
|---|---|---|
typeWebhook | string | Incoming notification type. For a notification of this type the field takes the value outgoingMessageReceived |
instanceData | object | Data about the instance |
timestamp | integer | Time the event occurred in UNIX format |
idMessage | string | Identifier of the sent message |
senderData | object | Data about the sender of the message or file |
messageData | object | Data about the sent message or file |
Fields of the instanceData object
| Parameter | Type | Description |
|---|---|---|
idInstance | integer | Instance identifier. A uint64 value, 10 digits |
wid | string | Account identifier |
typeInstance | string | Messenger type for the instance - telegram for Telegram- whatsapp - for WhatsApp- v3 - for MAX |
Fields of the senderData object
| Parameter | Type | Description |
|---|---|---|
chatId | string | Chat identifier the message or file was received in |
chatType | string | Chat type. Possible values: "user", "group", "supergroup", "channel","bot" |
sender | string | Identifier of the sender of the message or file |
chatName | string | Chat name |
senderName | string | Sender name |
senderType | string | Sender type. Possible values: "user", "group", "supergroup", "channel", "bot" |
senderContactName | string | Sender name from the phone book contact list |
senderPhoneNumber | integer | Sender's phone number If the phone number is hidden, or the contact is a group, it takes the value 0 |
Fields of the messageData object#
The messageData object has different fields depending on the type of the sent message:
Notification body example#
Example of a notification body for a sent message#
{
"typeWebhook": "outgoingMessageReceived",
"instanceData": {
"idInstance": 4100000000,
"wid": "79876543210@c.us",
"typeInstance": "telegram"
},
"timestamp": 1763115112,
"idMessage": "1763115112345",
"senderData": {
"chatId": "10000000",
"chatType": "user",
"sender": "20000000",
"chatName": "Ivan Tsarevich",
"senderName": "Vasilisa the Wise",
"senderType": "user",
"senderContactName": "Vasilisa the Wise",
"senderPhoneNumber": 79876543210
},
"messageData": {
// Depending on typeMessage = textMessage || imageMessage || videoMessage || documentMessage || audioMessage || locationMessage || pollMessage
}
}
Example of a notification body for a message sent to a group chat#
{
"typeWebhook": "outgoingMessageReceived",
"instanceData": {
"idInstance": 4100000000,
"wid": "79876543210@c.us",
"typeInstance": "telegram"
},
"timestamp": 1763115112,
"idMessage": "1763468266381",
"senderData": {
"chatId": "-10000000000000",
"chatType": "channel",
"sender": "10000000",
"chatName": "Faraway Kingdom",
"senderName": "Vasilisa",
"senderType": "user",
"senderContactName": "",
"senderPhoneNumber": 79876543210
},
"messageData": {
// Depending on typeMessage = textMessage || imageMessage || videoMessage || documentMessage || audioMessage || locationMessage || pollMessage
}
}