# Create a Cal.com integration (/docs/api-reference/integrations/createCalIntegration)

> Connect a Cal.com event type so an agent can check availability and book meetings during a call. Attach it to an agent with `attachAgentIntegration`.

**POST** `/integrations/cal`

Connect a Cal.com event type so an agent can check availability and book meetings during a call. Attach it to an agent with `attachAgentIntegration`.

```yaml
operationId: createCalIntegration
requestBody:
  required: true
  content:
    application/json:
      schema:
        type: object
        required:
          - name
          - cal_api_key
          - cal_id
          - cal_timezone
        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
          name:
            type: string
            description: A name for the integration.
          cal_api_key:
            type: string
            description: Your Cal.com API key.
          cal_id:
            type: string
            description: The Cal.com event type id to book.
          cal_timezone:
            type: string
            description: IANA time zone for the bookings, such as `America/New_York`.
responses:
  '200':
    description: The integration was created.
    content:
      application/json:
        schema:
          type: object
          properties:
            success:
              type: boolean
            message:
              type: string
            integration_id:
              type: integer
              description: Use it as `integration_id` to attach the integration to an agent.
            integration:
              type: object
              description: The new integration. Stored credentials read `********`.
              additionalProperties: true
              properties:
                id:
                  type: integer
                  description: Use it as `integration_id` in a post-call action.
                name:
                  type: string
                integration_type:
                  type: string
                  description: The kind of integration.
                  example: google_sheets
                user_id:
                  type: integer
                user_name:
                  type: string
                organization_id:
                  type: integer
                organization_name:
                  type: string
  '400':
    description: |
      The integration was not created: a required field is missing, the
      name is taken by another integration, or the API key is the hidden
      `********` copied from a listing.
    content:
      application/json:
        schema:
          type: object
          properties:
            error:
              type: string
              example: invalid_request
            error_description:
              type: string
              example: An integration with this name already exists in your organization
  '401':
    description: Missing or invalid API key.
  '403':
    description: The API key's user cannot make changes to integrations.
```

**Python SDK**

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

response = client.integrations.create_cal_integration(
    name="Demo bookings",
    cal_api_key="cal_live_YOUR_KEY",
    cal_id="your-event-type-id",
    cal_timezone="America/New_York",
)
print(response["json"]["integration_id"])
```

**curl**

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