POST
/
api
/
v1
/
flows
/
execute
Execute Flow
curl --request POST \
  --url https://agent-studio.thena.ai/api/v1/flows/execute \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "flow_id": "<string>",
  "trigger_type": "manual",
  "trigger_data": {},
  "variables": {},
  "priority": "normal",
  "scheduled_at": "2023-11-07T05:31:56Z",
  "timeout_seconds": 123,
  "retry_config": {},
  "metadata": {}
}'
{
  "execution": {
    "id": "<string>",
    "flow_id": "<string>",
    "agent_id": "<string>",
    "organization_id": "<string>",
    "execution_number": 123,
    "trigger_type": "manual",
    "trigger_data": {},
    "variables": {},
    "priority": "low",
    "status": "pending",
    "started_at": "2023-11-07T05:31:56Z",
    "completed_at": "2023-11-07T05:31:56Z",
    "duration_ms": 123,
    "timeout_seconds": 300,
    "steps": [
      {
        "step_id": "<string>",
        "step_name": "<string>",
        "step_type": "<string>",
        "tool_name": "<string>",
        "status": "pending",
        "input_data": {},
        "output_data": {},
        "error_message": "<string>",
        "started_at": "2023-11-07T05:31:56Z",
        "completed_at": "2023-11-07T05:31:56Z",
        "duration_ms": 123,
        "retry_count": 0,
        "metadata": {}
      }
    ],
    "final_output": {},
    "error_message": "<string>",
    "error_details": {},
    "retry_count": 0,
    "max_retries": 3,
    "parent_execution_id": "<string>",
    "tokens_used": 123,
    "tool_calls_count": 0,
    "cost_estimate": 123,
    "performance_metrics": {},
    "metadata": {},
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  },
  "message": "<string>"
}

Authorizations

x-api-key
string
header
required

Body

application/json

Request model for creating a flow execution.

Response

200
application/json

Successful Response

Response model for flow execution operations.