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

# Get a workflow

> Get a single workflow together with a chosen slice of its related data: its details, its versions, one version in full, its run history, or one run in full.

**Example:** "Show me the details of the FAQ Suggester workflow"

**Usage:** give the workflow id and pick the slice with `view`: `detail` for the workflow itself, `versions` for its version history, `version_detail` for one version (needs the version id, and you can leave out the builder chat history), `runs` for its run history, or `run_detail` for one run (needs the run id). For runs you can filter by status, by where the run came from (a standalone playbook run, a grid cell, or a task), by a name search, or by when they were created, and the version and run lists come back in pages of up to 100 (50 by default).

**Response:** the workflow and whichever slice you asked for: its details, a list of versions, one version's step config and chat, a list of runs, or one run's status and progress.



## OpenAPI

````yaml https://mcp.agent.writesonic.com/openapi.json post /api/v1/business/workflows/get
openapi: 3.1.0
info:
  title: hq-backend — Business API
  description: Public business tool endpoints (API-key auth).
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/business/workflows/get:
    post:
      tags:
        - business
      summary: Get a workflow
      description: >-
        Get a single workflow together with a chosen slice of its related data:
        its details, its versions, one version in full, its run history, or one
        run in full.


        **Example:** "Show me the details of the FAQ Suggester workflow"


        **Usage:** give the workflow id and pick the slice with `view`: `detail`
        for the workflow itself, `versions` for its version history,
        `version_detail` for one version (needs the version id, and you can
        leave out the builder chat history), `runs` for its run history, or
        `run_detail` for one run (needs the run id). For runs you can filter by
        status, by where the run came from (a standalone playbook run, a grid
        cell, or a task), by a name search, or by when they were created, and
        the version and run lists come back in pages of up to 100 (50 by
        default).


        **Response:** the workflow and whichever slice you asked for: its
        details, a list of versions, one version's step config and chat, a list
        of runs, or one run's status and progress.
      operationId: get_workflow_api_v1_business_workflows_get_post
      parameters:
        - name: x-project-id
          in: header
          required: true
          schema:
            type: string
            format: uuid
            description: Project ID for tenant scoping
            title: X-Project-Id
          description: Project ID for tenant scoping
        - name: X-Workspace-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            description: Overrides the key's workspace
            title: X-Workspace-Id
          description: Overrides the key's workspace
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: User API key
            title: X-Api-Key
          description: User API key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowGetArgs'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    WorkflowGetArgs:
      properties:
        view:
          $ref: '#/components/schemas/WorkflowView'
          description: Which slice to return for the workflow
        workflow_id:
          type: string
          format: uuid
          title: Workflow Id
          description: Workflow id
        version_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Version Id
          description: Version id (required for view='version_detail')
        workflow_run_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Workflow Run Id
          description: Run id (required for view='run_detail')
        include_conversation:
          type: boolean
          title: Include Conversation
          description: >-
            Include builder conversation in version_detail; set false when the
            question only asks for the step config/graph and wants the chat
            history skipped.
          default: true
        run_status:
          anyOf:
            - items:
                $ref: '#/components/schemas/WorkflowRunStatus'
              type: array
            - type: 'null'
          title: Run Status
          description: Run status filter (view='runs')
        run_search:
          anyOf:
            - type: string
            - type: 'null'
          title: Run Search
          description: >-
            Match runs whose name contains this text, e.g. the 6-char suffix of
            a run name (view='runs')
        run_source:
          $ref: '#/components/schemas/RunHistorySource'
          description: >-
            Run source (view='runs'): 'playbook' for standalone runs (default -
            this filter applies even when left unset, so it only returns
            playbook-sourced runs), 'grid' for grid-cell runs, 'task' for
            task-triggered runs. run_search does not search across all sources
            by itself - check each run_source explicitly when the source is
            unknown.
          default: playbook
        run_sort_by:
          $ref: '#/components/schemas/WorkflowRunSortBy'
          description: Run sort field
          default: created_at
        sort_order:
          $ref: '#/components/schemas/SortOrder'
          description: Sort direction
          default: desc
        created_after:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created After
          description: Runs created at/after this time
        created_before:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created Before
          description: Runs created at/before this time
        page:
          type: integer
          minimum: 1
          title: Page
          description: 1-based page (versions/runs)
          default: 1
        size:
          type: integer
          maximum: 100
          minimum: 1
          title: Size
          description: Page size (versions/runs)
          default: 50
      type: object
      required:
        - view
        - workflow_id
      title: WorkflowGetArgs
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    WorkflowView:
      type: string
      enum:
        - detail
        - versions
        - version_detail
        - runs
        - run_detail
      title: WorkflowView
    WorkflowRunStatus:
      type: string
      enum:
        - pending
        - running
        - completed
        - failed
        - cancelled
        - awaiting_interaction
      title: WorkflowRunStatus
    RunHistorySource:
      type: string
      enum:
        - grid
        - playbook
        - task
      title: RunHistorySource
    WorkflowRunSortBy:
      type: string
      enum:
        - created_at
      title: WorkflowRunSortBy
    SortOrder:
      type: string
      enum:
        - asc
        - desc
      title: SortOrder
    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
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````