Simulations
Run scenario
Run multiple executions of a scenario.
POST
/
simulations
/
{simulationReference}
/
schedule
Run scenario
curl --request POST \
--url https://api-trial.cognigy.ai/testing/simulations/{simulationReference}/schedule \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"projectReference": "<string>",
"name": "<string>",
"numberOfExecutions": 2,
"runConfig": {
"flowReferenceId": "<string>",
"entrypoint": "<string>",
"largeLanguageModelReferenceId": "<string>",
"localeReferenceId": "<string>",
"userId": "<string>",
"data": {},
"enableMocking": true
},
"endPointType": "<string>"
}
'import requests
url = "https://api-trial.cognigy.ai/testing/simulations/{simulationReference}/schedule"
payload = {
"projectReference": "<string>",
"name": "<string>",
"numberOfExecutions": 2,
"runConfig": {
"flowReferenceId": "<string>",
"entrypoint": "<string>",
"largeLanguageModelReferenceId": "<string>",
"localeReferenceId": "<string>",
"userId": "<string>",
"data": {},
"enableMocking": True
},
"endPointType": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
projectReference: '<string>',
name: '<string>',
numberOfExecutions: 2,
runConfig: {
flowReferenceId: '<string>',
entrypoint: '<string>',
largeLanguageModelReferenceId: '<string>',
localeReferenceId: '<string>',
userId: '<string>',
data: {},
enableMocking: true
},
endPointType: '<string>'
})
};
fetch('https://api-trial.cognigy.ai/testing/simulations/{simulationReference}/schedule', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-trial.cognigy.ai/testing/simulations/{simulationReference}/schedule",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'projectReference' => '<string>',
'name' => '<string>',
'numberOfExecutions' => 2,
'runConfig' => [
'flowReferenceId' => '<string>',
'entrypoint' => '<string>',
'largeLanguageModelReferenceId' => '<string>',
'localeReferenceId' => '<string>',
'userId' => '<string>',
'data' => [
],
'enableMocking' => true
],
'endPointType' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-trial.cognigy.ai/testing/simulations/{simulationReference}/schedule"
payload := strings.NewReader("{\n \"projectReference\": \"<string>\",\n \"name\": \"<string>\",\n \"numberOfExecutions\": 2,\n \"runConfig\": {\n \"flowReferenceId\": \"<string>\",\n \"entrypoint\": \"<string>\",\n \"largeLanguageModelReferenceId\": \"<string>\",\n \"localeReferenceId\": \"<string>\",\n \"userId\": \"<string>\",\n \"data\": {},\n \"enableMocking\": true\n },\n \"endPointType\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-trial.cognigy.ai/testing/simulations/{simulationReference}/schedule")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"projectReference\": \"<string>\",\n \"name\": \"<string>\",\n \"numberOfExecutions\": 2,\n \"runConfig\": {\n \"flowReferenceId\": \"<string>\",\n \"entrypoint\": \"<string>\",\n \"largeLanguageModelReferenceId\": \"<string>\",\n \"localeReferenceId\": \"<string>\",\n \"userId\": \"<string>\",\n \"data\": {},\n \"enableMocking\": true\n },\n \"endPointType\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-trial.cognigy.ai/testing/simulations/{simulationReference}/schedule")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"projectReference\": \"<string>\",\n \"name\": \"<string>\",\n \"numberOfExecutions\": 2,\n \"runConfig\": {\n \"flowReferenceId\": \"<string>\",\n \"entrypoint\": \"<string>\",\n \"largeLanguageModelReferenceId\": \"<string>\",\n \"localeReferenceId\": \"<string>\",\n \"userId\": \"<string>\",\n \"data\": {},\n \"enableMocking\": true\n },\n \"endPointType\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"referenceId": "<string>",
"simulationReference": "<string>",
"runs": 123,
"completedRuns": 123,
"failedRuns": 123,
"createdAt": 123,
"startedAt": 123,
"completedAt": 123
}{
"error": "<string>",
"field": "<string>",
"code": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"traceId": "<string>"
}Authorizations
bearerAuthapiKeyAuth
JWT Bearer Token for authentication
Path Parameters
Reference ID of the scenario
Query Parameters
Project identifier
Body
application/json
Project reference (required in body)
Name for this simulation
Number of simulation runs to execute in this simulation
Required range:
x >= 1Configuration for simulation execution
Show child attributes
Show child attributes
Endpoint type for simulation execution (e.g., 'api', 'rpc')
Response
Scenario execution started successfully
Unique identifier for the simulation
Reference ID for the simulation
Reference ID of the simulated scenario
Current status of the simulation
Available options:
pending, running, completed, failed, stopped Number of runs in this simulation
Number of completed runs
Number of failed runs
Creation timestamp
Start timestamp
Completion timestamp
Last modified on July 2, 2026
⌘I
Run scenario
curl --request POST \
--url https://api-trial.cognigy.ai/testing/simulations/{simulationReference}/schedule \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"projectReference": "<string>",
"name": "<string>",
"numberOfExecutions": 2,
"runConfig": {
"flowReferenceId": "<string>",
"entrypoint": "<string>",
"largeLanguageModelReferenceId": "<string>",
"localeReferenceId": "<string>",
"userId": "<string>",
"data": {},
"enableMocking": true
},
"endPointType": "<string>"
}
'import requests
url = "https://api-trial.cognigy.ai/testing/simulations/{simulationReference}/schedule"
payload = {
"projectReference": "<string>",
"name": "<string>",
"numberOfExecutions": 2,
"runConfig": {
"flowReferenceId": "<string>",
"entrypoint": "<string>",
"largeLanguageModelReferenceId": "<string>",
"localeReferenceId": "<string>",
"userId": "<string>",
"data": {},
"enableMocking": True
},
"endPointType": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
projectReference: '<string>',
name: '<string>',
numberOfExecutions: 2,
runConfig: {
flowReferenceId: '<string>',
entrypoint: '<string>',
largeLanguageModelReferenceId: '<string>',
localeReferenceId: '<string>',
userId: '<string>',
data: {},
enableMocking: true
},
endPointType: '<string>'
})
};
fetch('https://api-trial.cognigy.ai/testing/simulations/{simulationReference}/schedule', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-trial.cognigy.ai/testing/simulations/{simulationReference}/schedule",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'projectReference' => '<string>',
'name' => '<string>',
'numberOfExecutions' => 2,
'runConfig' => [
'flowReferenceId' => '<string>',
'entrypoint' => '<string>',
'largeLanguageModelReferenceId' => '<string>',
'localeReferenceId' => '<string>',
'userId' => '<string>',
'data' => [
],
'enableMocking' => true
],
'endPointType' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-trial.cognigy.ai/testing/simulations/{simulationReference}/schedule"
payload := strings.NewReader("{\n \"projectReference\": \"<string>\",\n \"name\": \"<string>\",\n \"numberOfExecutions\": 2,\n \"runConfig\": {\n \"flowReferenceId\": \"<string>\",\n \"entrypoint\": \"<string>\",\n \"largeLanguageModelReferenceId\": \"<string>\",\n \"localeReferenceId\": \"<string>\",\n \"userId\": \"<string>\",\n \"data\": {},\n \"enableMocking\": true\n },\n \"endPointType\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-trial.cognigy.ai/testing/simulations/{simulationReference}/schedule")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"projectReference\": \"<string>\",\n \"name\": \"<string>\",\n \"numberOfExecutions\": 2,\n \"runConfig\": {\n \"flowReferenceId\": \"<string>\",\n \"entrypoint\": \"<string>\",\n \"largeLanguageModelReferenceId\": \"<string>\",\n \"localeReferenceId\": \"<string>\",\n \"userId\": \"<string>\",\n \"data\": {},\n \"enableMocking\": true\n },\n \"endPointType\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-trial.cognigy.ai/testing/simulations/{simulationReference}/schedule")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"projectReference\": \"<string>\",\n \"name\": \"<string>\",\n \"numberOfExecutions\": 2,\n \"runConfig\": {\n \"flowReferenceId\": \"<string>\",\n \"entrypoint\": \"<string>\",\n \"largeLanguageModelReferenceId\": \"<string>\",\n \"localeReferenceId\": \"<string>\",\n \"userId\": \"<string>\",\n \"data\": {},\n \"enableMocking\": true\n },\n \"endPointType\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"referenceId": "<string>",
"simulationReference": "<string>",
"runs": 123,
"completedRuns": 123,
"failedRuns": 123,
"createdAt": 123,
"startedAt": 123,
"completedAt": 123
}{
"error": "<string>",
"field": "<string>",
"code": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"traceId": "<string>"
}