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

# List workflow branches

> Returns a workflow's branches, oldest first. `is_default` marks the branch runs use when they don't pin a version or branch.

Pass a branch's `id` as `workflow_branch_id` on `POST /run`, or as `branch_id` on `GET /workflows/{workflow_id}` and `GET /workflows/{workflow_id}/metadata`.



## OpenAPI

````yaml workflow-api/workflow-api.yaml get /workflows/{workflow_id}/branches
openapi: 3.0.0
info:
  title: Workflow API
  version: 1.0.0
  description: API for managing workflows and their metadata
servers:
  - url: https://api.cloudcruise.com
    description: CloudCruise Platform Production API Server
security:
  - AuthScheme: []
paths:
  /workflows/{workflow_id}/branches:
    get:
      summary: List workflow branches
      description: >-
        Returns a workflow's branches, oldest first. `is_default` marks the
        branch runs use when they don't pin a version or branch.


        Pass a branch's `id` as `workflow_branch_id` on `POST /run`, or as
        `branch_id` on `GET /workflows/{workflow_id}` and `GET
        /workflows/{workflow_id}/metadata`.
      operationId: listWorkflowBranches
      parameters:
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: The ID of the workflow
        - name: cc-key
          in: header
          required: false
          schema:
            type: string
          description: CloudCruise API key for authentication
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WorkflowBranch'
        '401':
          description: Unauthorized - Invalid or missing authentication
        '404':
          description: Workflow not found
        '500':
          description: Internal server error
components:
  schemas:
    WorkflowBranch:
      type: object
      description: A workflow branch. Returned by `GET /workflows/{workflow_id}/branches`.
      properties:
        id:
          type: string
          format: uuid
          description: UUID of the branch
        workflow_id:
          type: string
          format: uuid
          description: ID of the workflow the branch belongs to
        name:
          type: string
          example: main
          description: Branch name, unique per workflow
        is_default:
          type: boolean
          description: Whether this is the workflow's default branch
        head_version_id:
          type: string
          format: uuid
          description: UUID of the branch's latest version
        created_by:
          type: string
          format: uuid
          description: ID of the user who created the branch
        created_at:
          type: string
          format: date-time
          description: Timestamp when the branch was created
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the branch last changed
      required:
        - id
        - workflow_id
        - name
        - is_default
        - head_version_id
        - created_at
  securitySchemes:
    AuthScheme:
      type: apiKey
      name: cc-key
      in: header
      description: >-
        API key-based authentication. Provide your CloudCruise API key in the
        cc-key header.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.