Trigger a workflow run
POST/v1/workflows/:workflow_identifier/runs
This route allows you to start a new execution of a workflow with optional input parameters.
To learn more about workflows, see the documentation.
Request
Parameters (JSON)
{
"parameters": [
{
"schema": {
"type": "string"
},
"in": "query",
"name": "trigger_node",
"required": false,
"description": "The identifier of the trigger node to execute. Required when the workflow has multiple trigger nodes."
},
{
"schema": {
"type": "string"
},
"in": "path",
"name": "workflow_identifier",
"required": true,
"description": "The unique identifier of the workflow."
}
]
}Request body schema (JSON)
{
"title": "Body",
"body": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"inputs": {
"default": {},
"description": "Input parameters to pass to the workflow execution.",
"type": "object",
"additionalProperties": {}
}
}
}
}
}
}
}Responses
- 201
- 404
- 422
- 500
Default Response
Default Response
Default Response
Default Response
Responses (JSON)
{
"responses": {
"201": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ok": {
"type": "boolean"
},
"workflowRun": {
"type": "object",
"properties": {
"identifier": {
"type": "string",
"pattern": "^wfr_[a-zA-Z0-9]{16}$"
},
"workflowVersionIdentifier": {
"type": "string",
"pattern": "^wfv_[a-zA-Z0-9]{16}$"
},
"nodeRuns": {
"default": [],
"type": "array",
"items": {
"type": "object",
"properties": {
"identifier": {
"type": "string",
"pattern": "^wfnr_[a-zA-Z0-9]{16}$"
},
"output": {
"default": {},
"type": "object",
"additionalProperties": {}
},
"links": {
"default": [],
"type": "array",
"items": {
"type": "string",
"format": "uri"
}
},
"status": {
"type": "string",
"enum": [
"COMPLETED",
"IN_PROGRESS",
"CANCELLING",
"WAITING_FOR_INPUT"
]
},
"result": {
"anyOf": [
{
"type": "string",
"enum": [
"CANCELLED",
"SUCCESS",
"FAILED",
"CACHED"
]
},
{
"type": "null"
}
]
},
"statusLabel": {
"type": "object",
"properties": {
"text": {
"type": "string",
"minLength": 1,
"description": "The label text. Supports JQ expressions for dynamic content."
},
"variant": {
"description": "Semantic variant controlling the label color/style.",
"type": "string",
"enum": [
"success",
"alert"
]
}
},
"required": [
"text"
],
"additionalProperties": false
},
"externalRunId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reauthUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
"completedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
{
"type": "null"
}
]
},
"node": {
"type": "object",
"properties": {
"identifier": {
"type": "string"
}
},
"required": [
"identifier"
],
"additionalProperties": false
}
},
"required": [
"identifier",
"links",
"status",
"createdAt",
"updatedAt",
"node"
],
"additionalProperties": false,
"title": "nodeRun"
}
},
"status": {
"type": "string",
"enum": [
"COMPLETED",
"IN_PROGRESS",
"CANCELLING",
"WAITING_FOR_INPUT"
]
},
"result": {
"anyOf": [
{
"type": "string",
"enum": [
"CANCELLED",
"SUCCESS",
"FAILED"
]
},
{
"type": "null"
}
]
},
"statusLabel": {
"type": "object",
"properties": {
"text": {
"type": "string",
"minLength": 1,
"description": "The label text. Supports JQ expressions for dynamic content."
},
"variant": {
"description": "Semantic variant controlling the label color/style.",
"type": "string",
"enum": [
"success",
"alert"
]
}
},
"required": [
"text"
],
"additionalProperties": false
},
"source": {
"default": "API",
"type": "string",
"enum": [
"UI",
"API",
"EVENT",
"TEST",
"MCP"
]
},
"completedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
"workflowVersion": {
"anyOf": [
{
"type": "object",
"properties": {
"versionIdentifier": {
"anyOf": [
{
"type": "string",
"pattern": "^wfv_[a-zA-Z0-9]{16}$"
},
{
"type": "null"
}
]
},
"workflow": {
"type": "object",
"properties": {
"identifier": {
"anyOf": [
{
"type": "string",
"maxLength": 60,
"pattern": "^[\\p{L}0-9@_:-]+$"
},
{
"type": "string",
"maxLength": 60,
"pattern": "^system\\.[\\p{L}0-9@_:-]+$"
}
]
}
},
"required": [
"identifier"
],
"additionalProperties": false
}
},
"required": [
"workflow"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"createdBy": {
"type": "string"
},
"impersonatedUserId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"identifier",
"workflowVersionIdentifier",
"nodeRuns",
"status",
"source",
"createdAt",
"updatedAt",
"createdBy"
],
"additionalProperties": false,
"title": "workflowRun"
}
},
"required": [
"ok",
"workflowRun"
],
"additionalProperties": false
}
}
}
},
"404": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ok": {
"type": "boolean"
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error"
],
"additionalProperties": false,
"title": "serverError"
}
}
}
},
"422": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ok": {
"type": "boolean"
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error"
],
"additionalProperties": false,
"title": "serverError"
}
}
}
},
"500": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ok": {
"type": "boolean"
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error"
],
"additionalProperties": false,
"title": "serverError"
}
}
}
}
}
}