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

# List Cal.com Appointments

> Lists bookings fetched live from the organization's primary Cal.com account.

### Authorizations

<ParamField header="Authorization" type="string" required>
  Your JWT access token. Pass it as a Bearer token in the `Authorization` header. Example: `Authorization: Bearer <token>`.
</ParamField>

***

### Query Parameters

<ParamField query="org_id" type="string" required>
  The organization ID whose primary Cal.com account bookings you want to fetch.
</ParamField>

<ParamField query="status" type="string">
  Optional Cal.com booking status filter.
</ParamField>

<ParamField query="agent_id" type="string">
  Optional agent ID that is stamped onto the results and echoed back in the response.
</ParamField>

<ParamField query="limit" type="integer">
  Optional result limit. Defaults to `50` and is clamped back to `50` when the value is `<= 0` or `> 200`.
</ParamField>

***

### Response

<ResponseField name="success" type="boolean">
  Whether the request succeeded.
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable status message.
</ResponseField>

<ResponseField name="data" type="object">
  Returned appointment data.

  <Expandable title="data">
    <ResponseField name="appointments" type="array">
      Array of appointments fetched from Cal.com.
    </ResponseField>

    <ResponseField name="count" type="integer">
      Total number of returned appointments.
    </ResponseField>

    <ResponseField name="org_id" type="string">
      Echoed organization ID.
    </ResponseField>

    <ResponseField name="agent_id" type="string">
      Echoed agent ID when provided.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": <boolean>,
    "message": "Appointments retrieved",
    "data": {
      "appointments": [
        {
          "id": "<string>",
          "organization_id": "<string>",
          "agent_id": "<string>",
          "attendee_name": "<string>",
          "attendee_email": "<string>",
          "attendee_phone": "<string>",
          "attendee_timezone": "<string>",
          "start_time": "<string>",
          "end_time": "<string>",
          "duration_minutes": <integer>,
          "status": "<string>"
        }
      ],
      "count": <integer>,
      "org_id": "<string>",
      "agent_id": "<string>"
    }
  }
  ```
</ResponseExample>

<ResponseExample>
  ```json 400 theme={null}
  {
    "success": false,
    "message": "<string>",
    "code": "INVALID_REQUEST"
  }
  ```
</ResponseExample>

<ResponseExample>
  ```json 400 theme={null}
  {
    "success": false,
    "message": "<string>",
    "code": "NOT_CONNECTED"
  }
  ```
</ResponseExample>

<ResponseExample>
  ```json 400 theme={null}
  {
    "success": false,
    "message": "<string>",
    "code": "CALCOM_API_ERROR"
  }
  ```
</ResponseExample>

<ResponseExample>
  ```json 401 theme={null}
  {
    "success": false,
    "message": "<string>"
  }
  ```
</ResponseExample>

<ResponseExample>
  ```json 500 theme={null}
  {
    "success": false,
    "message": "<string>",
    "code": "INTERNAL_ERROR"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /api/v1/calcom/appointments
openapi: 3.0.1
info:
  title: Agni API
  version: 1.0.0
  description: >-
    Agni API for managing agents, tools, widget settings, telephony, and
    integrations.
servers:
  - url: https://api.ravan.ai
security:
  - X-Api-Key: []
tags:
  - name: AgentService
  - name: AgentToolService
  - name: WidgetSettingsService
  - name: PhoneService
  - name: AppointmentService
  - name: GHLService
  - name: CalComService
  - name: CampaignService
  - name: ContactService
  - name: CallingService
  - name: RAGService
  - name: ModelService
  - name: HealthService
paths:
  /api/v1/calcom/appointments:
    get:
      tags:
        - CalComService
      summary: List Cal.com Appointments
      operationId: ListCalcomAppointments
      parameters:
        - name: org_id
          in: query
          required: true
          schema:
            type: string
          description: Organization ID
        - name: status
          in: query
          schema:
            type: string
          description: Cal.com booking status filter
        - name: agent_id
          in: query
          schema:
            type: string
          description: Agent ID to stamp onto results and echo back
        - name: limit
          in: query
          schema:
            type: integer
            default: 50
          description: Result limit, clamped to 50 when <=0 or >200
      responses:
        '200':
          description: Appointments retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCalcomAppointmentsResponse'
              example:
                success: true
                message: Appointments retrieved
                data:
                  appointments:
                    - id: <string>
                      organization_id: <string>
                      agent_id: <string>
                      attendee_name: <string>
                      attendee_email: <string>
                      attendee_phone: <string>
                      attendee_timezone: <string>
                      start_time: <string>
                      end_time: <string>
                      duration_minutes: 0
                      status: <string>
                  count: 1
                  org_id: <string>
                  agent_id: <string>
        '400':
          description: >-
            Missing org_id, Cal.com not connected, API key missing, or Cal.com
            API failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                message: <string>
                code: INVALID_REQUEST
        '401':
          description: Missing or invalid JWT
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
              example:
                success: false
                message: <string>
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                message: <string>
                code: INTERNAL_ERROR
      security:
        - BearerAuth: []
components:
  schemas:
    ListCalcomAppointmentsResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          $ref: '#/components/schemas/ListCalcomAppointmentsData'
      example:
        success: true
        message: Appointments retrieved
        data:
          appointments:
            - id: <string>
              organization_id: <string>
              agent_id: <string>
              attendee_name: <string>
              attendee_email: <string>
              attendee_phone: <string>
              attendee_timezone: <string>
              start_time: <string>
              end_time: <string>
              duration_minutes: 0
              status: <string>
          count: 1
          org_id: <string>
          agent_id: <string>
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        code:
          type: string
    UnauthorizedResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
      example:
        success: false
        message: <string>
    ListCalcomAppointmentsData:
      type: object
      properties:
        appointments:
          type: array
          items:
            $ref: '#/components/schemas/CalcomAppointment'
        count:
          type: integer
        org_id:
          type: string
        agent_id:
          type: string
      example:
        appointments:
          - id: <string>
            organization_id: <string>
            agent_id: <string>
            attendee_name: <string>
            attendee_email: <string>
            attendee_phone: <string>
            attendee_timezone: <string>
            start_time: <string>
            end_time: <string>
            duration_minutes: 0
            status: <string>
        count: 1
        org_id: <string>
        agent_id: <string>
    CalcomAppointment:
      type: object
      properties:
        id:
          type: string
        organization_id:
          type: string
        agent_id:
          type: string
        attendee_name:
          type: string
        attendee_email:
          type: string
        attendee_phone:
          type: string
        attendee_timezone:
          type: string
        start_time:
          type: string
        end_time:
          type: string
        duration_minutes:
          type: integer
        status:
          type: string
      example:
        id: <string>
        organization_id: <string>
        agent_id: <string>
        attendee_name: <string>
        attendee_email: <string>
        attendee_phone: <string>
        attendee_timezone: <string>
        start_time: <string>
        end_time: <string>
        duration_minutes: 0
        status: <string>
  securitySchemes:
    X-Api-Key:
      type: apiKey
      in: header
      name: X-Api-Key
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````