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

# Create a container registry



## OpenAPI

````yaml /api-reference/openapi.yaml post /organization/{organizationId}/containerRegistry
openapi: 3.0.0
info:
  version: 1.0.4
  title: Qovery API
  description: >
    - Qovery is the fastest way to deploy your full-stack apps on any Cloud
    provider.

    - ℹ️ The API is stable and still in development.
  contact:
    name: Qovery Product Team
    url: https://www.qovery.com
    email: support+api+documentation@qovery.com
  x-logo:
    url: https://console.qovery.com/assets/logos/logo-white.svg
    altText: Qovery
servers:
  - url: https://api.qovery.com
security:
  - bearerAuth: []
  - ApiKeyAuth: []
tags:
  - name: Account
  - name: Account Info
  - name: Alert Receivers
  - name: Alert Rules
  - name: Admin
  - name: ArgoCD
  - name: Application
  - name: Application Actions
  - name: Application Configuration
  - name: Application Database
  - name: Application Deployment Restriction
  - name: Application Deployment History
  - name: Application Environment Variable
  - name: Application Logs
  - name: Application Main Calls
  - name: Application Secret
  - name: Application Annotations Group
  - name: Applications
  - name: AutoscalingPolicy
  - name: Container
  - name: Container Actions
  - name: Container Configuration
  - name: Container Database
  - name: Container Deployment History
  - name: Container Environment Variable
  - name: Container Logs
  - name: Container Main Calls
  - name: Container Registry
  - name: Container Secret
  - name: Container Annotations Group
  - name: Containers
  - name: Deployment Stage Main Calls
  - name: Job
  - name: Job Actions
  - name: Job Configuration
  - name: Job Database
  - name: Job Deployment Restriction
  - name: Job Deployment History
  - name: Job Environment Variable
  - name: Job Logs
  - name: Job Main Calls
  - name: Job Registry
  - name: Job Secret
  - name: Job Annotations Group
  - name: Jobs
  - name: KedaTriggerAuthentication
  - name: Helm
  - name: Helm Actions
  - name: Helm Configuration
  - name: Helm Database
  - name: Helm Deployment Restriction
  - name: Helm Deployment History
  - name: Helm Logs
  - name: Helm Main Calls
  - name: Helm Repository
  - name: Helms
  - name: Backups
  - name: Billing
  - name: Cloud Provider
  - name: Cloud Provider Credentials
  - name: Clusters
  - name: Custom Domain
  - name: Container Custom Domain
  - name: Database
  - name: Database Actions
  - name: Database Application
  - name: Database Container
  - name: Database Deployment History
  - name: Database Main Calls
  - name: Database Annotations Group
  - name: Databases
  - name: Environment
  - name: Environment Actions
  - name: Environment Deployment History
  - name: Environment Deployment Rule
  - name: Environment Logs
  - name: Environment Main Calls
  - name: Environment Secret
  - name: Environment Variable
  - name: Environments
  - name: Git
  - name: Github App
  - name: Git repositories
  - name: Members
  - name: Organization
  - name: Organization Account Git Repositories
  - name: Organization Cluster Lock
  - name: Organization Main Calls
  - name: Organization Custom Role
  - name: Organization Event
  - name: Organization Api Token
  - name: Organization Webhook
  - name: Organization Annotations Group
  - name: Organization Labels Group
  - name: Organization Enterprise Connection
  - name: Project
  - name: Project Deployment Rule
  - name: Project Environment Variable
  - name: Project Main Calls
  - name: Project Secret
  - name: Projects
  - name: Referral & Rewards
  - name: Secret Manager Access
  - name: Terraforms
  - name: Terraform Main Calls
  - name: Terraform Resources
  - name: Terraform Deployment History
  - name: Terraform Deployment Restriction
  - name: Container Registries
  - name: Helm Repositories
  - name: User Sign Up
  - name: Variable Main Calls
  - name: Helm Custom Domain
  - name: Lifecycle Template Main Calls
paths:
  /organization/{organizationId}/containerRegistry:
    post:
      tags:
        - Container Registries
      summary: Create a container registry
      operationId: createContainerRegistry
      parameters:
        - $ref: '#/components/parameters/organizationId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContainerRegistryRequest'
      responses:
        '201':
          description: Create a Container Registry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContainerRegistryResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
components:
  parameters:
    organizationId:
      name: organizationId
      in: path
      description: Organization ID
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    ContainerRegistryRequest:
      type: object
      required:
        - name
        - kind
        - config
      properties:
        name:
          type: string
        kind:
          $ref: '#/components/schemas/ContainerRegistryKindEnum'
        description:
          type: string
        url:
          type: string
          format: uri
          description: >
            URL of the container registry:

            * For `DOCKER_HUB`: it must be `https://docker.io` (default with
            'https://docker.io' if no url provided for `DOCKER_HUB`)

            * For `GITHUB_CR`: it must be `https://ghcr.io` (default with
            'https://ghcr.io' if no url provided for `GITHUB_CR`)

            * For `GITLAB_CR`: it must be `https://registry.gitlab.com` (default
            with 'https://registry.gitlab.com' if no url provided for
            `GITLAB_CR`)

            * For others: it's required and must start by `https://`
        config:
          type: object
          description: >
            This field is dependent of the container registry kind:

            * `ECR` needs in the config: region, access_key_id,
            secret_access_key

            * `SCALEWAY_CR` needs in the config: region, scaleway_access_key,
            scaleway_secret_key

            * `GCP_ARTIFACT_REGISTRY` needs in the config: region,
            json_credentials

            * `DOCKER_HUB` needs in the config (optional): username, password

            * `GITHUB_CR` needs in the config (optional): username, password

            * `GITLAB_CR` needs in the config (optional): username, password

            * `PUBLIC_ECR` doesn't need credentials info

            * `GENERIC_CR` needs in the config (optional): username, password

            * `DOCR` is not supported anymore
          properties:
            access_key_id:
              type: string
              description: Required if kind is `ECR` or `PUBLIC_ECR`
            secret_access_key:
              type: string
              description: Required if kind is `ECR` or `PUBLIC_ECR`
            region:
              type: string
              description: Required if kind is `ECR` or `SCALEWAY_CR`
            scaleway_access_key:
              type: string
              description: Required if kind is `SCALEWAY_CR`
            scaleway_secret_key:
              type: string
              description: Required if kind is `SCALEWAY_CR`
            scaleway_project_id:
              type: string
              x-stoplight:
                id: eomu5mjvhi6uu
              description: Required if kind is `SCALEWAY_CR`
            json_credentials:
              type: string
              description: Required if kind is `GCP_ARTIFACT_REGISTRY`
            username:
              type: string
              description: >
                optional, for kind `DOCKER_HUB`  

                We encourage you to set credentials for Docker Hub due to the
                limits on the pull rate
            password:
              type: string
              description: >
                optional, for kind `DOCKER_HUB`  

                We encourage you to set credentials for Docker Hub due to the
                limits on the pull rate
            role_arn:
              type: string
              x-stoplight:
                id: mzi9w1zsswj47
              description: >-
                For ECR, you can either set a static access_key or use a role
                arn that we are going to assume
            azure_tenant_id:
              type: string
              x-stoplight:
                id: zjybtgippp0k2
              description: Required if kind is `AZURE_CR`.
            azure_subscription_id:
              type: string
              x-stoplight:
                id: eaqm4swmqt9ty
              description: Required if kind is `AZURE_CR`.
    ContainerRegistryResponse:
      allOf:
        - $ref: '#/components/schemas/Base'
        - type: object
          properties:
            name:
              type: string
            kind:
              $ref: '#/components/schemas/ContainerRegistryKindEnum'
            description:
              type: string
            url:
              type: string
              description: URL of the container registry
            cluster:
              type: object
              required:
                - id
                - name
              properties:
                id:
                  type: string
                  x-stoplight:
                    id: y0l22s5yhh4ez
                  format: uuid
                name:
                  type: string
                  x-stoplight:
                    id: 5jak2m85ljxaa
            associated_services_count:
              type: integer
              x-stoplight:
                id: 02mqr04rogfem
              description: The number of services using this container registry
            config:
              type: object
              x-stoplight:
                id: s9rg5wox9j00z
              properties:
                username:
                  type: string
                  x-stoplight:
                    id: 9g2hk57o11s8k
                region:
                  type: string
                  x-stoplight:
                    id: fo0nnlsnrdn0k
                scaleway_access_key:
                  type: string
                  x-stoplight:
                    id: fdb55y4vnpndk
                scaleway_project_id:
                  type: string
                  x-stoplight:
                    id: ra9oc489c2wyt
                access_key_id:
                  type: string
                  x-stoplight:
                    id: s5elye0gv4lks
                role_arn:
                  type: string
                  x-stoplight:
                    id: iusxfgcmg72tl
                azure_tenant_id:
                  type: string
                  x-stoplight:
                    id: obk7v9hlx3jv4
                azure_subscription_id:
                  type: string
                  x-stoplight:
                    id: nrvn3j8xq81da
                azure_application_id:
                  type: string
                  x-stoplight:
                    id: t4jvfihz1ml04
                azure_application_object_id:
                  type: string
                  x-stoplight:
                    id: 2soynl0stz0lh
    ContainerRegistryKindEnum:
      type: string
      enum:
        - ECR
        - SCALEWAY_CR
        - DOCKER_HUB
        - GITHUB_CR
        - GITHUB_ENTERPRISE_CR
        - GITLAB_CR
        - PUBLIC_ECR
        - DOCR
        - GENERIC_CR
        - GCP_ARTIFACT_REGISTRY
        - AZURE_CR
      description: The type of your container registry
    Base:
      type: object
      required:
        - id
        - created_at
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        created_at:
          type: string
          readOnly: true
          format: date-time
        updated_at:
          type: string
          readOnly: true
          format: date-time
  responses:
    '400':
      description: Bad request
    '401':
      description: Access token is missing or invalid
    '403':
      description: Access forbidden
    '404':
      description: Resource not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT tokens should be used with OIDC account (human to machine). JWT
        tokens used by the Qovery console to communicate with the API have a
        TTL. Curl Example ' curl https://console.qovery.com/organization -H
        "Authorization: Bearer $qovery_token" '
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Token API are generated by Qovery to manage machine to machine
        interaction and do not have a TTL. Curl Example ' curl
        https://console.qovery.com/organization -H "Authorization: Token
        $qovery_token" '

````