Overview
- Each instance can have
NTypeBots configured. - Every configuration carries a base URL (e.g.
https://typebot.io), the flowpublic_idand a trigger rule. - When a message reaches the WhatsApp of the instance, the API evaluates enabled TypeBots in descending
priority. The first whose trigger matches the incoming text starts the session. - Active sessions are keyed by the contact’s
remote_jid. Subsequent messages from the same contact continue the session instead of starting a new one. - Audio messages can be transcribed to text when the feature is enabled in the VZaps infrastructure. After transcription, the text follows the same session and trigger rules as typed messages.
- Sessions can be closed from the dashboard or via the dedicated endpoint.
Configuration fields
| Field | Description |
|---|---|
enabled | When false, the TypeBot is ignored by the trigger evaluation. |
description | Friendly name shown in the dashboard. |
typebot_url | TypeBot site root (e.g. https://typebot.io). |
public_id | Public identifier of the flow. |
trigger_type | all, keyword, contains, starts_with, regex, advanced or none (manual via API). |
trigger_operator | Only for trigger_type = advanced: equals, contains, starts_with or regex. |
trigger_value | Text/regex used by the trigger (required for everything except all and none). |
priority | Evaluation order. Higher value is evaluated first. |
expire_in_minutes | Closes the session after this idle window. 0 = never expires automatically. |
keyword_finish | Exact word the contact sends to close the session. |
default_delay_ms | Delay applied between every outbound WhatsApp message. |
unknown_message | Message sent when TypeBot cannot interpret the input. |
transcribe_audio | When true, incoming audio messages can be transcribed and handled as text by TypeBot. |
listen_from_me | When true, messages sent by the instance itself also feed the TypeBot. |
stop_bot_from_me | When true, a manual message from the instance pauses the bot for the current conversation. |
keep_open | Controls what happens to the session when it ends (expire, keyword_finish or flow completion): true keeps the row with status=closed for history; false deletes it entirely. Time-based expiration applies either way. |
debounce_ms | Window in ms to merge consecutive messages from the same contact before forwarding to TypeBot. |
Endpoints
GET /instances/{id}/typebots- list configured TypeBots.POST /instances/{id}/typebots- create a TypeBot.PATCH /instances/{id}/typebots/{typebotId}- update configuration.DELETE /instances/{id}/typebots/{typebotId}- remove the configuration and its sessions.POST /instances/{id}/typebots/sessions/start- manually start a TypeBot session for a contact using the TypeBotpublic_id, an optionalpush_name, and an initial message.GET /instances/{id}/typebots/sessions- list active/closed sessions.POST /instances/{id}/typebots/sessions/{session}/pause- pause an opened session manually. Thesessionpath parameter must be the session UUID.POST /instances/{id}/typebots/sessions/{session}/close- close a session manually. Thesessionpath parameter accepts both the session UUID or the contact’s phone number (digits only, e.g.5532988776655); in the latter case every active session of that contact on the instance is closed and the response returnsclosedwith the count.
Start a session manually
Example: create a keyword-triggered TypeBot
Close a session by phone
When a human agent needs to take over immediately and you only have the contact’s phone number (no session UUID), pass the phone directly in the path. The API looks up and closes every active session of that contact on the instance, regardless of which TypeBot created them.opened or paused) session for that phone, the API returns 404.
Best practices
- Assign distinct priorities so behavior does not depend on creation order.
regexenables sophisticated triggers; test in a sandbox first.debounce_msprevents the bot from firing multiple times when the contact sends several messages in a row.- Enable
stop_bot_from_mefor conversations that should stay with a human agent. keep_open=trueonly preserves the history of finished sessions; it does not disable theexpire_in_minutesidle timeout.

