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

# Disconnect Integration

> Disconnect a third-party integration

Disconnect and disable a third-party integration for a specific user.

## URL Parameters

<ParamField path="integrationType" type="string" required>
  The type of integration to disconnect. Valid values:

  * `google-analytics`
  * `notion`
  * `slack`
  * `zoho`
  * `gmail`
</ParamField>

## Request

<ParamField body="externalUserIdentifier" type="string" required>
  Unique identifier for the user in your system
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Whether the disconnection was successful
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://suada.ai/api/public/integrations/notion/disconnect \
    -H "Authorization: Bearer sk-suada-your-api-key" \
    -H "Content-Type: application/json" \
    -d '{
      "externalUserIdentifier": "user-123"
    }'
  ```

  ```typescript TypeScript theme={null}
  import { Suada } from '@suada/node';

  const suada = new Suada({
    apiKey: 'your-api-key'
  });

  const result = await suada.disconnectIntegration('notion', {
    externalUserIdentifier: 'user-123'
  });
  ```

  ```python Python theme={null}
  from suada import Suada, SuadaConfig

  suada = Suada(
      config=SuadaConfig(
          api_key="your-api-key"
      )
  )

  result = suada.disconnect_integration(
      integration_type="notion",
      external_user_identifier="user-123"
  )
  ```
</CodeGroup>

<ResponseExample>
  ```json theme={null}
  {
    "success": true
  }
  ```
</ResponseExample>

## Error Codes

<ResponseField name="400" type="object">
  Invalid request

  ```json theme={null}
  {
    "error": "Missing required parameters"
  }
  ```
</ResponseField>

<ResponseField name="401" type="object">
  Authentication error

  ```json theme={null}
  {
    "error": "Invalid or expired API key"
  }
  ```
</ResponseField>

<ResponseField name="404" type="object">
  Integration not found

  ```json theme={null}
  {
    "error": "Integration not found"
  }
  ```
</ResponseField>

<ResponseField name="500" type="object">
  Server error

  ```json theme={null}
  {
    "error": "Failed to disconnect integration"
  }
  ```
</ResponseField>

## Notes

* This endpoint disables the integration but preserves its configuration
* The integration can be re-enabled by going through the connection flow again
* Any ongoing data synchronization will be stopped
* Access tokens and other credentials are revoked
* The integration's status will be updated to reflect the disconnection
