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

# Delete Connection

> Delete a connection by its ID and Organization ID (Leen's UUID).



## OpenAPI

````yaml delete /provisioning/organizations/{organization_id}/connections/{connection_id}
openapi: 3.1.0
info:
  title: Leen Security API
  version: 0.0.1
servers:
  - url: https://api.leen.dev/v1
    description: Production API
  - url: https://api.eu-c1.leen.dev/v1
    description: Production API (EU Region)
  - url: https://api.ap-se2.leen.dev/v1
    description: Production Api (APAC Region)
security: []
paths:
  /provisioning/organizations/{organization_id}/connections/{connection_id}:
    delete:
      tags:
        - provisioning
      summary: Delete Connection
      description: Delete a connection by its ID and Organization ID (Leen's UUID).
      operationId: delete_connection_by_id
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Organization Id
        - name: connection_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Connection Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionRespModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - API-Key: []
components:
  schemas:
    ConnectionRespModel:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        vendor:
          type: string
          title: Vendor
        is_active:
          type: boolean
          title: Is Active
        refresh_interval_secs:
          type: integer
          title: Refresh Interval Secs
        timeout_secs:
          type: integer
          title: Timeout Secs
        organization_id:
          type: string
          format: uuid
          title: Organization Id
        oauth2_authorize_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Oauth2 Authorize Url
        identifier:
          anyOf:
            - type: string
            - type: 'null'
          title: Identifier
        state:
          $ref: '#/components/schemas/ConnectionStateEnum'
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        health:
          $ref: '#/components/schemas/ConnectionHealthStatus'
      type: object
      required:
        - id
        - vendor
        - is_active
        - refresh_interval_secs
        - timeout_secs
        - organization_id
        - state
        - created_at
        - updated_at
        - health
      title: Connection
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ConnectionStateEnum:
      type: string
      enum:
        - PENDING
        - ACTIVE
        - PAUSED
        - DELETED
      title: ConnectionStateEnum
    ConnectionHealthStatus:
      properties:
        name:
          $ref: '#/components/schemas/ConnectionHealthStatusName'
        status:
          $ref: '#/components/schemas/ConnectionHealthStatusEnum'
        description:
          type: string
          title: Description
        resolution_owner:
          $ref: '#/components/schemas/ResolutionOwner'
        details:
          anyOf:
            - items:
                $ref: '#/components/schemas/ConnectionHealthUnauthorizedDetail'
              type: array
            - type: 'null'
          title: Details
      type: object
      required:
        - name
        - status
        - description
        - resolution_owner
      title: ConnectionHealthStatus
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ConnectionHealthStatusName:
      type: string
      enum:
        - HEALTHY
        - INITIALIZING
        - UNAUTHORIZED
        - CONNECTION_RECONFIGURATION_REQUIRED
        - VENDOR_CLIENT_ERROR
        - VENDOR_SERVER_ERROR
        - EXECUTION_TIMEOUT
        - RATE_LIMIT_EXCEEDED
        - INTERNAL_ERROR
      title: ConnectionHealthStatusName
    ConnectionHealthStatusEnum:
      type: string
      enum:
        - HEALTHY
        - UNHEALTHY
        - INITIALIZING
      title: ConnectionHealthStatusEnum
    ResolutionOwner:
      type: string
      enum:
        - LEEN
        - CUSTOMER
        - VENDOR
      title: ResolutionOwner
    ConnectionHealthUnauthorizedDetail:
      properties:
        data_export_type:
          anyOf:
            - $ref: '#/components/schemas/DataExportTypesEnum'
            - type: 'null'
        endpoint:
          type: string
          title: Endpoint
      type: object
      required:
        - endpoint
      title: ConnectionHealthUnauthorizedDetail
    DataExportTypesEnum:
      type: string
      enum:
        - alerts
        - compliances
        - compliance_findings
        - config_users
        - cspm_alerts
        - device_groups
        - device_policies
        - devices
        - idp
        - idp_alerts
        - idp_audit_logs
        - idp_policies
        - issues
        - organization_identities
        - sast_issues
        - sca_issues
        - vms_scan_configs
        - vulnerabilities
        - resources
        - vulnerability_findings_v2
        - grc_entity
        - grc_control
        - grc_evidence
        - grc_assessment_question
        - grc_assessment
        - tprm_company
        - tprm_finding
        - findings
        - itsm_users
        - itsm_groups
        - itsm_projects
        - itsm_tickets
        - itsm_attachments
        - itsm_comments
      title: DataExportTypesEnum
  securitySchemes:
    API-Key:
      type: apiKey
      in: header
      name: X-API-KEY

````