# Attach an integration to an agent (/docs/api-reference/integrations/attachAgentIntegration)

> Attach one of your integrations to the agent. The agent can use it on its next call. Integrations already attached stay as they are.

**POST** `/agents/{agent_id}/integrations`

Attach one of your integrations to the agent. The agent can use it on its next call. Integrations already attached stay as they are.

```yaml
operationId: attachAgentIntegration
requestBody:
  required: true
  content:
    application/json:
      schema:
        type: object
        required:
          - integration_id
        properties:
          user_id:
            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
          integration_id:
            type: integer
            description: The integration's id, from `listIntegrations` or a create response.
responses:
  '200':
    description: The integration was attached.
    content:
      application/json:
        schema:
          type: object
          properties:
            success:
              type: boolean
            message:
              type: string
  '400':
    description: '`integration_id` is missing or not an integer.'
  '401':
    description: Missing or invalid API key.
  '403':
    description: The API key's user cannot make changes to integrations.
  '404':
    description: Agent or integration not found, or not yours.
```

**Python SDK**

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

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

**curl**

```bash
curl -X POST "https://omnidim.io/api/v1/agents/{agent_id}/integrations" \
  -H "Authorization: Bearer $OMNIDIM_API_KEY"
```