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

# Pause a workflow

> Stops new runs. Runs already waiting for a person keep waiting. Activate it again to resume.



## OpenAPI

````yaml POST /api/workflows/{id}/pause
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}/pause:
    post:
      tags:
        - Workflows
      summary: Pause a workflow
      description: >-
        Stops new runs. Runs already waiting for a person keep waiting. Activate
        it again to resume.
      operationId: workflows-pause
      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:
                    $ref: '#/components/schemas/Workflow'
              example:
                error: false
                msg: Workflow paused
                data:
                  id: 6af2ce4e8207961501f59472
                  name: Refund approval
                  status: paused
                  runnable: false
        '401':
          $ref: '#/components/responses/E401'
        '404':
          $ref: '#/components/responses/E404'
components:
  schemas:
    Workflow:
      allOf:
        - $ref: '#/components/schemas/WorkflowSummary'
        - type: object
          properties:
            nodes:
              type: array
              items:
                $ref: '#/components/schemas/Step'
            edges:
              type: array
              items:
                $ref: '#/components/schemas/Edge'
            input_fields:
              type: array
              items:
                $ref: '#/components/schemas/InputField'
    WorkflowSummary:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        status:
          type: string
          enum:
            - active
            - paused
            - draft
        trigger:
          type: object
          properties:
            type:
              type: string
              enum:
                - webhook
                - email
                - schedule
                - manual
                - google_sheets_row
            webhook_id:
              type: string
        steps:
          type: integer
          description: Number of steps, trigger and end included
        has_review:
          type: boolean
          description: The workflow has at least one review step
        runnable:
          type: boolean
          description: Active, so `POST /run` will start it
        execution_count:
          type: integer
        last_executed_at:
          type:
            - string
            - 'null'
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Step:
      type: object
      required:
        - id
        - type
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - trigger
            - review
            - ai
            - ai_classifier
            - data_source
            - condition
            - transform
            - action
            - end
        position:
          type: object
          properties:
            x:
              type: number
            'y':
              type: number
        data:
          type: object
          description: >-
            The step's settings. For a review step: `label`, `requestText`
            (Markdown, may use `{{trigger.body.<path>}}`), `responseType`,
            `responseConfig`, `priority`, `timeout` (seconds, as a string).
            Credentials are redacted in answers.
          additionalProperties: true
    Edge:
      type: object
      required:
        - source
        - target
      properties:
        id:
          type: string
        source:
          type: string
        target:
          type: string
        source_handle:
          type: string
          description: 'Which exit of the source step: `yes` / `no` for a condition'
    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.