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

# Import a managed cluster

> Browser session authentication; RBAC permission `clusters.create`. For Kapsule, provider_cluster_id is the opaque region-qualified `regions/{region}/clusters/{id}` reference. CNI is immutable. Imported/unknown provenance is disconnect-only; provider deletion is allowed by default only for created clusters.



## OpenAPI

````yaml https://platform.ankra.app/openapi.json post /org/clusters/managed/{provider}/import
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://platform.ankra.app
security: []
paths:
  /org/clusters/managed/{provider}/import:
    post:
      tags:
        - Scaleway / Kapsule
      summary: Import a managed cluster
      description: >-
        Browser session authentication; RBAC permission `clusters.create`. For
        Kapsule, provider_cluster_id is the opaque region-qualified
        `regions/{region}/clusters/{id}` reference. CNI is immutable.
        Imported/unknown provenance is disconnect-only; provider deletion is
        allowed by default only for created clusters.
      operationId: managed_import_browser
      parameters:
        - in: path
          name: provider
          required: true
          schema:
            $ref: '#/components/schemas/ManagedProvider'
        - description: Must match the ankra_csrf browser cookie.
          in: header
          name: X-Ankra-CSRF
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ManagedImportRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedImportResponse'
          description: Successful response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Invalid request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Unauthenticated
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Permission or CSRF check failed
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Resource not found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Conflicting or unsafe lifecycle state
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Request validation failed
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Provider or internal failure
      security:
        - SessionCookie: []
components:
  schemas:
    ManagedProvider:
      enum:
        - doks
        - uks
        - gke
        - ovh_mks
        - aks
        - eks
        - kapsule
      example: kapsule
      type: string
    ManagedImportRequest:
      example:
        credential_id: aaaaaaaa-bbbb-4ccc-8ddd-eeeeeeeeeeee
        provider_cluster_id: regions/fr-par/clusters/11111111-2222-4333-8444-555555555555
      properties:
        credential_id:
          format: uuid
          type: string
        description:
          anyOf:
            - type: string
            - type: 'null'
        name:
          anyOf:
            - type: string
            - type: 'null'
        provider_cluster_id:
          type: string
      required:
        - provider_cluster_id
        - credential_id
      type: object
    ManagedImportResponse:
      properties:
        cluster_id:
          format: uuid
          type: string
        name:
          type: string
        provenance:
          $ref: '#/components/schemas/ManagedProvenance'
        provider_cluster_id:
          type: string
      required:
        - cluster_id
        - name
        - provider_cluster_id
        - provenance
      type: object
    ContractDetailError:
      example:
        detail: Cluster not found
      properties:
        detail:
          oneOf:
            - type: string
            - additionalProperties: true
              properties: {}
              type: object
      required:
        - detail
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ManagedProvenance:
      enum:
        - created
        - imported
        - unknown
      type: string
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    SessionCookie:
      description: Browser session. Mutations also require X-Ankra-CSRF.
      in: cookie
      name: ankra_session
      type: apiKey

````