> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ryzeapi.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Deactivate integration

> Remove the Chatwoot integration from the instance (the Chatwoot inbox is preserved)

**Auth:** `TokenAccount` or `TokenInstance` • **Rate limit:** `Global` (100/min) • **Idempotent:** yes

## Description

Deactivates the Chatwoot integration for the instance. RyzeAPI terminates the integration and removes the local row. **The Chatwoot inbox is not deleted**: it only loses its connection to the instance.

<Note>
  The Chatwoot inbox is **not deleted**: its conversations and messages are preserved. It only loses its connection to the instance. If you connect Chatwoot again later, a **new** inbox is created.
</Note>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE "https://ryzeapi.cloud/api/chatwoot/delete/suporte" \
    -H "token: $Token_Account"
  ```

  ```javascript JavaScript theme={null}
  await fetch("https://ryzeapi.cloud/api/chatwoot/delete/suporte", {
    method: "DELETE",
    headers: {
      "token": process.env.Token_Account
    }
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.delete(
      "https://ryzeapi.cloud/api/chatwoot/delete/suporte",
      headers={
          "token": os.environ["Token_Account"]
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
  )

  func main() {
      req, _ := http.NewRequest("DELETE", "https://ryzeapi.cloud/api/chatwoot/delete/suporte", nil)
      req.Header.Set("token", os.Getenv("Token_Account"))
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

## Success response

```json 200 OK theme={null}
{
  "message": "chatwoot integration deactivated"
}
```

## Path parameters

<ParamField path="instance" type="string" required>
  Instance name (e.g., `suporte`).
</ParamField>

## Headers

<ParamField header="token" type="string" required>
  `TokenAccount` or `TokenInstance`.
</ParamField>

## Behavior

<Steps>
  <Step title="Look up the local integration">
    Reads the record from the `chatwoot_integrations` table. If it doesn't exist, returns `404`.
  </Step>

  <Step title="Terminate the integration (30s timeout)">
    RyzeAPI terminates the integration. The Chatwoot inbox **is preserved** (it loses its link to the instance but keeps its messages).

    * **Already removed** → treated as success (does not fail).
    * **Other errors** → log a warning on the server and proceed to the next step.
  </Step>

  <Step title="Remove the local row">
    Deletes the record from `chatwoot_integrations` in RyzeAPI. The operation is considered successful when this step completes.
  </Step>
</Steps>

<Note>
  The Chatwoot inbox is **not removed**: it only loses its connection to the instance. If you reactivate the integration later (`POST /api/chatwoot/set/:instance`), a **new** inbox is created.
</Note>

## Errors

| HTTP | `error.message`                      |
| :--: | ------------------------------------ |
|  404 | `instance not found`                 |
|  404 | `no chatwoot integration to delete`  |
|  503 | `integration gateway not configured` |

## Next

<CardGroup cols={2}>
  <Card title="Reactivate" icon="plug" href="/en/api/chatwoot/activate">
    Recreate the integration with `POST /api/chatwoot/set/:instance`.
  </Card>

  <Card title="Overview" icon="circle-info" href="/en/api/chatwoot/overview">
    Go back to the module overview.
  </Card>
</CardGroup>
