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

# List published versions

> Every version of the workflow that was published, newest first, with its whole graph.



## OpenAPI

````yaml GET /api/workflows/{id}/revisions
openapi: 3.1.0
info:
  title: HITL API
  version: 1.0.0
  description: >-
    Run the workflows you build in HITL, follow each run until a person has
    answered, and manage who reviews them.
servers:
  - url: https://api.hitl.sh/v1
security:
  - bearerAuth: []
tags:
  - name: Workflows
  - name: Runs
  - name: Reviewers
  - name: Webhooks
  - name: Account
  - name: Uploads
paths:
  /api/workflows/{id}/revisions:
    get:
      tags:
        - Workflows
      summary: List published versions
      description: >-
        Every version of the workflow that was published, newest first, with its
        whole graph.
      operationId: workflows-revisions
      parameters:
        - name: id
          in: path
          required: true
          description: The workflow id
          schema:
            type: string
            example: 6af2ce4e8207961501f59472
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                data:
                  - edges:
                      - id: e1
                        source: trigger-1
                        source_handle: ''
                        target: review-1
                        target_handle: ''
                      - id: e2
                        source: review-1
                        source_handle: ''
                        target: condition-1
                        target_handle: ''
                      - ...: 4 more edges
                    id: 6af2ce518207961501f59475
                    name: Refund approval
                    nodes:
                      - data:
                          label: Webhook
                          triggerType: webhook
                          workflowIcon:
                            color: peach
                            type: set
                            value: receipt
                        id: trigger-1
                        position:
                          x: 300
                          'y': 40
                        type: trigger
                      - data:
                          label: Approve refund
                          priority: high
                          requestText: >-
                            **Refund request**


                            | | |

                            |---|---|

                            | Customer | {{trigger.body.customer.name}}
                            ({{trigger.body.customer.email}}) |

                            | Order | {{trigger.body.order_id}} |

                            | Amount | ${{trigger.body.amount}}
                            {{trigger.body.currency}} |


                            **Reason:** {{trigger.body.reason}}
                          responseConfig:
                            options:
                              - label: Approve refund
                                value: approve
                              - label: Deny
                                value: deny
                              - label: Escalate to manager
                                value: escalate
                            required: true
                          responseType: single_select
                          timeout: '7200'
                        id: review-1
                        position:
                          x: 300
                          'y': 230
                        type: review
                      - ...: 4 more steps
                    published_at: '2026-11-10T07:57:05.98Z'
                    version: 1
                    workflow_id: 6af2ce4e8207961501f59472
                error: false
                msg: Revisions retrieved successfully
        '401':
          $ref: '#/components/responses/E401'
        '404':
          $ref: '#/components/responses/E404'
components:
  responses:
    E401:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: true
            msg: Invalid API key
    E404:
      description: Not found, or not yours
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: true
            msg: Workflow not found
  schemas:
    Error:
      type: object
      required:
        - error
        - msg
      properties:
        error:
          type: boolean
          example: true
        msg:
          type: string
          description: What went wrong, in plain words
        code:
          type: string
          description: >-
            A machine-readable reason, when there is one (for example
            `confirmation_required`)
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your API key: `hitl_live_…`'

````

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