Skip to main content

Create Test Run

POST/api/v1/workflow/{workflow_id}/runs

Create 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.json

Parameters

NameLocationTypeDescription
workflow_idrequiredpathinteger
authorizationheaderobject
X-API-Keyheaderobject

Request body

application/json
View schema
{
  "properties": {
    "mode": {
      "type": "string",
      "title": "Mode"
    },
    "name": {
      "type": "string",
      "title": "Name"
    }
  },
  "type": "object",
  "required": [
    "mode",
    "name"
  ],
  "title": "CreateWorkflowRunRequest"
}

Responses

200Successful Response
application/json
View 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 found
422Validation Error
application/json
View schema
{
  "properties": {
    "detail": {
      "items": {
        "$ref": "#/components/schemas/ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}