> ## 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.

# Disconnect Cal.com

> Disconnects an org-level Cal.com account by soft deleting it, setting the status to inactive and clearing the API key. Disconnects all org-level accounts unless `provider_id` is provided.

### 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>

***

### Body

<ParamField body="org_id" type="string" required>
  The organization ID whose org-level Cal.com account or accounts should be disconnected.
</ParamField>

<ParamField body="provider_id" type="string">
  Optional Cal.com provider/account ID. When provided, only that one org-level account is disconnected.
</ParamField>

***

### Response

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

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

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": <boolean>,
    "message": "Cal.com disconnected successfully"
  }
  ```
</ResponseExample>

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

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

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

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


## OpenAPI

````yaml POST /api/v1/calcom/disconnect
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/disconnect:
    post:
      tags:
        - CalComService
      summary: Disconnect Cal.com
      operationId: DisconnectCalcom
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DisconnectCalcomRequest'
            example:
              org_id: <string>
              provider_id: <string>
      responses:
        '200':
          description: Cal.com disconnected successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicSuccessResponse'
              example:
                success: true
                message: Cal.com disconnected successfully
        '400':
          description: Missing org_id
          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>
        '403':
          description: Plan does not include calendar integration
          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:
    DisconnectCalcomRequest:
      type: object
      required:
        - org_id
      properties:
        org_id:
          type: string
        provider_id:
          type: string
      example:
        org_id: <string>
        provider_id: <string>
    BasicSuccessResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
      example:
        success: true
        message: Cal.com disconnected successfully
    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>
  securitySchemes:
    X-Api-Key:
      type: apiKey
      in: header
      name: X-Api-Key
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````