Skip to main content
Use client.chatwoot to connect a VZaps instance to Chatwoot. Common fields on every call:
FieldTypeRequiredDescription
instance_idstringYesInstance ID.
instance_tokenstringYesInstance 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:
FieldTypeRequiredDescription
enabledbooleanYesEnables or disables the integration.
urlstringYesChatwoot base URL.
account_idstringYesNumeric account ID.
tokenstringYesChatwoot API token.
name_inboxstringNoAPI inbox name.
auto_createbooleanNoAuto-create inbox and webhook.
import_contactsbooleanNoImport contacts in the initial flow.
import_messagesbooleanNoImport messages in the initial flow.
days_limit_import_messagesnumberNoMessage import window in days. Minimum 1.
ignore_groupsbooleanNoIgnore group messages.
ignore_jidslistNoJIDs 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.