Skip to main content
POST
/
v1
/
workflows
/
{workflowId}
/
execute
Execute Workflow
curl --request POST \
  --url https://api.truthlocks.com/v1/workflows/{workflowId}/execute \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "parameters": {},
  "dry_run": false
}
'
{
  "execution_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "pending",
  "steps": [
    {
      "action": "<string>",
      "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "status": "<string>",
      "result": {}
    }
  ],
  "created_at": "2023-11-07T05:31:56Z"
}
Executes a published workflow definition by creating a new orchestration run. The workflow’s DAG of steps is resolved and executed in dependency order. Each step’s inputs and outputs are recorded for full provenance tracking. Only workflows in published status can be executed. Use the Create Workflow endpoint to define workflows, then publish them through the workflow lifecycle API before execution.

Authentication

X-API-Key
string
required
API key with workflows:execute scope. Alternatively, pass a Bearer JWT token in the Authorization header.
X-Tenant-ID
string
required
Tenant identifier for multi-tenant isolation.

Path Parameters

id
string
required
Workflow definition identifier.

Request

agent_id
string
required
MAIP agent identifier that will execute the workflow.
input
object
Input data passed to the workflow’s first steps. Schema depends on the workflow definition.
parameters
object
Runtime parameter overrides for the workflow execution. These override default step configurations without modifying the workflow definition.

Response

run_id
string
Unique run identifier for this execution (maip-orch:ULID). Use this to query execution status via the Get Orchestration endpoint.
workflow_id
string
The executed workflow definition identifier.
workflow_version
string
Version of the workflow that was executed.
agent_id
string
The agent executing the workflow.
status
string
Execution status. Always running on creation.
started_at
string
ISO 8601 timestamp when execution began.

Authorizations

X-API-Key
string
header
required

API key for machine-to-machine authentication

Path Parameters

workflowId
string<uuid>
required

Workflow identifier

Body

application/json
parameters
object

Runtime parameters for this execution

dry_run
boolean
default:false

If true, return the execution plan without running it

Response

Workflow execution started

execution_id
string<uuid>
workflow_id
string<uuid>
status
enum<string>
Available options:
pending,
running,
completed,
failed
steps
object[]
created_at
string<date-time>