Webhook Filters
Webhooks
Webhook Filters
Configure which message types and webhooks you want to receive
PUT
Webhook Filters
Overview
The filters endpoint allows you to configure which events and message types will be triggered by your instance’s webhooks. You can:- Filter message types received in the On message received webhook (e.g., ignore group messages or audio-only messages)
- Filter webhook types that will be triggered (e.g., disable the Chat presence webhook without removing the configured URL)
The same settings can also be configured directly from the instance panel, using toggles on each webhook.
Update filters
Header
Your instance ID. Available in the Z-API panel under Instances.
Your Z-API instance token.
Body
List of message type filters. Types included in the array will not be delivered to the On message received webhook (ReceivedCallback).
See the possible values below.
List of webhook type filters. Webhooks included in the array will not be triggered, even if they have a configured URL.
See the possible values below.
Request Body
Filter types for webhooks
Filters by message type
These apply to the On message received webhook (ReceivedCallback). Messages whose type is included in themessageFilters array will not be delivered.
FILTER_FROM_GROUP
FILTER_FROM_GROUP
Filters messages received in groups. When active, no messages received in a group will be delivered to the
ReceivedCallback.FILTER_FROM_PRIVATE_CHAT
FILTER_FROM_PRIVATE_CHAT
Filters messages received in private chats. When active, only group messages will be delivered to the
ReceivedCallback.FILTER_TEXT_MESSAGE
FILTER_TEXT_MESSAGE
Filters plain text messages.
FILTER_IMAGE_MESSAGE
FILTER_IMAGE_MESSAGE
Filters image messages.
FILTER_VIDEO_MESSAGE
FILTER_VIDEO_MESSAGE
Filters video messages.
FILTER_AUDIO_MESSAGE
FILTER_AUDIO_MESSAGE
Filters audio messages.
FILTER_DOCUMENT_MESSAGE
FILTER_DOCUMENT_MESSAGE
Filters document messages.
Filters by webhook type
These apply to webhooks in general. Webhooks whose type is included in thecallbackTypeFilters array will not be triggered, regardless of whether they have a configured URL.
FILTER_RECEIVED_CALLBACK
FILTER_RECEIVED_CALLBACK
Disables the On message received (ReceivedCallback)
FILTER_DELIVERY_CALLBACK
FILTER_DELIVERY_CALLBACK
Disables the On message send (DeliveryCallback)
FILTER_CONNECTED_CALLBACK
FILTER_CONNECTED_CALLBACK
Disables the On connected (ConnectedCallback)
FILTER_DISCONNECTED_CALLBACK
FILTER_DISCONNECTED_CALLBACK
Disables the On disconnected (DisconnectedCallback)
FILTER_PRESENCE_CHAT_CALLBACK
FILTER_PRESENCE_CHAT_CALLBACK
Disables the Chat presence (PresenceChatCallback)
FILTER_MESSAGE_STATUS_CALLBACK
FILTER_MESSAGE_STATUS_CALLBACK
Disables the Message status (MessageStatusCallback)