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

# List template tag assignments

> Lists the ready assignments of one tag of the template, newest first, with keyset cursor pagination. Returns 404 when the template does not exist or belongs to another team.




## OpenAPI

````yaml /openapi-public.yaml get /templates/{templateID}/tags/{tag}/assignments
openapi: 3.1.0
info:
  title: E2B API
  version: 0.1.0
  description: >-
    Complete E2B developer API. Platform endpoints are served on api.e2b.app.
    Sandbox endpoints (envd) are served on the shared sandbox host
    (sandbox.e2b.app); target a specific sandbox with the E2b-Sandbox-Id and
    E2b-Sandbox-Port headers.
servers:
  - url: https://api.e2b.app
    description: E2B Platform API
security: []
tags:
  - name: Sandboxes
  - name: Templates
  - name: Tags
  - name: Volumes
  - name: Envd
  - name: Filesystem
  - name: Process
  - name: Teams
  - name: Secrets
  - name: Events
  - name: Webhooks
paths:
  /templates/{templateID}/tags/{tag}/assignments:
    servers:
      - url: https://api.e2b.app
        description: E2B Platform API
    get:
      tags:
        - Tags
      summary: List template tag assignments
      description: >
        Lists the ready assignments of one tag of the template, newest first,
        with keyset cursor pagination. Returns 404 when the template does not
        exist or belongs to another team.
      operationId: getTemplateTagAssignments
      parameters:
        - $ref: '#/components/parameters/templateID'
        - $ref: '#/components/parameters/tag'
        - $ref: '#/components/parameters/tagAssignmentsCursor'
        - $ref: '#/components/parameters/tagAssignmentsLimit'
      responses:
        '200':
          description: Successfully returned the tag assignments
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateTagAssignmentsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    format: int32
                    description: Error code
                    example: 400
                  error_code:
                    type: string
                    description: >-
                      Machine-readable semantic error code. Not a closed set;
                      initial values: sandbox_capacity_unavailable,
                      sandbox_placement_timeout, sandbox_no_compatible_node,
                      sandbox_create_failed (a node could not create the sandbox
                      this time; retry), sandbox_create_refused (a node refused
                      the sandbox for a reason no retry changes, such as a vcpu
                      count out of bounds in the stored build; a server error,
                      since no request field reaches that check),
                      internal_server_error, secret_limit_reached,
                      idempotency_request_mismatch, idempotency_in_progress,
                      idempotency_outcome_unknown.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                invalidTag:
                  summary: The tag contains an unsupported character
                  value:
                    code: 400
                    message: Invalid tag
                invalidCursor:
                  summary: The pagination cursor cannot be parsed
                  value:
                    code: 400
                    message: Invalid cursor
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    format: int32
                    description: Error code
                    example: 401
                  error_code:
                    type: string
                    description: >-
                      Machine-readable semantic error code. Not a closed set;
                      initial values: sandbox_capacity_unavailable,
                      sandbox_placement_timeout, sandbox_no_compatible_node,
                      sandbox_create_failed (a node could not create the sandbox
                      this time; retry), sandbox_create_refused (a node refused
                      the sandbox for a reason no retry changes, such as a vcpu
                      count out of bounds in the stored build; a server error,
                      since no request field reaches that check),
                      internal_server_error, secret_limit_reached,
                      idempotency_request_mismatch, idempotency_in_progress,
                      idempotency_outcome_unknown.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                missingAuthentication:
                  summary: No supported authentication header was supplied
                  value:
                    code: 401
                    message: authorization header is missing
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    format: int32
                    description: Error code
                    example: 403
                  error_code:
                    type: string
                    description: >-
                      Machine-readable semantic error code. Not a closed set;
                      initial values: sandbox_capacity_unavailable,
                      sandbox_placement_timeout, sandbox_no_compatible_node,
                      sandbox_create_failed (a node could not create the sandbox
                      this time; retry), sandbox_create_refused (a node refused
                      the sandbox for a reason no retry changes, such as a vcpu
                      count out of bounds in the stored build; a server error,
                      since no request field reaches that check),
                      internal_server_error, secret_limit_reached,
                      idempotency_request_mismatch, idempotency_in_progress,
                      idempotency_outcome_unknown.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                teamBanned:
                  summary: The team is banned at authentication
                  value:
                    code: 403
                    message: team is banned
        '404':
          description: Not found
          content:
            application/json:
              schema:
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    format: int32
                    description: Error code
                    example: 404
                  error_code:
                    type: string
                    description: >-
                      Machine-readable semantic error code. Not a closed set;
                      initial values: sandbox_capacity_unavailable,
                      sandbox_placement_timeout, sandbox_no_compatible_node,
                      sandbox_create_failed (a node could not create the sandbox
                      this time; retry), sandbox_create_refused (a node refused
                      the sandbox for a reason no retry changes, such as a vcpu
                      count out of bounds in the stored build; a server error,
                      since no request field reaches that check),
                      internal_server_error, secret_limit_reached,
                      idempotency_request_mismatch, idempotency_in_progress,
                      idempotency_outcome_unknown.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                templateNotFound:
                  summary: The template is missing, deleted or owned by another team
                  value:
                    code: 404
                    message: Template not found
        '429':
          description: Too many requests
          headers:
            Retry-After:
              description: >-
                When present, the number of seconds to wait before retrying the
                request.
              required: false
              schema:
                type: integer
                minimum: 0
              example: 30
            RateLimit-Limit:
              description: Configured rate-limit burst size.
              schema:
                type: integer
            RateLimit-Remaining:
              description: Requests remaining in the rate-limit window.
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the rate-limit window resets.
              schema:
                type: integer
          content:
            application/json:
              schema:
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    format: int32
                    description: Error code
                    example: 429
                  error_code:
                    type: string
                    description: >-
                      Machine-readable semantic error code. Not a closed set;
                      initial values: sandbox_capacity_unavailable,
                      sandbox_placement_timeout, sandbox_no_compatible_node,
                      sandbox_create_failed (a node could not create the sandbox
                      this time; retry), sandbox_create_refused (a node refused
                      the sandbox for a reason no retry changes, such as a vcpu
                      count out of bounds in the stored build; a server error,
                      since no request field reaches that check),
                      internal_server_error, secret_limit_reached,
                      idempotency_request_mismatch, idempotency_in_progress,
                      idempotency_outcome_unknown.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                rateLimitExceeded:
                  summary: A configured API rate limit was exceeded
                  value:
                    code: 429
                    message: Rate limit exceeded
        '500':
          description: Server error
          content:
            application/json:
              schema:
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    format: int32
                    description: Error code
                    example: 500
                  error_code:
                    type: string
                    description: >-
                      Machine-readable semantic error code. Not a closed set;
                      initial values: sandbox_capacity_unavailable,
                      sandbox_placement_timeout, sandbox_no_compatible_node,
                      sandbox_create_failed (a node could not create the sandbox
                      this time; retry), sandbox_create_refused (a node refused
                      the sandbox for a reason no retry changes, such as a vcpu
                      count out of bounds in the stored build; a server error,
                      since no request field reaches that check),
                      internal_server_error, secret_limit_reached,
                      idempotency_request_mismatch, idempotency_in_progress,
                      idempotency_outcome_unknown.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                operationFailed:
                  summary: Listing template tag assignments fails
                  value:
                    code: 500
                    message: Error when getting template tag assignments
      security:
        - ApiKeyAuth: []
components:
  parameters:
    templateID:
      name: templateID
      in: path
      required: true
      schema:
        type: string
    tag:
      name: tag
      in: path
      required: true
      schema:
        type: string
        description: Tag name
    tagAssignmentsCursor:
      name: cursor
      in: query
      required: false
      description: >-
        Cursor returned by the previous list response in
        `assigned_at|assignment_id` format.
      schema:
        type: string
    tagAssignmentsLimit:
      name: limit
      in: query
      required: false
      description: Maximum number of assignment rows to return per page.
      schema:
        type: integer
        format: int32
        minimum: 1
        maximum: 100
        default: 50
  schemas:
    TemplateTagAssignmentsResponse:
      type: object
      required:
        - data
        - nextCursor
      properties:
        data:
          type: array
          description: Ready assignment events for the tag, sorted latest first.
          items:
            $ref: '#/components/schemas/TemplateTagAssignment'
        nextCursor:
          type:
            - string
            - 'null'
          description: >-
            Cursor to pass to the next list request, or `null` if there is no
            next page.
    TemplateTagAssignment:
      type: object
      required:
        - assignmentId
        - buildId
        - assignedAt
        - buildCreatedAt
        - buildFinishedAt
      properties:
        assignmentId:
          type: string
          format: uuid
          description: Identifier of the tag assignment event.
        buildId:
          type: string
          format: uuid
          description: Identifier of the assigned build.
        assignedAt:
          type: string
          format: date-time
          description: Time when the tag was assigned to the build.
        buildCreatedAt:
          type: string
          format: date-time
          description: Time when the assigned build was created.
        buildFinishedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: Time when the assigned build finished.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````