Skip to main content
POST
Activate integration
Auth: TokenAccount or TokenInstanceRate limit: Global (100/min) • Idempotent: no

Description

Activates the Chatwoot integration for an instance. RyzeAPI creates an inbox in Chatwoot and keeps the realtime connection. The chatwootApiToken is encrypted at rest with AES-256-GCM and is not returned by this endpoint (it is exposed in plaintext only by GET /api/chatwoot/list/:instance).
Three inbox modes, controlled by createInbox and inboxId:
  • Create automatically (default) — createInbox: true (or omitted) and no inboxId. RyzeAPI creates a new inbox in Chatwoot and points its webhook at itself.
  • Reuse an existing inbox — pass inboxId. RyzeAPI repoints that inbox’s API channel webhook to itself (PATCH /inboxes/:id with channel.webhook_url), preserving contacts, history, and agents. Ideal for migrating from another WhatsApp API without switching inboxes.
  • Webhook only (manual) — createInbox: false and no inboxId. RyzeAPI just activates the integration and returns webhook_url in the response; paste that URL into the Webhook URL field of your inbox’s API channel in Chatwoot. The inbox_id is learned from the first incoming event.
This operation has an internal timeout of 60s, the first activation involves creating the inbox and opening the realtime connection, which can take time depending on latency to Chatwoot.

Example

Success response

201 Created

Path parameters

string
required
Instance name (e.g., suporte).

Headers

string
required
TokenAccount or TokenInstance.
string
required
application/json

Request body

string
required
URL of the Chatwoot installation (RFC 3986). The trailing / is removed. Example: https://chatwoot.example.com.
integer
required
Numeric ID of the Chatwoot account. Must be greater than 0.
string
required
API token (access_token) of the Chatwoot agent. Encrypted at rest with AES-256-GCM. Not returned by this endpoint, but exposed in plaintext by GET /api/chatwoot/list/:instance.
string
default:"RyzeAPI"
Name of the inbox to be created in Chatwoot (used only when a new inbox is created).
boolean
default:"true"
Controls automatic inbox creation. true (or absent) with no inboxId creates a new inbox. false with no inboxId enables webhook-only mode: no inbox is created and the response includes webhook_url for you to paste into Chatwoot.
integer
ID of an existing Chatwoot inbox to reuse. When set (must be > 0), RyzeAPI repoints that inbox’s webhook instead of creating a new one, and takes precedence over createInbox.
boolean
When true, prefixes messages sent by RyzeAPI with the Chatwoot agent’s signature.
boolean
When true, group events are not routed to Chatwoot.
boolean
When true, new conversations start as pending (instead of open).
boolean
When true, new messages on conversations marked as resolved automatically reopen them.

Errors

The API classifies the failure and returns a useful HTTP status with an actionable message. The raw root-cause text (coming from Chatwoot) is included after Detail:.
Use the HTTP status to react programmatically (401 → fix token, 502 → re-check URL/connectivity) and show error.message to the end user, it already includes the suggested next action.

Error payload examples

Invalid token:
Unreachable host:

Next

View status / info

Check the status and last_error of the integration.

Deactivate integration

Remove the integration (the Chatwoot inbox is preserved).