Webhook
Set Webhook
Início
Instances
Settings
Send Message
Chat Controller
Profile Settings
Group Controller
- POSTCreate Group
- POSTUpdate Group Picture
- POSTUpdate Group Subject
- POSTUpdate Group Description
- GETFetch Invite Code
- POSTRevoke Invite Code
- POSTSend Group Invite
- GETFind Group by Invite Code
- GETFind Group by JID
- GETFetch All Groups
- GETFind Group Members
- POSTUpdate Group Members
- POSTUpdate Group Setting
- POSTToggle Ephemeral
- DELLeave Group
Websocket
Webhook
Set Webhook
Set Webhook for instance
POST
/
webhook
/
set
/
{instance}
curl --request POST \
--url https://api.l2msg.com/whatsapp/webhook/set/{instance} \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '{
"webhook": {
"enabled": true,
"url": "<string>",
"webhookByEvents": true,
"webhookBase64": true,
"events": [
"APPLICATION_STARTUP"
]
}
}'
{
"webhook": {
"instanceName": "teste-docs",
"webhook": {
"url": "https://example.com",
"events": [
"APPLICATION_STARTUP"
],
"enabled": true
}
}
}
Authorizations
Your authorization key header
Path Parameters
Name of the instance
Body
application/json
Webhook
enable webhook to instance
Webhook URL
Enables Webhook by events
Sends files in base64 when available
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
Created
curl --request POST \
--url https://api.l2msg.com/whatsapp/webhook/set/{instance} \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '{
"webhook": {
"enabled": true,
"url": "<string>",
"webhookByEvents": true,
"webhookBase64": true,
"events": [
"APPLICATION_STARTUP"
]
}
}'
{
"webhook": {
"instanceName": "teste-docs",
"webhook": {
"url": "https://example.com",
"events": [
"APPLICATION_STARTUP"
],
"enabled": true
}
}
}