Skip to content

Sent edited message#

This section describes the format of the incoming notification messageData object for a sent edited message. For a description of the general format of incoming notifications, refer to the Sent messages section.

To receive incoming notifications of this kind, three conditions must be met:

  • typeWebhook = outgoingMessageReceived || outgoingAPIMessageReceived
  • editedMessageWebhook = yes
  • messageData.typeMessage = editedMessage

Instance settings

To receive incoming notifications about sent messages, you need to enable the settings in one of the ways presented:

  1. Through the console, enable the Receive notifications about messages sent from the phone, Receive notifications about messages sent through the API and Receive notifications about edited messages settings (additionally Receive notifications about the statuses of sent messages to receive notifications about the statuses of a sent message)

  2. Through the SetSettings method, enable the outgoingMessageWebhook, outgoingAPIMessageWebhook and editedMessageWebhook settings (additionally outgoingWebhook to receive notifications about the statuses of a sent message)

Notification#

Notification format#

Fields of the messageData object

Parameter Type Description
typeMessage string Type of the sent message. For messages of this type the field takes the value editedMessage
editedMessageData object Object with data about the edited message

Fields of the editedMessageData object

Parameter Type Description
textMessage string Text of the edited message
stanzaId string ID of the message that was edited

Notification body example#

Example of a notification body for an edited sent message#

{
  "typeWebhook": "outgoingMessageReceived",
  "instanceData": {
    "idInstance": 4100000000,
    "wid": "79876543210@c.us",
    "typeInstance": "telegram"
  },
  "timestamp": 1705895506,
  "idMessage": "115297976845823798",
  "senderData": {
    "chatId": "10000000",
    "chatType": "user",
    "sender": "10000000",
    "chatName": "Vasilisa the Wise",
    "senderName": "Vasilisa the Wise",
    "senderType": "user",
    "senderContactName": "Vasilisa the Wise",
    "senderPhoneNumber": 79876543210
  },
  "messageData": {
    "typeMessage": "editedMessage",
    "editedMessageData": {
      "textMessage": "Edited message",
      "stanzaId": "11529797684582123"
    }
  }
}

Example of a notification body for an edited 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": "supergroup",
    "sender": "10000000",
    "chatName": "Faraway Kingdom",
    "senderName": "Vasilisa",
    "senderType": "user",
    "senderContactName": "",
    "senderPhoneNumber": 79876543210
  },
  "messageData": {
    "typeMessage": "editedMessage",
    "editedMessageData": {
      "textMessage": "Edited message",
      "stanzaId": "11529797684582123"
    }
  }
}