Skip to main content

Create Webhook

POST 

/api/v2/instance/:instanceId/webhook

Webhook

Define the webhook that will send whatsapp information to your system.

⚠️Attention⚠️: Set this webhook after creating an [instance](#/Business Controller/BusinessController_createInstance).

This endpoint allows the integration of various services and applications through the addition of webhooks. Each webhook triggers an HTTP request when a specific event occurs. Provides flexibility for real-time communications between systems, but extensive use can result in traffic overload, security issues, and monitoring challenges. Active monitoring and implementation of appropriate security measures are recommended.

Request

Path Parameters

    instanceId stringrequired

    ID of the instance.

Body

required
  • url: Instance unique url.
  • enabled: Enable or disable the url.
    1. default: 'false'
    name Namerequired

    Identification name of your webhook

    url Urlrequired

    Instance unique url.

    enabled Enabled

    Default value: false

    Enable or disable the url.

Responses

WebhookResponse

Schema
    name Namerequired

    Identification name of your webhook

    url Urlrequired

    Instance unique url.

    enabled Enabled

    Default value: false

    Enable or disable the url.

    webhookId stringrequired
    createdAt date-timerequired
    updatedAt date-timerequired
    instanceInstanceId stringrequired
    WebhookEvents object
    qrcodeUpdate QrCode Update

    Default value: true

    Enables sending the qr code.

    stateInstance State Instance

    Default value: true

    Enables sending instance State.

    messagesSet Messages Set

    Default value: true

    Enables batch sending of old messages.

    messagesUpsert Messages Upsert

    Default value: true

    Enables sending of all new incoming messages.

    messagesUpdate Messages Update

    Default value: true

    Enables sending all updates to the incoming or outgoing message.

    sendMessage Send Message

    Default value: true

    Enables the sending of all messages sent by the API.

    contactsSet Contacts Set

    Default value: true

    Enables sending the initial batch of loaded contacts.

    contactsUpsert Contacts Upsert

    Default value: true

    Enables sending a new contact with additional information.

    contactsUpdate Contacts Update

    Default value: true

    Enable update notification for each contact in the conversation.

    presenceUpdate Presence Update

    Default value: true

    Enables notification of contact behavior in chat.

    chatsSet Chat Set

    Default value: true

    Enables sending all loaded chats.

    chatsUpdate Chat Set

    Default value: true

    Enable notification of each chat update in the conversation.

    chatsUpsert Chat Upsert

    Default value: true

    Enable notification of every new chat started.

    chatsDelete Chat Deletedeprecated

    Default value: true

    Enable notification when a chat is deleted.

    groupsUpsert Group Upsert

    Default value: true

    Enable notification when a group is created.

    groupUpdate Group Update

    Default value: true

    c

    groupParticipantsUpdate Group Participant Update

    Default value: true

    Enable notification when a member of a group is updated.

    connectionUpdate Connection Update

    Default value: true

    Enable notification when connection status changes.

    newJwt New Jwt

    Default value: true

    Enable notification when the json web token is updated.

    webhookEventsId stringrequired
    createdAt date-timerequired
    updatedAt date-timerequired
Loading...