Skip to content

Outgoing call#

Beta version

The functionality is in beta mode. Functions can be changed and may also work unstably.

A webhook of this type appears when there is an outgoing call and contains information about the initiator and recipient of the call.

Configuring an instance

To receive incoming notifications about outgoing calls, you need to enable the settings using one of the following options:

  1. Through console enable the settings Get notifications about outgoing calls

  2. Through the SetSettings method enable the settings outgoingCallWebhook

Webhook#

Webhook parameters#

Parameter Type Description
typeWebhook string incoming webhook type. For messages of this type, the parameter takes on the value outgoingCall
instanceData object Instance data
timestamp integer Event timestamp in UNIX format
idMessage string Outgoing call Id
from string Chat and correspondent Id, in which the call was made
isVideo boolean The flag indicating a video call
duration integer Call duration in seconds
status string The status of an outgoing call, it takes the following values:
pickUp - at least one participant answered the call
hungUp - all participants did not answer the call, or the number to which the call was made does not have a WhatsApp account
invalid - unable to get through or process the status. For example, the number to which the call was made does not exist
participants array Call status for each participant. For private calls, this field will contain only one object

instanceData object parameters

Parameter Type Description
idInstance integer Instance Id. The size of the integer is int64. Values ​​range include from 1 to 10 digits
wid string Account Id in WhatsApp format
typeInstance string Instance messenger type

participants object parameters

Parameter Type Description
id string chat ID of the call participant
status string The call status of a specific participant. Can have the following values:
pickUp - the other party picked up the phone
hungUp - the other party did not answer the call or the number to which the call was made does not exist
declined - the other party declined the call
invalid - the call could not be made or the status could not be processed

Webhook body example#

{
    "typeWebhook": "outgoingCall",
    "instanceData": {
        "idInstance": 1101ХХХХХХ,
        "wid": "7ХХХХХХХХХХ@c.us",
        "typeInstance": "whatsapp"
    },
    "timestamp": 1768888295,
    "idMessage": "AC88AD4AA553FCBB95BEB6BF98F704B1",
    "from": "16381924658ХХХ@c.us",
    "isVideo": false,
    "duration": 0,
    "status": "hungUp",
    "participants": [
        {
            "id": "16381924658ХХХ@c.us",
            "status": "hungUp"
        }
    ]
}