curl --request POST \
--url https://api-prod.interactly.ai/workflows/v1/simulations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"logical_id": "<string>",
"status": "pending",
"name": "<string>",
"description": "<string>",
"selected_workflow": {
"workflow_id": "5eb7cf5a86d9755df3a6c593",
"version_number": 0,
"version_name": "<string>",
"dynamic_variables": {},
"name": "<string>",
"total_events": 0,
"total_nodes": 0,
"total_duration_seconds": 0,
"run_id": "5eb7cf5a86d9755df3a6c593"
},
"counter_workflow": {
"workflow_id": "5eb7cf5a86d9755df3a6c593",
"version_number": 0,
"version_name": "<string>",
"dynamic_variables": {},
"name": "<string>",
"total_events": 0,
"total_nodes": 0,
"total_duration_seconds": 0,
"run_id": "5eb7cf5a86d9755df3a6c593"
},
"timeout_seconds": 120,
"max_events": 3000,
"number_of_simulations": 1,
"max_concurrent_runs": 1,
"assistant_starts_first": true,
"stop_on_failure": false,
"run_by": "<string>"
}
'import requests
url = "https://api-prod.interactly.ai/workflows/v1/simulations"
payload = {
"logical_id": "<string>",
"status": "pending",
"name": "<string>",
"description": "<string>",
"selected_workflow": {
"workflow_id": "5eb7cf5a86d9755df3a6c593",
"version_number": 0,
"version_name": "<string>",
"dynamic_variables": {},
"name": "<string>",
"total_events": 0,
"total_nodes": 0,
"total_duration_seconds": 0,
"run_id": "5eb7cf5a86d9755df3a6c593"
},
"counter_workflow": {
"workflow_id": "5eb7cf5a86d9755df3a6c593",
"version_number": 0,
"version_name": "<string>",
"dynamic_variables": {},
"name": "<string>",
"total_events": 0,
"total_nodes": 0,
"total_duration_seconds": 0,
"run_id": "5eb7cf5a86d9755df3a6c593"
},
"timeout_seconds": 120,
"max_events": 3000,
"number_of_simulations": 1,
"max_concurrent_runs": 1,
"assistant_starts_first": True,
"stop_on_failure": False,
"run_by": "<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({
logical_id: '<string>',
status: 'pending',
name: '<string>',
description: '<string>',
selected_workflow: {
workflow_id: '5eb7cf5a86d9755df3a6c593',
version_number: 0,
version_name: '<string>',
dynamic_variables: {},
name: '<string>',
total_events: 0,
total_nodes: 0,
total_duration_seconds: 0,
run_id: '5eb7cf5a86d9755df3a6c593'
},
counter_workflow: {
workflow_id: '5eb7cf5a86d9755df3a6c593',
version_number: 0,
version_name: '<string>',
dynamic_variables: {},
name: '<string>',
total_events: 0,
total_nodes: 0,
total_duration_seconds: 0,
run_id: '5eb7cf5a86d9755df3a6c593'
},
timeout_seconds: 120,
max_events: 3000,
number_of_simulations: 1,
max_concurrent_runs: 1,
assistant_starts_first: true,
stop_on_failure: false,
run_by: '<string>'
})
};
fetch('https://api-prod.interactly.ai/workflows/v1/simulations', 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-prod.interactly.ai/workflows/v1/simulations",
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([
'logical_id' => '<string>',
'status' => 'pending',
'name' => '<string>',
'description' => '<string>',
'selected_workflow' => [
'workflow_id' => '5eb7cf5a86d9755df3a6c593',
'version_number' => 0,
'version_name' => '<string>',
'dynamic_variables' => [
],
'name' => '<string>',
'total_events' => 0,
'total_nodes' => 0,
'total_duration_seconds' => 0,
'run_id' => '5eb7cf5a86d9755df3a6c593'
],
'counter_workflow' => [
'workflow_id' => '5eb7cf5a86d9755df3a6c593',
'version_number' => 0,
'version_name' => '<string>',
'dynamic_variables' => [
],
'name' => '<string>',
'total_events' => 0,
'total_nodes' => 0,
'total_duration_seconds' => 0,
'run_id' => '5eb7cf5a86d9755df3a6c593'
],
'timeout_seconds' => 120,
'max_events' => 3000,
'number_of_simulations' => 1,
'max_concurrent_runs' => 1,
'assistant_starts_first' => true,
'stop_on_failure' => false,
'run_by' => '<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-prod.interactly.ai/workflows/v1/simulations"
payload := strings.NewReader("{\n \"logical_id\": \"<string>\",\n \"status\": \"pending\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"selected_workflow\": {\n \"workflow_id\": \"5eb7cf5a86d9755df3a6c593\",\n \"version_number\": 0,\n \"version_name\": \"<string>\",\n \"dynamic_variables\": {},\n \"name\": \"<string>\",\n \"total_events\": 0,\n \"total_nodes\": 0,\n \"total_duration_seconds\": 0,\n \"run_id\": \"5eb7cf5a86d9755df3a6c593\"\n },\n \"counter_workflow\": {\n \"workflow_id\": \"5eb7cf5a86d9755df3a6c593\",\n \"version_number\": 0,\n \"version_name\": \"<string>\",\n \"dynamic_variables\": {},\n \"name\": \"<string>\",\n \"total_events\": 0,\n \"total_nodes\": 0,\n \"total_duration_seconds\": 0,\n \"run_id\": \"5eb7cf5a86d9755df3a6c593\"\n },\n \"timeout_seconds\": 120,\n \"max_events\": 3000,\n \"number_of_simulations\": 1,\n \"max_concurrent_runs\": 1,\n \"assistant_starts_first\": true,\n \"stop_on_failure\": false,\n \"run_by\": \"<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-prod.interactly.ai/workflows/v1/simulations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"logical_id\": \"<string>\",\n \"status\": \"pending\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"selected_workflow\": {\n \"workflow_id\": \"5eb7cf5a86d9755df3a6c593\",\n \"version_number\": 0,\n \"version_name\": \"<string>\",\n \"dynamic_variables\": {},\n \"name\": \"<string>\",\n \"total_events\": 0,\n \"total_nodes\": 0,\n \"total_duration_seconds\": 0,\n \"run_id\": \"5eb7cf5a86d9755df3a6c593\"\n },\n \"counter_workflow\": {\n \"workflow_id\": \"5eb7cf5a86d9755df3a6c593\",\n \"version_number\": 0,\n \"version_name\": \"<string>\",\n \"dynamic_variables\": {},\n \"name\": \"<string>\",\n \"total_events\": 0,\n \"total_nodes\": 0,\n \"total_duration_seconds\": 0,\n \"run_id\": \"5eb7cf5a86d9755df3a6c593\"\n },\n \"timeout_seconds\": 120,\n \"max_events\": 3000,\n \"number_of_simulations\": 1,\n \"max_concurrent_runs\": 1,\n \"assistant_starts_first\": true,\n \"stop_on_failure\": false,\n \"run_by\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.interactly.ai/workflows/v1/simulations")
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 \"logical_id\": \"<string>\",\n \"status\": \"pending\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"selected_workflow\": {\n \"workflow_id\": \"5eb7cf5a86d9755df3a6c593\",\n \"version_number\": 0,\n \"version_name\": \"<string>\",\n \"dynamic_variables\": {},\n \"name\": \"<string>\",\n \"total_events\": 0,\n \"total_nodes\": 0,\n \"total_duration_seconds\": 0,\n \"run_id\": \"5eb7cf5a86d9755df3a6c593\"\n },\n \"counter_workflow\": {\n \"workflow_id\": \"5eb7cf5a86d9755df3a6c593\",\n \"version_number\": 0,\n \"version_name\": \"<string>\",\n \"dynamic_variables\": {},\n \"name\": \"<string>\",\n \"total_events\": 0,\n \"total_nodes\": 0,\n \"total_duration_seconds\": 0,\n \"run_id\": \"5eb7cf5a86d9755df3a6c593\"\n },\n \"timeout_seconds\": 120,\n \"max_events\": 3000,\n \"number_of_simulations\": 1,\n \"max_concurrent_runs\": 1,\n \"assistant_starts_first\": true,\n \"stop_on_failure\": false,\n \"run_by\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"simulation": {
"team_id": "<string>",
"created_by": "<string>",
"updated_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"_id": "5eb7cf5a86d9755df3a6c593",
"simulation_config": {
"logical_id": "<string>",
"status": "pending",
"name": "<string>",
"description": "<string>",
"selected_workflow": {
"workflow_id": "<string>",
"version_number": 0,
"version_name": "<string>",
"dynamic_variables": {},
"name": "<string>",
"total_events": 0,
"total_nodes": 0,
"total_duration_seconds": 0,
"run_id": "<string>"
},
"counter_workflow": {
"workflow_id": "<string>",
"version_number": 0,
"version_name": "<string>",
"dynamic_variables": {},
"name": "<string>",
"total_events": 0,
"total_nodes": 0,
"total_duration_seconds": 0,
"run_id": "<string>"
},
"timeout_seconds": 120,
"max_events": 3000,
"number_of_simulations": 1,
"max_concurrent_runs": 1,
"assistant_starts_first": true,
"stop_on_failure": false,
"run_by": "<string>"
}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Create Simulation
Endpoint to create a new simulation.
curl --request POST \
--url https://api-prod.interactly.ai/workflows/v1/simulations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"logical_id": "<string>",
"status": "pending",
"name": "<string>",
"description": "<string>",
"selected_workflow": {
"workflow_id": "5eb7cf5a86d9755df3a6c593",
"version_number": 0,
"version_name": "<string>",
"dynamic_variables": {},
"name": "<string>",
"total_events": 0,
"total_nodes": 0,
"total_duration_seconds": 0,
"run_id": "5eb7cf5a86d9755df3a6c593"
},
"counter_workflow": {
"workflow_id": "5eb7cf5a86d9755df3a6c593",
"version_number": 0,
"version_name": "<string>",
"dynamic_variables": {},
"name": "<string>",
"total_events": 0,
"total_nodes": 0,
"total_duration_seconds": 0,
"run_id": "5eb7cf5a86d9755df3a6c593"
},
"timeout_seconds": 120,
"max_events": 3000,
"number_of_simulations": 1,
"max_concurrent_runs": 1,
"assistant_starts_first": true,
"stop_on_failure": false,
"run_by": "<string>"
}
'import requests
url = "https://api-prod.interactly.ai/workflows/v1/simulations"
payload = {
"logical_id": "<string>",
"status": "pending",
"name": "<string>",
"description": "<string>",
"selected_workflow": {
"workflow_id": "5eb7cf5a86d9755df3a6c593",
"version_number": 0,
"version_name": "<string>",
"dynamic_variables": {},
"name": "<string>",
"total_events": 0,
"total_nodes": 0,
"total_duration_seconds": 0,
"run_id": "5eb7cf5a86d9755df3a6c593"
},
"counter_workflow": {
"workflow_id": "5eb7cf5a86d9755df3a6c593",
"version_number": 0,
"version_name": "<string>",
"dynamic_variables": {},
"name": "<string>",
"total_events": 0,
"total_nodes": 0,
"total_duration_seconds": 0,
"run_id": "5eb7cf5a86d9755df3a6c593"
},
"timeout_seconds": 120,
"max_events": 3000,
"number_of_simulations": 1,
"max_concurrent_runs": 1,
"assistant_starts_first": True,
"stop_on_failure": False,
"run_by": "<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({
logical_id: '<string>',
status: 'pending',
name: '<string>',
description: '<string>',
selected_workflow: {
workflow_id: '5eb7cf5a86d9755df3a6c593',
version_number: 0,
version_name: '<string>',
dynamic_variables: {},
name: '<string>',
total_events: 0,
total_nodes: 0,
total_duration_seconds: 0,
run_id: '5eb7cf5a86d9755df3a6c593'
},
counter_workflow: {
workflow_id: '5eb7cf5a86d9755df3a6c593',
version_number: 0,
version_name: '<string>',
dynamic_variables: {},
name: '<string>',
total_events: 0,
total_nodes: 0,
total_duration_seconds: 0,
run_id: '5eb7cf5a86d9755df3a6c593'
},
timeout_seconds: 120,
max_events: 3000,
number_of_simulations: 1,
max_concurrent_runs: 1,
assistant_starts_first: true,
stop_on_failure: false,
run_by: '<string>'
})
};
fetch('https://api-prod.interactly.ai/workflows/v1/simulations', 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-prod.interactly.ai/workflows/v1/simulations",
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([
'logical_id' => '<string>',
'status' => 'pending',
'name' => '<string>',
'description' => '<string>',
'selected_workflow' => [
'workflow_id' => '5eb7cf5a86d9755df3a6c593',
'version_number' => 0,
'version_name' => '<string>',
'dynamic_variables' => [
],
'name' => '<string>',
'total_events' => 0,
'total_nodes' => 0,
'total_duration_seconds' => 0,
'run_id' => '5eb7cf5a86d9755df3a6c593'
],
'counter_workflow' => [
'workflow_id' => '5eb7cf5a86d9755df3a6c593',
'version_number' => 0,
'version_name' => '<string>',
'dynamic_variables' => [
],
'name' => '<string>',
'total_events' => 0,
'total_nodes' => 0,
'total_duration_seconds' => 0,
'run_id' => '5eb7cf5a86d9755df3a6c593'
],
'timeout_seconds' => 120,
'max_events' => 3000,
'number_of_simulations' => 1,
'max_concurrent_runs' => 1,
'assistant_starts_first' => true,
'stop_on_failure' => false,
'run_by' => '<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-prod.interactly.ai/workflows/v1/simulations"
payload := strings.NewReader("{\n \"logical_id\": \"<string>\",\n \"status\": \"pending\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"selected_workflow\": {\n \"workflow_id\": \"5eb7cf5a86d9755df3a6c593\",\n \"version_number\": 0,\n \"version_name\": \"<string>\",\n \"dynamic_variables\": {},\n \"name\": \"<string>\",\n \"total_events\": 0,\n \"total_nodes\": 0,\n \"total_duration_seconds\": 0,\n \"run_id\": \"5eb7cf5a86d9755df3a6c593\"\n },\n \"counter_workflow\": {\n \"workflow_id\": \"5eb7cf5a86d9755df3a6c593\",\n \"version_number\": 0,\n \"version_name\": \"<string>\",\n \"dynamic_variables\": {},\n \"name\": \"<string>\",\n \"total_events\": 0,\n \"total_nodes\": 0,\n \"total_duration_seconds\": 0,\n \"run_id\": \"5eb7cf5a86d9755df3a6c593\"\n },\n \"timeout_seconds\": 120,\n \"max_events\": 3000,\n \"number_of_simulations\": 1,\n \"max_concurrent_runs\": 1,\n \"assistant_starts_first\": true,\n \"stop_on_failure\": false,\n \"run_by\": \"<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-prod.interactly.ai/workflows/v1/simulations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"logical_id\": \"<string>\",\n \"status\": \"pending\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"selected_workflow\": {\n \"workflow_id\": \"5eb7cf5a86d9755df3a6c593\",\n \"version_number\": 0,\n \"version_name\": \"<string>\",\n \"dynamic_variables\": {},\n \"name\": \"<string>\",\n \"total_events\": 0,\n \"total_nodes\": 0,\n \"total_duration_seconds\": 0,\n \"run_id\": \"5eb7cf5a86d9755df3a6c593\"\n },\n \"counter_workflow\": {\n \"workflow_id\": \"5eb7cf5a86d9755df3a6c593\",\n \"version_number\": 0,\n \"version_name\": \"<string>\",\n \"dynamic_variables\": {},\n \"name\": \"<string>\",\n \"total_events\": 0,\n \"total_nodes\": 0,\n \"total_duration_seconds\": 0,\n \"run_id\": \"5eb7cf5a86d9755df3a6c593\"\n },\n \"timeout_seconds\": 120,\n \"max_events\": 3000,\n \"number_of_simulations\": 1,\n \"max_concurrent_runs\": 1,\n \"assistant_starts_first\": true,\n \"stop_on_failure\": false,\n \"run_by\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.interactly.ai/workflows/v1/simulations")
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 \"logical_id\": \"<string>\",\n \"status\": \"pending\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"selected_workflow\": {\n \"workflow_id\": \"5eb7cf5a86d9755df3a6c593\",\n \"version_number\": 0,\n \"version_name\": \"<string>\",\n \"dynamic_variables\": {},\n \"name\": \"<string>\",\n \"total_events\": 0,\n \"total_nodes\": 0,\n \"total_duration_seconds\": 0,\n \"run_id\": \"5eb7cf5a86d9755df3a6c593\"\n },\n \"counter_workflow\": {\n \"workflow_id\": \"5eb7cf5a86d9755df3a6c593\",\n \"version_number\": 0,\n \"version_name\": \"<string>\",\n \"dynamic_variables\": {},\n \"name\": \"<string>\",\n \"total_events\": 0,\n \"total_nodes\": 0,\n \"total_duration_seconds\": 0,\n \"run_id\": \"5eb7cf5a86d9755df3a6c593\"\n },\n \"timeout_seconds\": 120,\n \"max_events\": 3000,\n \"number_of_simulations\": 1,\n \"max_concurrent_runs\": 1,\n \"assistant_starts_first\": true,\n \"stop_on_failure\": false,\n \"run_by\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"simulation": {
"team_id": "<string>",
"created_by": "<string>",
"updated_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"_id": "5eb7cf5a86d9755df3a6c593",
"simulation_config": {
"logical_id": "<string>",
"status": "pending",
"name": "<string>",
"description": "<string>",
"selected_workflow": {
"workflow_id": "<string>",
"version_number": 0,
"version_name": "<string>",
"dynamic_variables": {},
"name": "<string>",
"total_events": 0,
"total_nodes": 0,
"total_duration_seconds": 0,
"run_id": "<string>"
},
"counter_workflow": {
"workflow_id": "<string>",
"version_number": 0,
"version_name": "<string>",
"dynamic_variables": {},
"name": "<string>",
"total_events": 0,
"total_nodes": 0,
"total_duration_seconds": 0,
"run_id": "<string>"
},
"timeout_seconds": 120,
"max_events": 3000,
"number_of_simulations": 1,
"max_concurrent_runs": 1,
"assistant_starts_first": true,
"stop_on_failure": false,
"run_by": "<string>"
}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Retrieve your API Key from Dashboard API Keys Section.
Body
Unique identifier for the simulation
Current status of the simulation
pending, running, completed, failed, cancelled Name of the simulation
Description of the simulation
Details about the selected workflow execution
Show child attributes
Show child attributes
Details about the counter workflow execution
Show child attributes
Show child attributes
Maximum time in seconds to run the simulation
Maximum number of events to process in the simulation
Number of times to run the simulation
Maximum number of concurrent simulation runs allowed
If True, the assistant workflow will kick off first, else it will be the user workflow.
Whether to stop the simulation on failure
Identifier of the user or system that initiated the workflow simulation
Response
Successful Response
Response model for a single simulation. Contains a SimulationConfigModel object.
Single simulation object
Show child attributes
Show child attributes