> ## Documentation Index
> Fetch the complete documentation index at: https://runpod-b18f5ded-investigate-404-issue.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Register an ECR delegation



## OpenAPI

````yaml /api-reference-v2/openapi.json post /v2/registries/delegations
openapi: 3.1.0
info:
  title: Runpod REST API
  version: 2.0.0
  description: Runpod public REST API — v2
servers:
  - url: https://api.runpod.io
    description: Runpod API v2 production server
security:
  - bearerAuth: []
tags:
  - name: Pods
    description: GPU and CPU pod lifecycle, configuration, actions, and log streaming.
  - name: Serverless
    description: >-
      Serverless endpoint lifecycle, worker visibility, releases, and worker log
      streaming.
  - name: Templates
    description: Reusable pod and endpoint configuration templates.
  - name: Network Volumes
    description: Persistent network storage volumes for workloads.
  - name: Registries
    description: Container registry credentials used to pull private images.
  - name: Catalog
    description: Available GPU, CPU, and data center catalog metadata.
  - name: Billing
    description: Billing history and usage cost records across resource types.
paths:
  /v2/registries/delegations:
    post:
      tags:
        - Registries
      summary: Register an ECR delegation
      operationId: createDelegation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDelegationRequest'
      responses:
        '201':
          description: Delegation created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EcrDelegation'
        '429':
          $ref: '#/components/responses/TooManyRequestsError'
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CreateDelegationRequest:
      type: object
      additionalProperties: false
      required:
        - resource
      properties:
        resource:
          type: string
          description: ECR resource ARN
          examples:
            - arn:aws:ecr:us-east-2:418399314813:repository/runpod/deployment
        name:
          type:
            - string
            - 'null'
          description: Optional name for the delegation
          examples:
            - my-delegation
    EcrDelegation:
      type: object
      required:
        - id
        - delegatorUserId
        - awsUser
        - repository
        - tag
        - awsRegion
        - createdAt
      properties:
        id:
          type: string
          description: Delegation identifier
          examples:
            - deleg_abc123
        name:
          type:
            - string
            - 'null'
          description: Optional name for the delegation
          examples:
            - my-delegation
        delegatorUserId:
          type: string
          description: User ID that created the delegation
          examples:
            - user_xyz
        awsUser:
          type: string
          description: AWS user/role being delegated
          examples:
            - '123456789'
        repository:
          type: string
          description: ECR repository name
          examples:
            - runpod/deployment
        tag:
          type: string
          description: ECR image tag
          examples:
            - latest
        awsRegion:
          type: string
          description: AWS region
          examples:
            - us-east-2
        dockerRegistryUri:
          type: string
          description: Formatted ECR registry URI for Docker login
          examples:
            - 123456789.dkr.ecr.us-east-2.amazonaws.com
        createdAt:
          type: string
          format: date-time
          description: When the delegation was created
          examples:
            - '2026-03-13T20:00:00Z'
    ErrorResponse:
      type: object
      required:
        - title
        - status
        - detail
      properties:
        title:
          type: string
          description: Short human-readable summary
          examples:
            - Not Found
        status:
          type: integer
          description: HTTP status code
          examples:
            - 404
        detail:
          type: string
          description: Human-readable explanation
          examples:
            - pod not found
        errors:
          type: array
          description: Individual request-validation failures.
          items:
            type: string
          examples:
            - - '$: additional properties ''bogus'' not allowed'
  responses:
    TooManyRequestsError:
      description: >
        The caller exceeded its per-user rate limit. The response identifies the
        window that was exceeded and how long to wait. The `RateLimit` and
        `RateLimit-Policy` headers (per the IETF ratelimit-headers draft) also
        accompany successful responses, so clients can track quota before a 429.
      headers:
        Retry-After:
          description: Seconds to wait before retrying, per the exceeded window.
          schema:
            type: integer
          example: 12
        RateLimit:
          description: >
            Live per-window state as a structured-field list — one member per
            window (`minute`, `hour`, `day`) with remaining count `r` and
            seconds-until-reset `t`.
          schema:
            type: string
          example: '"minute";r=0;t=12, "hour";r=2800;t=1812, "day";r=49500;t=45012'
        RateLimit-Policy:
          description: >
            Static quota policy as a structured-field list — one member per
            window with quota `q` and window length `w` (seconds).
          schema:
            type: string
          example: '"minute";q=60;w=60, "hour";q=3000;w=3600, "day";q=50000;w=86400'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            rateLimited:
              summary: Rate limit exceeded
              value:
                title: Too Many Requests
                status: 429
                detail: rate limit exceeded for the minute window
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Runpod API Key
      description: >
        Runpod API key authentication. Generate an API key in the Runpod console
        and send it in the `Authorization` header as `Bearer <api_key>`. Keys
        are scoped to the permissions granted when created; requests may return
        `403` when a valid key lacks access to the requested resource or action.

````