# Detach an integration from an agent (/docs/api-reference/integrations/detachAgentIntegration)

> Remove the integration from the agent. The integration itself is kept and stays available to attach again.

**DELETE** `/agents/{agent_id}/integrations/{integration_id}`

Remove the integration from the agent. The integration itself is kept and stays available to attach again.

```yaml
operationId: detachAgentIntegration
parameters:
  - in: query
    name: user_id
    required: false
    description: |
      Reseller keys only: act as one of your clients by its user id. Omit
      it to act on your own account.
      [How acting for a client works](/docs/reseller/your-clients/acting-as-clients).
    schema:
      type: integer
      description: |
        Reseller keys only: act as one of your clients by its user id. Omit
        it to act on your own account.
        [How acting for a client works](/docs/reseller/your-clients/acting-as-clients).
      example: 1234
responses:
  '200':
    description: The integration was detached.
    content:
      application/json:
        schema:
          type: object
          properties:
            success:
              type: boolean
            message:
              type: string
  '401':
    description: Missing or invalid API key.
  '403':
    description: The API key's user cannot make changes to integrations.
  '404':
    description: Agent not found, or the integration is not attached to it.
```

**Python SDK**

```python
from omnidimension import Client
client = Client(api_key)

response = client.integrations.remove_integration_from_agent(
    agent_id=123, integration_id=456
)
print(response)
```

**curl**

```bash
curl -X DELETE "https://omnidim.io/api/v1/agents/{agent_id}/integrations/{integration_id}?user_id=1234" \
  -H "Authorization: Bearer $OMNIDIM_API_KEY"
```