POST
/
workflows
/
{workflowId}
/
execute
Execute a workflow
curl --request POST \
  --url https://v1.api.altostrat.io/workflows/{workflowId}/execute \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "context": {
    "user_id": 123,
    "source": "manual-test"
  }
}'
{
  "id": "fl_run_a1b2c3d4e5f6g7h8",
  "status": "pending",
  "trigger_payload": {},
  "error_message": "<string>",
  "started_at": "2023-11-07T05:31:56Z",
  "completed_at": "2023-11-07T05:31:56Z",
  "duration_in_seconds": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "workflow": {
    "id": "fl_a1b2c3d4e5f6g7h8",
    "name": "User Onboarding",
    "description": "Workflow to onboard new users.",
    "nodes": [
      {
        "id": "node_1",
        "type": "action",
        "data": {
          "componentId": "webhook"
        }
      }
    ],
    "edges": [
      {
        "id": "edge_1_2",
        "source": "node_1",
        "target": "node_2",
        "sourceHandle": "true"
      }
    ],
    "schedule_type": "cron",
    "schedule_value": "0 9 * * *",
    "next_run_at": "2023-11-07T05:31:56Z",
    "is_active": true,
    "webhook_url": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "authorization": {
      "id": "auth_a1b2c3d4e5f6g7h8",
      "user_id": "<string>",
      "email": "jsmith@example.com",
      "created_at": "2023-11-07T05:31:56Z"
    },
    "runs": [
      {}
    ]
  },
  "logs": [
    {
      "id": "fl_log_a1b2c3d4e5f6g7h8",
      "execution_id": "fl_run_a1b2c3d4e5f6g7h8",
      "node_id": "node_1",
      "status": "success",
      "output": {},
      "created_at": "2023-11-07T05:31:56Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

Enter the JWT token.

Headers

Idempotency-Key
string<uuid>

A UUID to ensure this execution request is processed only once. If a request with the same key is sent again within 24 hours, the original result will be returned.

Path Parameters

workflowId
string
required

The prefixed ID of the workflow (e.g., fl_...).

Body

application/json

Response

202
application/json

Workflow execution has been accepted and queued.

The response is of type object.