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

# List Workflows

Get a list of all workflows in the system.


## OpenAPI

````yaml GET /workflows
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security:
  - ApiKeyAuth: []
paths:
  /workflows:
    get:
      tags:
        - workflow
      summary: List Workflows
      operationId: listWorkflows
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
          description: Page number for pagination.
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 30
          description: Number of items per page.
        - name: created_by_email
          in: query
          required: false
          schema:
            type: string
          description: Filter by the creator's email address.
        - name: created_after
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: Filter resources created at or after this timestamp.
        - name: created_before
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: Filter resources created at or before this timestamp.
        - name: updated_after
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: Filter resources updated at or after this timestamp.
        - name: updated_before
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: Filter resources updated at or before this timestamp.
        - name: external_source
          in: query
          required: false
          schema:
            type: string
          description: External ID source to filter by. Must be provided with external_id.
        - name: external_id
          in: query
          required: false
          schema:
            type: string
          description: >-
            External ID value to filter by. Must be provided with
            external_source.
        - name: sort_by
          in: query
          required: false
          schema:
            type: string
            enum:
              - created_at
              - updated_at
              - name
              - id
          description: Sort field.
        - name: sort_order
          in: query
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
          description: Sort direction.
      responses:
        '200':
          description: List of workflows retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Unique identifier for the workflow
                        workspace_id:
                          type: integer
                          description: ID of the workspace this workflow belongs to
                        user_id:
                          type: integer
                          nullable: true
                          description: ID of the user who created this workflow
                        name:
                          type: string
                          description: Name of the workflow
                        is_deleted:
                          type: boolean
                          description: Whether the workflow is deleted
                        latest_version_number:
                          type: integer
                          nullable: true
                          description: The latest version number of the workflow
                        release_labels:
                          type: array
                          items:
                            type: string
                          description: >-
                            Array of release label names associated with the
                            workflow
                        external_ids:
                          type: array
                          items:
                            $ref: '#/components/schemas/ExternalId'
                          description: External ID mappings attached to this workflow.
                      required:
                        - id
                        - workspace_id
                        - name
                        - is_deleted
                        - release_labels
                  page:
                    type: integer
                    description: Current page number
                  per_page:
                    type: integer
                    description: Number of items per page
                  total:
                    type: integer
                    nullable: true
                    description: Total number of items
                  pages:
                    type: integer
                    description: Total number of pages
                  has_next:
                    type: boolean
                    description: Whether there is a next page
                  has_prev:
                    type: boolean
                    description: Whether there is a previous page
                  next_num:
                    type: integer
                    nullable: true
                    description: Next page number if available
                  prev_num:
                    type: integer
                    nullable: true
                    description: Previous page number if available
                required:
                  - items
                  - page
                  - per_page
                  - pages
                  - has_next
                  - has_prev
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Invalid pagination parameters
                required:
                  - success
                  - message
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Invalid API key
                required:
                  - success
                  - message
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  schemas:
    ExternalId:
      properties:
        source:
          type: string
          maxLength: 128
          minLength: 1
          title: Source
          description: The external system or namespace that owns the ID.
        external_id:
          type: string
          maxLength: 512
          minLength: 1
          title: External Id
          description: The identifier for this entity in the external system.
      type: object
      required:
        - source
        - external_id
      additionalProperties: false
      title: ExternalId
      description: >-
        Customer-defined mapping between a PromptLayer entity and an external
        system identifier.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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.
    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
  responses:
    ValidationError:
      description: Validation error - request parameters or body are invalid.
      content:
        application/json:
          schema:
            oneOf:
              - $ref: '#/components/schemas/HTTPValidationError'
              - $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````