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

# Toggle workflow status

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Flips a workflow between running and paused.

This flips whatever the current status is, it does not set a status you choose. Read the workflow first with [Get workflow](/api-reference/get-workflow) and only call this when `status` is not already what you want, or two calls in a row will land you back where you started.

Pausing takes effect immediately: the schedule is removed and the trigger stops firing. Starting a workflow again requires a plan that includes workflows; pausing one does not, so a workspace that has lost the capability can still stop a workflow it can no longer start.

Archived workflows cannot be toggled and return a 400. Restore one first with [Restore workflow](/api-reference/restore-workflow).

This endpoint is limited to 20 requests per minute.



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json post /api/apps/{app_id}/workflows/{workflow_id}/toggle-status
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - ApiKeyAuth: []
paths:
  /api/apps/{app_id}/workflows/{workflow_id}/toggle-status:
    post:
      summary: Toggle workflow status
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Flips a workflow between running and paused.


        This flips whatever the current status is, it does not set a status you
        choose. Read the workflow first with [Get
        workflow](/api-reference/get-workflow) and only call this when `status`
        is not already what you want, or two calls in a row will land you back
        where you started.


        Pausing takes effect immediately: the schedule is removed and the
        trigger stops firing. Starting a workflow again requires a plan that
        includes workflows; pausing one does not, so a workspace that has lost
        the capability can still stop a workflow it can no longer start.


        Archived workflows cannot be toggled and return a 400. Restore one first
        with [Restore workflow](/api-reference/restore-workflow).


        This endpoint is limited to 20 requests per minute.
      operationId: >-
        toggle_workflow_status_api_apps__app_id__workflows__workflow_id__toggle_status_post
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app whose workflows you want to work with.
            title: App Id
          description: ID of the app whose workflows you want to work with.
          example: 6820f3a4e7b91d003c45a1f2
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            description: >-
              ID of the workflow, as returned in `id` by [List
              workflows](/api-reference/list-workflows).
            title: Workflow Id
          description: >-
            ID of the workflow, as returned in `id` by [List
            workflows](/api-reference/list-workflows).
          example: 68b1c0d4e7b91d003c45a1f2
      responses:
        '200':
          description: The workflow's new status.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToggleStatusResponse'
        '400':
          description: The workflow is archived, so it cannot be toggled.
        '401':
          description: Missing or invalid credentials.
        '402':
          description: >-
            This workspace's plan does not include workflows. Upgrade to Builder
            or above.
        '403':
          description: >-
            You don't have access to this app, the app does not exist, the app
            still runs the older automations engine instead of workflows, or you
            used a workspace API key. A missing app and an app you cannot reach
            are deliberately the same answer.
        '404':
          description: There is no workflow with this ID on this app.
        '422':
          description: The status could not be changed. The body says why.
components:
  schemas:
    ToggleStatusResponse:
      properties:
        workflow_id:
          type: string
          title: Workflow Id
          description: ID of the workflow.
          example: 68b1c0d4e7b91d003c45a1f2
        status:
          type: string
          title: Status
          description: >-
            The status the workflow actually landed in, which is not always the
            one you asked for.
          example: active
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
          description: >-
            Why a restored workflow did not come back active, written for a
            person to read. `null` when you toggled the status yourself.
          example: The schedule already ended, so the workflow stayed inactive.
      type: object
      required:
        - workflow_id
        - status
      title: ToggleStatusResponse
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: Personal API key.

````