Skip to main content

Instance Webhook

Manage the configuration to receive notifications about messages, connections, and other events in real time on your server.

Testing Tools

Before integrating, we recommend testing that the data is received. Use one of these tools to inspect the payload:

Webhook.cool

Recommended. No rate limit and a super clean interface.

SVIX

Good alternative. Reliable, with a low rate limit.

Webhook.site

Avoid if possible. It has very aggressive rate limits.

This is the easiest way to configure it. The system automatically manages a single webhook per instance, creating or updating it as needed. Rules:
  1. Do not include action or id in the payload.
  2. Always use filters to avoid infinite loops.
Loop PreventionIf you use automations, always include "excludeMessages": ["wasSentByApi"]. This prevents messages sent by your own bot from triggering new events, which would create an infinite loop.

Payload Example


Advanced Mode

Use this mode only if you need to register multiple webhooks for the same instance (e.g., one webhook for messages and another for connection status).
Pro Tip: Even if you need multiple endpoints, consider using the URL Parameters feature (see the end of this page) with Simple Mode. It is easier to maintain.

Manual Management

To control multiple webhooks, you must send the action field.

Available Events

Select which types of notifications you want to receive in the events array.

Exclusion Filters (excludeMessages)

Use the excludeMessages field to ignore specific messages and save processing.

URL Parameters (Dynamic Routes)

You can have the API add information directly to your webhook URL, making routing easier in your backend (e.g., using Node.js/Express or Laravel Routes).

Available Options

addUrlEvents

Adds the event to the URL. .../webhook/{evento}

addUrlTypesMessages

Adds the message type to the URL. .../webhook/{tipo}

Result Examples

Suppose your base URL is https://api.example.com/webhook:
  1. Events Only (addUrlEvents: true):
    • https://api.example.com/webhook/message
    • https://api.example.com/webhook/connection
  2. Types Only (addUrlTypesMessages: true):
    • https://api.example.com/webhook/conversation (text)
    • https://api.example.com/webhook/image (media)
  3. Both Enabled (Combination): The order is always: {URL_BASE}/{EVENTO}/{TIPO_MENSAGEM}
    • https://api.example.com/webhook/message/conversation
    • https://api.example.com/webhook/message/audio
Make sure your backend is configured to accept dynamic parameters (wildcards) in the route to process these URLs correctly.