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

# List labels

> Lists labels in the authenticated account, newest first. Omitting `page_size` uses the default of 100. The maximum `page_size` is 1000. Negative `page_size` is rejected. Use `page_token` from the previous response to fetch the next page.



## OpenAPI

````yaml /openapi.json get /v1/labels
openapi: 3.0.0
info:
  title: Clavata Public API v1
  description: Endpoints for creating and managing jobs via the Clavata Public API.
  version: 1.0.0
  contact:
    name: Clavata.ai
    url: https://clavata.ai
    email: support@clavata.ai
servers:
  - url: https://gateway.app.clavata.ai:8443
security:
  - Bearer_Token: []
tags:
  - name: Public API
    description: Endpoints for creating and managing jobs via the Clavata Public API.
paths:
  /v1/labels:
    get:
      tags:
        - Labels
      summary: List labels
      description: >-
        Lists labels in the authenticated account, newest first. Omitting
        `page_size` uses the default of 100. The maximum `page_size` is 1000.
        Negative `page_size` is rejected. Use `page_token` from the previous
        response to fetch the next page.
      operationId: LabelsService_ListLabels
      parameters:
        - name: includeArchived
          description: Whether to include archived labels
          in: query
          required: false
          schema:
            type: boolean
        - name: pageSize
          description: >-
            Pagination: maximum number of items to return. When unset or 0,
            defaults to 100. Maximum 1000.
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: pageToken
          description: Pagination token for keyset pagination
          in: query
          required: false
          schema:
            type: string
        - name: tagIds
          description: >-
            Filter labels by tag IDs (returns labels that have any of the
            specified tags)
          in: query
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1ListLabelsResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
components:
  schemas:
    v1ListLabelsResponse:
      type: object
      properties:
        labels:
          type: array
          items:
            $ref: '#/components/schemas/sharedv1Label'
        nextPageToken:
          type: string
          description: Set when more labels remain after this page.
    rpcStatus:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/protobufAny'
    sharedv1Label:
      type: object
      properties:
        labelId:
          type: string
          title: The label ID as set in the database
        name:
          type: string
          title: The display name of the label
        customerId:
          type: string
          title: The customer ID that owns this label
        policyId:
          type: string
          title: The policy ID this label is scoped to (empty for independent labels)
        disabled:
          type: boolean
          title: If the label is disabled, it will not be used during evaluation
        created:
          type: string
          format: date-time
          title: The time the label was created
        updated:
          type: string
          format: date-time
          title: The time the label was updated
        expunged:
          type: boolean
          title: If the label is soft-deleted, this is set to true
        description:
          type: string
          title: Optional description for this label
        archivedAt:
          type: string
          format: date-time
          title: Time the label was archived (nil if not archived)
        tags:
          type: array
          items:
            $ref: '#/components/schemas/v1LabelTag'
          title: Tags associated with this label
        importProvenance:
          $ref: '#/components/schemas/v1LabelImportProvenance'
      description: >-
        Label is a first-class, referenceable label entity (V2).

        Labels can be policy-scoped (policy_id set) or independent (policy_id
        empty).

        Policy-scoped labels are uniquely identified by (customer_id, name,
        policy_id).

        Independent labels are uniquely identified by (customer_id, name).
    protobufAny:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties: {}
    v1LabelTag:
      type: object
      properties:
        labelTagId:
          type: string
          title: The tag ID
        customerId:
          type: string
          title: The customer ID that owns this tag
        name:
          type: string
          title: The tag name (case-insensitive unique per customer)
        color:
          type: string
          title: Optional hex color code (e.g., "#FF5733")
        created:
          type: string
          format: date-time
          title: When the tag was created
        updated:
          type: string
          format: date-time
          title: When the tag was last updated
        expunged:
          type: boolean
          title: If the tag is soft-deleted
      description: LabelTag represents an organizational tag for labels.
    v1LabelImportProvenance:
      type: object
      properties:
        libraryLabelId:
          type: string
          description: Opaque source library catalog id (library_labels.id).
        libraryVersionId:
          type: string
          description: >-
            The library label version id that was imported (the pinned published
            version).
        libraryName:
          type: string
          description: >-
            The library entry's display name at import time (denormalized for
            stable display).
        importedAt:
          type: string
          format: date-time
          description: When the original import happened.
      description: >-
        LabelImportProvenance records where a label's library-derived lineage
        began.

        Set on labels created via LabelLibraryService.ImportLibraryLabel and
        preserved

        on clones derived from them.
  securitySchemes:
    Bearer_Token:
      type: http
      scheme: bearer
      bearerFormat: JWT

````