Create Test Run
POST
/api/v1/workflow/{workflow_id}/runsCreate a new workflow run when the user decides to execute the workflow via chat or voice Args: workflow_id: The ID of the workflow to run request: The create workflow run request user: The user to create the workflow run for
cURL example
curl -X POST \
'https://app.intracord.hu/api/v1/workflow/{workflow_id}/runs' \
-H "X-API-Key: $INTRACORD_API_KEY" \
-H 'Content-Type: application/json' \
--data-binary @request.jsonParameters
| Name | Location | Type | Description |
|---|---|---|---|
workflow_idrequired | path | integer | — |
authorization | header | object | — |
X-API-Key | header | object | — |
Request body
application/jsonView schema
{
"properties": {
"mode": {
"type": "string",
"title": "Mode"
},
"name": {
"type": "string",
"title": "Name"
}
},
"type": "object",
"required": [
"mode",
"name"
],
"title": "CreateWorkflowRunRequest"
}Responses
200Successful Responseapplication/jsonView schema
{
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"workflow_id": {
"type": "integer",
"title": "Workflow Id"
},
"name": {
"type": "string",
"title": "Name"
},
"mode": {
"type": "string",
"title": "Mode"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
},
"definition_id": {
"type": "integer",
"title": "Definition Id"
},
"initial_context": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Initial Context"
}
},
"type": "object",
"required": [
"id",
"workflow_id",
"name",
"mode",
"created_at",
"definition_id"
],
"title": "CreateWorkflowRunResponse"
}404Not found422Validation Errorapplication/jsonView schema
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}