> ## Documentation Index
> Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-toolre-1772123259-dfebfdb.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Register a Private Container Registry

> Register a private container registry for pulling sandbox images.

Provide the registry URL, username, and password (or access token).
The backend builds the K8s dockerconfigjson secret internally.

The registry can then be referenced in sandbox templates via the
`registry_name` field to pull images from private registries.



## OpenAPI

````yaml https://api.host.langchain.com/openapi.json post /v2/sandboxes/registries
openapi: 3.1.0
info:
  title: LangSmith Deployment Control Plane API
  description: >
    The LangSmith Deployment Control Plane API is used to programmatically
    create and manage

    Agent Server deployments. For example, the APIs can be orchestrated to

    create custom CI/CD workflows.


    ## Host

    https://api.host.langchain.com


    ## Authentication

    To authenticate with the LangSmith Deployment Control Plane API, set the
    `X-Api-Key` header

    to a valid [LangSmith API
    key](https://docs.langchain.com/langsmith/create-account-api-key#create-an-api-key).


    ## Versioning

    Each endpoint path is prefixed with a version (e.g. `v1`, `v2`).


    ## Quick Start

    1. Call `POST /v2/deployments` to create a new Deployment. The response body
    contains the Deployment ID (`id`) and the ID of the latest (and first)
    revision (`latest_revision_id`).

    1. Call `GET /v2/deployments/{deployment_id}` to retrieve the Deployment.
    Set `deployment_id` in the URL to the value of Deployment ID (`id`).

    1. Poll for revision `status` until `status` is `DEPLOYED` by calling `GET
    /v2/deployments/{deployment_id}/revisions/{latest_revision_id}`.

    1. Call `PATCH /v2/deployments/{deployment_id}` to update the deployment.
  version: 0.1.0
servers: []
security: []
paths:
  /v2/sandboxes/registries:
    post:
      tags:
        - Sandboxes (v2)
      summary: Register a Private Container Registry
      description: |-
        Register a private container registry for pulling sandbox images.

        Provide the registry URL, username, and password (or access token).
        The backend builds the K8s dockerconfigjson secret internally.

        The registry can then be referenced in sandbox templates via the
        `registry_name` field to pull images from private registries.
      operationId: create_registry_v2_sandboxes_registries_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegistryCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegistryResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              example:
                detail:
                  error: BadRequest
                  message: Error description.
        '409':
          description: Conflict
          content:
            application/json:
              example:
                detail:
                  error: Conflict
                  message: Resource already exists.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - API Key: []
        - Tenant ID: []
        - Bearer Auth: []
components:
  schemas:
    RegistryCreate:
      properties:
        name:
          type: string
          title: Name
          description: >-
            Name of the registry (max 63 chars, DNS-1035 format: lowercase
            alphanumeric and hyphens, must start with letter)
        url:
          type: string
          title: Url
          description: Registry URL (e.g. https://index.docker.io/v1/, ghcr.io)
          examples:
            - https://index.docker.io/v1/
        username:
          type: string
          title: Username
          description: Username for authenticating with the registry
        password:
          type: string
          title: Password
          description: Password or access token for authenticating with the registry
      type: object
      required:
        - name
        - url
        - username
        - password
      title: RegistryCreate
      description: |-
        Request model for registering a private container registry.

        Accepts structured credential fields. The backend constructs the
        ``.dockerconfigjson`` K8s secret internally.
    RegistryResponse:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
          description: Unique registry identifier
        name:
          type: string
          title: Name
        url:
          type: string
          title: Url
          description: Primary registry URL extracted from docker config
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
      type: object
      required:
        - name
        - url
      title: RegistryResponse
      description: |-
        Response model for a private container registry.

        Credentials are never included in responses.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````