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

# List Workflows

> List all workflows for the authenticated organization.

Supports pagination and returns workflows ordered by updated_at descending.

Use `tag_ids` to filter workflows that have ALL specified tags (AND logic).
Use `include=tags,post_run_checks` to include related workflow resources.
Legacy `include_tags=true` remains supported, but `include` wins when both are provided.



## OpenAPI

````yaml /openapi.json get /v1/workflows
openapi: 3.1.0
info:
  title: Cyberdesk Cloud
  description: >-
    The Cyberdesk API provides programmatic access to all platform features,
    enabling you to automate desktop tasks at scale.
  version: 1.0.0
servers:
  - url: https://api.cyberdesk.io
    description: Production server
  - url: https://cyberdesk-api-dev.fly.dev
    description: Development server
security: []
paths:
  /v1/workflows:
    get:
      tags:
        - workflows
      summary: List Workflows
      description: >-
        List all workflows for the authenticated organization.


        Supports pagination and returns workflows ordered by updated_at
        descending.


        Use `tag_ids` to filter workflows that have ALL specified tags (AND
        logic).

        Use `include=tags,post_run_checks` to include related workflow
        resources.

        Legacy `include_tags=true` remains supported, but `include` wins when
        both are provided.
      operationId: list_workflows_v1_workflows_get
      parameters:
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Search workflows by id or name (case-insensitive substring match)
            title: Search
          description: Search workflows by id or name (case-insensitive substring match)
        - name: created_at_from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: Filter workflows created at or after this ISO timestamp (UTC)
            title: Created At From
          description: Filter workflows created at or after this ISO timestamp (UTC)
        - name: created_at_to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: Filter workflows created at or before this ISO timestamp (UTC)
            title: Created At To
          description: Filter workflows created at or before this ISO timestamp (UTC)
        - name: updated_at_from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: Filter workflows updated at or after this ISO timestamp (UTC)
            title: Updated At From
          description: Filter workflows updated at or after this ISO timestamp (UTC)
        - name: updated_at_to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: Filter workflows updated at or before this ISO timestamp (UTC)
            title: Updated At To
          description: Filter workflows updated at or before this ISO timestamp (UTC)
        - name: tag_ids
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Comma-separated list of tag UUIDs. Returns workflows with ALL
              specified tags (AND logic).
            title: Tag Ids
          description: >-
            Comma-separated list of tag UUIDs. Returns workflows with ALL
            specified tags (AND logic).
        - name: include_tags
          in: query
          required: false
          schema:
            type: boolean
            description: Include tags in the response
            default: false
            title: Include Tags
          description: Include tags in the response
        - name: include
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Comma-separated list of related resources to include. Allowed
              values: tags, post_run_checks. If provided, overrides legacy
              include_tags.
            title: Include
          description: >-
            Comma-separated list of related resources to include. Allowed
            values: tags, post_run_checks. If provided, overrides legacy
            include_tags.
        - name: skip
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Skip
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            default: 100
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PaginatedResponseWithIncludes_WorkflowResponse_
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    PaginatedResponseWithIncludes_WorkflowResponse_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/WorkflowResponse'
          type: array
          title: Items
        total:
          type: integer
          title: Total
        skip:
          type: integer
          title: Skip
        limit:
          type: integer
          title: Limit
        included:
          anyOf:
            - items:
                $ref: '#/components/schemas/IncludedResource'
              type: array
            - type: 'null'
          title: Included
          description: Related resources requested via the `include` query parameter
      type: object
      required:
        - items
        - total
        - skip
        - limit
      title: PaginatedResponseWithIncludes[WorkflowResponse]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    WorkflowResponse:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Name
        main_prompt:
          type: string
          minLength: 1
          title: Main Prompt
        input_schema:
          anyOf:
            - type: string
            - type: 'null'
          title: Input Schema
          description: >-
            JSON schema for validating merged run inputs. Sensitive root keys
            are exposed with a '$' prefix in schema validation (for example
            sensitive_input_values.api_key -> '$api_key').
        output_schema:
          anyOf:
            - type: string
            - type: 'null'
          title: Output Schema
          description: JSON schema for output data transformation
        includes_file_exports:
          type: boolean
          title: Includes File Exports
          description: Enable AI-based file export detection
          default: false
        is_webhooks_enabled:
          type: boolean
          title: Is Webhooks Enabled
          description: Send webhook on run completion
          default: false
        terminal_command_allowlist:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Terminal Command Allowlist
          description: >-
            Optional workflow-level allowlist for execute_terminal_command. When
            set, the agent may only run commands that exactly match one of the
            approved command templates.
        model_metadata:
          anyOf:
            - $ref: '#/components/schemas/WorkflowModelMetadata'
            - type: 'null'
          description: >-
            Optional workflow-level model configuration metadata (main agent,
            cache detection, and fallbacks).
        post_run_check_failure_cleanup_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Post Run Check Failure Cleanup Prompt
          description: >-
            Optional workflow-level cleanup prompt that runs when any post-run
            check fails during a session or chain.
        id:
          type: string
          format: uuid
          title: Id
        user_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: User Id
        organization_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Organization Id
        includes_input_variables:
          type: boolean
          title: Includes Input Variables
          default: false
        workflow_metadata:
          anyOf:
            - $ref: '#/components/schemas/WorkflowInternalMetadata'
            - type: 'null'
          description: Internal workflow metadata used for run/error tracking.
        old_versions:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Old Versions
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        tags:
          anyOf:
            - items:
                $ref: '#/components/schemas/WorkflowTagResponse'
              type: array
            - type: 'null'
          title: Tags
          description: Tags assigned to this workflow
        post_run_checks:
          anyOf:
            - items:
                $ref: '#/components/schemas/WorkflowPostRunCheckResponse'
              type: array
            - type: 'null'
          title: Post Run Checks
          description: Post-run checks assigned to this workflow.
      type: object
      required:
        - main_prompt
        - id
        - created_at
        - updated_at
      title: WorkflowResponse
      description: Workflow response schema
    IncludedResource:
      properties:
        type:
          type: string
          title: Type
          description: Resource type (e.g., 'workflow', 'machine', 'pool')
        id:
          type: string
          format: uuid
          title: Id
          description: Resource UUID
      additionalProperties: true
      type: object
      required:
        - type
        - id
      title: IncludedResource
      description: >-
        A resource in the JSON:API-style included array.


        Each included resource has a `type` field indicating what kind of
        resource it is

        (e.g., "workflow", "machine", "pool") and an `id` field with the
        resource's UUID.

        All other fields from the resource's response model are included.


        Example:
            {
                "type": "workflow",
                "id": "550e8400-e29b-41d4-a716-446655440000",
                "name": "My Workflow",
                "main_prompt": "Do something...",
                "created_at": "2024-01-15T10:30:00Z"
            }
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          additionalProperties: true
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    WorkflowModelMetadata:
      properties:
        main_agent_model_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Main Agent Model Id
          description: >-
            ModelConfiguration.id used for the main agent. Null → Cyberdesk
            default.
        cache_detection_model_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Cache Detection Model Id
          description: >-
            ModelConfiguration.id used for cache detection. Null → Cyberdesk
            default.
        fallback_model_1_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Fallback Model 1 Id
          description: ModelConfiguration.id used as fallback 1 (global across agents).
        fallback_model_2_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Fallback Model 2 Id
          description: ModelConfiguration.id used as fallback 2 (global across agents).
      type: object
      title: WorkflowModelMetadata
      description: >-
        JSONB-backed workflow model configuration metadata.


        Stored on the Workflow row as `model_metadata` to avoid adding many FK
        columns.

        All fields are optional; when missing/null, the system falls back to
        Cyberdesk defaults.
    WorkflowInternalMetadata:
      properties:
        has_unaddressed_error:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Has Unaddressed Error
          description: True when at least one run has failed and remains unaddressed.
        last_errored_run_start:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Errored Run Start
          description: Start timestamp of the most recent errored/task_failed run.
        last_errored_run_uuid:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Last Errored Run Uuid
          description: Run UUID of the most recent errored/task_failed run.
      type: object
      title: WorkflowInternalMetadata
      description: Backend workflow metadata exposed read-only for internal observability.
    WorkflowTagResponse:
      properties:
        name:
          type: string
          maxLength: 100
          minLength: 1
          title: Name
        description:
          anyOf:
            - type: string
              maxLength: 500
            - type: 'null'
          title: Description
        emoji:
          anyOf:
            - type: string
              maxLength: 10
            - type: 'null'
          title: Emoji
        color:
          anyOf:
            - type: string
              maxLength: 20
            - type: 'null'
          title: Color
        group_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Group Id
          description: Optional group for mutual exclusivity
        id:
          type: string
          format: uuid
          title: Id
        organization_id:
          type: string
          title: Organization Id
        order:
          type: integer
          title: Order
        is_archived:
          type: boolean
          title: Is Archived
          default: false
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        workflow_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Workflow Count
          description: Number of workflows with this tag (returned in list endpoint)
        group:
          anyOf:
            - $ref: '#/components/schemas/WorkflowTagGroupResponse'
            - type: 'null'
          description: The group this tag belongs to
      type: object
      required:
        - name
        - id
        - organization_id
        - order
        - created_at
        - updated_at
      title: WorkflowTagResponse
      description: Workflow tag response schema
    WorkflowPostRunCheckResponse:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        type:
          $ref: '#/components/schemas/PostRunCheckType'
        file_target_mode:
          anyOf:
            - $ref: '#/components/schemas/PostRunCheckFileTargetMode'
            - type: 'null'
        file_names:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: File Names
        file_name_regex:
          anyOf:
            - type: string
            - type: 'null'
          title: File Name Regex
        expected_match_count:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Expected Match Count
        expected_match_count_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Expected Match Count Ref
        loop_input:
          anyOf:
            - type: string
            - type: 'null'
          title: Loop Input
        loop_item_filename_template:
          anyOf:
            - type: string
            - type: 'null'
          title: Loop Item Filename Template
        allow_missing_attachments:
          type: boolean
          title: Allow Missing Attachments
          default: false
        check_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Check Prompt
        model:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Model
          description: Optional ModelConfiguration id override for agentic post-run checks.
        id:
          type: string
          format: uuid
          title: Id
        organization_id:
          type: string
          title: Organization Id
        user_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: User Id
        order:
          type: integer
          title: Order
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - name
        - type
        - id
        - organization_id
        - order
        - created_at
        - updated_at
      title: WorkflowPostRunCheckResponse
      description: >-
        Workflow response shape for post-run checks, including workflow-specific
        order.
    WorkflowTagGroupResponse:
      properties:
        name:
          type: string
          maxLength: 100
          minLength: 1
          title: Name
        description:
          anyOf:
            - type: string
              maxLength: 500
            - type: 'null'
          title: Description
        emoji:
          anyOf:
            - type: string
              maxLength: 10
            - type: 'null'
          title: Emoji
        color:
          anyOf:
            - type: string
              maxLength: 20
            - type: 'null'
          title: Color
        id:
          type: string
          format: uuid
          title: Id
        organization_id:
          type: string
          title: Organization Id
        order:
          type: integer
          title: Order
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - name
        - id
        - organization_id
        - order
        - created_at
        - updated_at
      title: WorkflowTagGroupResponse
      description: Workflow tag group response schema
    PostRunCheckType:
      type: string
      enum:
        - run_attachment_exists
        - run_attachment_image_check
        - output_data_passes_schema_validation
        - output_data_agentic_check
      title: PostRunCheckType
    PostRunCheckFileTargetMode:
      type: string
      enum:
        - exact
        - regex
        - loop_items
      title: PostRunCheckFileTargetMode
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````