Use client.chatwoot to connect a VZaps instance to Chatwoot.
Common fields on every call:
| Field | Type | Required | Description |
|---|
instance_id | string | Yes | Instance ID. |
instance_token | string | Yes | Instance token. |
client.chatwoot.get(instance_id, instance_token=...)
Reads the current configuration, including webhook_url and token_masked when applicable.
chatwoot = client.chatwoot.get("VZ...", instance_token="instance-token")
print(chatwoot)
Return: Chatwoot config (enabled, url, account_id, webhook_url, token_masked, etc.).
client.chatwoot.set(...)
Creates or updates the instance Chatwoot integration.
saved = client.chatwoot.set(
instance_id="VZ...",
instance_token="instance-token",
enabled=True,
url="https://app.chatwoot.com",
account_id="1",
token="chatwoot-api-token",
name_inbox="WhatsApp VZaps",
sign_msg=True,
sign_delimiter="\n",
number="5511999999999",
reopen_conversation=True,
conversation_pending=False,
import_contacts=True,
import_messages=True,
days_limit_import_messages=30,
auto_create=True,
organization="My company",
logo="",
ignore_groups=False,
ignore_jids=[],
)
print(saved)
Return: saved config (includes webhook_url when generated).
Main payload fields:
| Field | Type | Required | Description |
|---|
enabled | boolean | Yes | Enables or disables the integration. |
url | string | Yes | Chatwoot base URL. |
account_id | string | Yes | Numeric account ID. |
token | string | Yes | Chatwoot API token. |
name_inbox | string | No | API inbox name. |
auto_create | boolean | No | Auto-create inbox and webhook. |
import_contacts | boolean | No | Import contacts in the initial flow. |
import_messages | boolean | No | Import messages in the initial flow. |
days_limit_import_messages | number | No | Message import window in days. Minimum 1. |
ignore_groups | boolean | No | Ignore group messages. |
ignore_jids | list | No | JIDs to ignore. |
Copy webhook_url from the response into the Chatwoot API inbox when auto_create does not apply it automatically.
client.chatwoot.delete(instance_id, instance_token=...)
Removes the Chatwoot integration from the instance.
client.chatwoot.delete("VZ...", instance_token="instance-token")
Return: integration removal confirmation.
client.chatwoot.trigger_import(...)
Triggers a manual import of contacts, messages, or both.
Import contacts:
client.chatwoot.trigger_import(
instance_id="VZ...",
instance_token="instance-token",
what="contacts",
)
Return: import job confirmation (contacts, messages, or all).
Import messages:
client.chatwoot.trigger_import(
instance_id="VZ...",
instance_token="instance-token",
what="messages",
)
Import all:
client.chatwoot.trigger_import(
instance_id="VZ...",
instance_token="instance-token",
what="all",
)
Accepted values for what: contacts, messages, all.