Skip to main content

Start or abort a flow

Control flow execution by starting or aborting a flow.

Available Actions:

  • start: Begin execution of a created flow (state must be 'created')
  • abort: Cancel a running flow (state must be 'starting' or 'running')

Action: start

  • Transitions flow from 'created' to 'starting' state
  • Only applicable to flows without initial inputs (created via POST /flows without inputs)
  • Flows created with inputs start automatically and cannot be manually started

Action: abort

  • Transitions flow to 'aborting' state, then eventually to 'aborted'
  • Stops processing and cleans up resources
  • Cannot abort flows that are already completed or failed

Example Request:

{
"action": "start"
}
info

This endpoint allows you to start or abort a flow.

Endpoint

PATCH https://flows.generio.ai/flows/{flow_id}

Parameters

flow_id (required)

  • Location: path
  • Type: string

Request Body

Properties

  • action (string): Action to perform on the flow, i.e. 'start' or 'abort'.

Responses

200

Successful Response

422

Validation Error

Code Examples

Copy and run these examples in your terminal or code editor. Make sure to replace YOUR_TOKEN with your actual authentication token.

curl -X PATCH "https://flows.generio.ai/flows/{flow_id}" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"