Sent message status#
An incoming notification of this type contains the status of a previously sent message: sent, read.
Instance settings
To receive incoming notifications about the statuses of sent messages, you need to enable the settings in one of the ways presented:
-
Through the console, enable the
Receive notifications about messages sent from the phone,Receive notifications about messages sent through the APIandReceive notifications about the statuses of sent messagessettings -
Through the SetSettings method, enable the
outgoingMessageWebhook,outgoingAPIMessageWebhookandoutgoingWebhooksettings
Notification#
Notification format#
| Parameter | Type | Description |
|---|---|---|
typeWebhook | string | Incoming notification type. For notifications of this type the field takes the value outgoingMessageStatus |
chatId | string | Chat identifier. The chat with the message the status was received for. |
instanceData | object | Data about the instance |
timestamp | integer | Time the event occurred in UNIX format |
idMessage | string | Identifier of the sent message or file. The identifier of a sent message is returned by the methods: SendMessage, SendFileByUrl |
status | string | Status of the sent message or file. The status takes the values: |
delivered - the message has been delivered to the recipient | ||
read - the message has been read/viewed/listened to | ||
failed - an error occurred while sending the message to the Telegram server (this status cannot be disabled in the SetSettings settings, you must implement the processing of this notification) | ||
noAccount - no Telegram account is registered on the recipient's phone number (this status cannot be disabled in the SetSettings settings, you must implement the processing of this notification) | ||
suspended - the message was not sent because of sending restrictions, the instance has been switched to the suspended status.Read more about the status in the article What is the difference between the suspended and blocked statuses of a Telegram account? | ||
description | string | Error description (it is recommended to inform the operator about system errors). The description takes the values: |
media caption too long - the media message caption length has been exceeded | ||
chatId unresolvable on this session - there was no previous correspondence with the specified chat identifier, so the recipient could not be resolved. Get the actual chatId using the CheckAccount method and resend |
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 |
Example of a notification body with the delivered status#
{
"typeWebhook": "outgoingMessageStatus",
"chatId": "10000000",
"instanceData": {
"idInstance": 4100000000,
"wid": "79876543210@c.us",
"typeInstance": "telegram"
},
"timestamp": 1755591519,
"idMessage": "115054445839974415",
"status": "delivered",
}
Example of a notification body with the read status#
{
"typeWebhook": "outgoingMessageStatus",
"chatId": "10000000",
"instanceData": {
"idInstance": 4100000000,
"wid": "79876543210@c.us",
"typeInstance": "telegram"
},
"timestamp": 1755591519,
"idMessage": "115054445839974415",
"status": "read",
}
Example of a notification body about exceeding the length of a media message caption#
{
"typeWebhook": "outgoingMessageStatus",
"chatId": "10000000",
"instanceData": {
"idInstance": 4100000000,
"wid": "79876543210@c.us",
"typeInstance": "telegram"
},
"timestamp": 1755591519,
"status": "failed",
"description": "media caption too long"
}
Example of a notification body when there is no Telegram account on the number#
{
"typeWebhook": "outgoingMessageStatus",
"chatId": "77777777777@c.us",
"instanceData": {
"idInstance": 4100000000,
"wid": "79876543210@c.us",
"typeInstance": "telegram"
},
"timestamp": 1755591519,
"status": "noAccount",
"sendByApi": true
}
Example of a notification body when sending is restricted#
{
"typeWebhook": "outgoingMessageStatus",
"chatId": "10000000",
"instanceData": {
"idInstance": 4100000000,
"wid": "79876543210@c.us",
"typeInstance": "telegram"
},
"timestamp": 1755591519,
"idMessage": "115054445839974415",
"status": "suspended",
"sendByApi": true
}