POST

https://{server-url}

/
webhook
/
set
/
{instance}
curl --request POST \
  --url https://{server-url}/webhook/set/{instance} \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '{
  "url": "<string>",
  "webhook_by_events": true,
  "webhook_base64": true,
  "events": [
    "APPLICATION_STARTUP"
  ]
}'
{
  "webhook": {
    "instanceName": "teste-docs",
    "webhook": {
      "url": "https://example.com",
      "events": [
        "APPLICATION_STARTUP"
      ],
      "enabled": true
    }
  }
}

Authorizations

apikey
string
headerrequired

Your authorization key header

Path Parameters

instance
string
required

ID of the instance to connect

Body

application/json
url
string
required

Webhook URL

webhook_by_events
boolean

Enables Webhook by events

webhook_base64
boolean

Sends files in base64 when available

events
enum<string>[]
required

Events to be sent to the Webhook

Available options:
APPLICATION_STARTUP,
QRCODE_UPDATED,
MESSAGES_SET,
MESSAGES_UPSERT,
MESSAGES_UPDATE,
MESSAGES_DELETE,
SEND_MESSAGE,
CONTACTS_SET,
CONTACTS_UPSERT,
CONTACTS_UPDATE,
PRESENCE_UPDATE,
CHATS_SET,
CHATS_UPSERT,
CHATS_UPDATE,
CHATS_DELETE,
GROUPS_UPSERT,
GROUP_UPDATE,
GROUP_PARTICIPANTS_UPDATE,
CONNECTION_UPDATE,
CALL,
NEW_JWT_TOKEN,
TYPEBOT_START,
TYPEBOT_CHANGE_STATUS

Response

201 - application/json
webhook
object