# Update Calendly integration (/docs/api-reference/integrations/updateCalendlyIntegration)

> Choose which Calendly event type the agent books, by its uri from List Calendly event types. Only the person who connected the integration can change it.

**PATCH** `/integrations/calendly/{integration_id}`

Choose which Calendly event type the agent books, by its `uri` from List
Calendly event types. Only the person who connected the integration can
change it.

```yaml
operationId: updateCalendlyIntegration
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
  - in: path
    name: integration_id
    required: true
    description: The Calendly integration's id, from List integrations.
    schema:
      type: integer
requestBody:
  required: true
  content:
    application/json:
      schema:
        type: object
        required:
          - event_type_uri
        properties:
          event_type_uri:
            type: string
            description: One of the account's active event types, from List Calendly event types.
responses:
  '200':
    description: The event type the agent now books.
    content:
      application/json:
        schema:
          type: object
          properties:
            success:
              type: boolean
            event_type:
              type: object
              description: One Calendly event type.
              properties:
                uri:
                  type: string
                name:
                  type: string
                duration_minutes:
                  type:
                    - integer
                    - 'null'
                scheduling_url:
                  type: string
                custom_questions:
                  type: array
                  description: The questions Calendly asks the invitee when booking, in order.
                  items:
                    type: object
                    properties:
                      question:
                        type: string
                      required:
                        type: boolean
                      position:
                        type: integer
                      type:
                        type: string
                        description: Calendly's question type, such as `text` or `single_select`.
                      options:
                        type: array
                        items:
                          type: string
                        description: The allowed answers, for a question with choices.
  '400':
    description: '`event_type_uri` is missing or not one of the account''s active event types.'
  '403':
    description: >-
      Only the person who connected this integration can change it, or your role cannot edit
      integrations.
  '404':
    description: No Calendly integration with this id in your workspace.
  '409':
    description: The Calendly connection needs to be reconnected first.
  '502':
    description: Calendly did not answer. Try again shortly.
```

**curl**

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