> ## 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 groups

> Lists the template's tags that have at least one ready build, each with its most recent ready assignments, paginated over tags with a keyset cursor. Returns 404 when the template does not exist or belongs to another team.




## OpenAPI

````yaml /openapi-public.yaml get /templates/{templateID}/tags/groups
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/groups:
    servers:
      - url: https://api.e2b.app
        description: E2B Platform API
    get:
      tags:
        - Tags
      summary: List template tag groups
      description: >
        Lists the template's tags that have at least one ready build, each with
        its most recent ready assignments, paginated over tags with a keyset
        cursor. Returns 404 when the template does not exist or belongs to
        another team.
      operationId: getTemplateTagsGroups
      parameters:
        - $ref: '#/components/parameters/templateID'
        - $ref: '#/components/parameters/tagAssignmentLimit'
        - $ref: '#/components/parameters/tagGroupsLimit'
        - $ref: '#/components/parameters/tagGroupsCursor'
        - $ref: '#/components/parameters/tagGroupsSearch'
        - $ref: '#/components/parameters/tagGroupsSort'
      responses:
        '200':
          description: Successfully returned template tag groups
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateTagGroupsResponse'
        '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:
                invalidCursor:
                  summary: The pagination cursor cannot be parsed
                  value:
                    code: 400
                    message: Invalid cursor
                cursorSortMismatch:
                  summary: The cursor was issued for a different sort
                  value:
                    code: 400
                    message: >-
                      Cursor was issued for a different sort; clear the cursor
                      and restart
        '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 groups fails
                  value:
                    code: 500
                    message: Error when getting template tag groups
      security:
        - ApiKeyAuth: []
components:
  parameters:
    templateID:
      name: templateID
      in: path
      required: true
      schema:
        type: string
    tagAssignmentLimit:
      name: assignmentLimit
      in: query
      required: false
      description: Maximum number of ready assignment rows to return per tag.
      schema:
        type: integer
        format: int32
        minimum: 1
        maximum: 25
        default: 6
    tagGroupsLimit:
      name: tagsLimit
      in: query
      required: false
      description: Maximum number of distinct tags to return per page.
      schema:
        type: integer
        format: int32
        minimum: 1
        maximum: 100
        default: 25
    tagGroupsCursor:
      name: tagsCursor
      in: query
      required: false
      description: >-
        Cursor returned by the previous list response in
        `{sort}|{latest_assigned_at}|{tag}` format (sort-tagged, RFC3339Nano).
      schema:
        type: string
    tagGroupsSearch:
      name: search
      in: query
      required: false
      description: >-
        Substring filter on tag name. Allowed characters are `a-z`, `0-9`, `.`,
        `_`, `-`.
      schema:
        type: string
        maxLength: 64
        pattern: ^[a-z0-9._-]*$
    tagGroupsSort:
      name: sort
      in: query
      required: false
      description: Sort order for the returned tag groups.
      schema:
        type: string
        enum:
          - latest_desc
          - latest_asc
          - name_asc
          - name_desc
        default: latest_desc
  schemas:
    TemplateTagGroupsResponse:
      type: object
      required:
        - tags
        - nextCursor
      properties:
        tags:
          type: array
          items:
            $ref: '#/components/schemas/TemplateTagGroup'
        nextCursor:
          type:
            - string
            - 'null'
          description: >-
            Cursor to pass as `tagsCursor` for the next page, or `null` if there
            is no next page.
    TemplateTagGroup:
      type: object
      required:
        - tag
        - assignments
        - hasMore
      properties:
        tag:
          type: string
          description: Template tag name.
        assignments:
          type: array
          description: Ready assignment events for this tag, sorted latest first.
          items:
            $ref: '#/components/schemas/TemplateTagAssignment'
        hasMore:
          type: boolean
          description: >-
            Whether more ready assignment events exist beyond the requested
            assignment limit.
    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

````