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

# Get a workflow's input fields

> Every `{{trigger.body.<path>}}` the steps read (and condition fields on `trigger.body`), the steps that read each one, an example body, and a form description that integrations use to build their input fields. Fields not listed are still accepted and passed through.



## OpenAPI

````yaml GET /api/workflows/{id}/input
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}/input:
    get:
      tags:
        - Workflows
      summary: Get a workflow's input fields
      description: >-
        Every `{{trigger.body.<path>}}` the steps read (and condition fields on
        `trigger.body`), the steps that read each one, an example body, and a
        form description that integrations use to build their input fields.
        Fields not listed are still accepted and passed through.
      operationId: workflows-input
      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
                properties:
                  error:
                    type: boolean
                  msg:
                    type: string
                  data:
                    type: object
                    properties:
                      workflow_id:
                        type: string
                      fields:
                        type: array
                        items:
                          $ref: '#/components/schemas/InputField'
                      example:
                        type: object
                      form:
                        type: array
                        items:
                          type: object
                      note:
                        type: string
              example:
                data:
                  example:
                    amount: ''
                    currency: ''
                    customer:
                      email: ''
                      name: ''
                    order_id: ''
                    reason: ''
                  fields:
                    - path: amount
                      used_by:
                        - action-1
                        - review-1
                    - path: currency
                      used_by:
                        - review-1
                    - path: customer.email
                      used_by:
                        - review-1
                    - path: customer.name
                      used_by:
                        - review-1
                    - path: order_id
                      used_by:
                        - action-1
                        - action-2
                        - review-1
                    - path: reason
                      used_by:
                        - review-1
                  form:
                    - name: amount
                      label: Amount
                      type: text
                    - name: currency
                      label: Currency
                      type: text
                    - name: customer
                      label: Customer
                      type: collection
                      spec:
                        - name: email
                          label: Email
                          type: text
                        - name: name
                          label: Name
                          type: text
                    - name: order_id
                      label: Order id
                      type: text
                    - name: reason
                      label: Reason
                      type: text
                  note: >-
                    Fields the workflow's steps read as {{trigger.body.<path>}}.
                    Other fields are accepted and passed through.
                  workflow_id: 6af2ce4e8207961501f59472
                error: false
                msg: Workflow input retrieved
        '401':
          $ref: '#/components/responses/E401'
        '404':
          $ref: '#/components/responses/E404'
components:
  schemas:
    InputField:
      type: object
      properties:
        path:
          type: string
          example: customer.email
        used_by:
          type: array
          items:
            type: string
          description: Ids of the steps that read it
    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`)
  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
  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.