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

# Get Workflow Labels

List all release labels for a workflow. Returns each label with its name, ID, and the version it points to.

This mirrors the [Get Prompt Template Labels](/reference/templates-labels-get) endpoint.


## OpenAPI

````yaml GET /workflows/{workflow_id_or_name}/labels
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security:
  - ApiKeyAuth: []
paths:
  /workflows/{workflow_id_or_name}/labels:
    get:
      tags:
        - workflow
        - release-labels
      summary: Get Agent Labels
      operationId: getWorkflowLabels
      parameters:
        - name: workflow_id_or_name
          in: path
          required: true
          schema:
            type: string
          description: The agent ID or name.
      responses:
        '200':
          description: Labels retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  release_labels:
                    type: array
                    items:
                      type: object
                      properties:
                        release_label:
                          type: string
                          description: Label name (e.g. 'prod', 'staging')
                        release_label_id:
                          type: integer
                          description: Unique identifier for the label
                        workflow_version_id:
                          type: integer
                          description: Version ID this label points to
                        workflow_version_number:
                          type: integer
                          description: Version number this label points to
                      required:
                        - release_label
                        - release_label_id
                        - workflow_version_id
                        - workflow_version_number
                required:
                  - success
                  - release_labels
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          description: Agent not found
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  responses:
    UnauthorizedError:
      description: Unauthorized - missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ValidationError:
      description: Validation error - request parameters or body are invalid.
      content:
        application/json:
          schema:
            oneOf:
              - $ref: '#/components/schemas/HTTPValidationError'
              - $ref: '#/components/schemas/ErrorResponse'
  schemas:
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          default: false
          description: Indicates that the request failed.
        message:
          type: string
          description: Human-readable error message.
        error:
          type: string
          description: Machine-readable or fallback error message.
      additionalProperties: true
      description: >-
        Standard error response. Some legacy endpoints may return either message
        or error.
    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
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````