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

# Turn a flow on (admins)

> Turns the flow on with the token of a preview of exactly this version and graph (and its choice to run for records that match now). REST only: over MCP the person turns it on in Agent Studio.



## OpenAPI

````yaml /api/statisfy-api.openapi.json post /v1/automations/flows/{flow_id}/enable
openapi: 3.1.0
info:
  description: >-
    The agent-first Statisfy API. Authenticate with an API key (`Authorization:
    Bearer stfy_live_…`), then call `GET /v1/meta/capabilities` to discover
    every operation and its schemas.
  title: Statisfy API
  version: 1.0.0
servers:
  - url: https://api.statisfy.com
    description: Production
security: []
paths:
  /v1/automations/flows/{flow_id}/enable:
    post:
      tags:
        - automations
      summary: Turn a flow on (admins)
      description: >-
        Turns the flow on with the token of a preview of exactly this version
        and graph (and its choice to run for records that match now). REST only:
        over MCP the person turns it on in Agent Studio.
      operationId: automations_enable_flow
      parameters:
        - in: path
          name: flow_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                mode:
                  anyOf:
                    - enum:
                        - continue
                        - fresh
                      type: string
                    - type: 'null'
                  default: null
                  description: >-
                    For a flow that has run before (the preview's
                    `has_run_before`): continue keeps its run history, so
                    records it already ran for don't run again; fresh starts
                    over, as if it never ran. Required then, as in the app. On a
                    flow that is already on, only fresh is accepted: it restarts
                    the run history.
                  title: Mode
                person_confirmed:
                  const: true
                  description: >-
                    true: the person saw this preview (its matches, first run
                    and steps) and said to turn it on. Never set it without
                    asking them.
                  title: Person Confirmed
                  type: boolean
                preview_token:
                  title: Preview Token
                  type: string
              required:
                - preview_token
                - person_confirmed
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SavedFlowSpec'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    SavedFlowSpec:
      properties:
        editor_url:
          description: The flow in Agent Studio
          title: Editor Url
          type: string
        enabled:
          title: Enabled
          type: boolean
        flow_id:
          title: Flow Id
          type: string
        name:
          title: Name
          type: string
        nodes:
          additionalProperties:
            type: string
          description: step id -> node id in the editor
          title: Nodes
          type: object
        trigger:
          description: The audience in words
          title: Trigger
          type: string
        version:
          title: Version
          type: integer
      required:
        - flow_id
        - name
        - version
        - enabled
        - trigger
        - editor_url
      title: SavedFlowSpec
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http
      description: >-
        An API key, sent as `Authorization: Bearer stfy_live_…`. See
        [Authentication](/rest-api/authentication) for how to get one and which
        scopes it needs.

````

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