Personas
Get persona options (mission types and persona types)
Smart endpoint that handles multiple scenarios for getting persona options:
- Legacy: Provide only
flowIdto analyze the entire flow - AI Agent Specific: Provide
flowId+aiagentReferenceIdto analyze a specific AI agent - Job Node Specific: Provide
flowId+aiagentReferenceId+jobNodeIdto analyze a specific job node
POST
/
personas
/
options
Get persona options (mission types and persona types)
curl --request POST \
--url https://api-trial.cognigy.ai/testing/personas/options \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"flowId": "<string>",
"aiagentReferenceId": "<string>",
"jobNodeId": "<string>"
}
'import requests
url = "https://api-trial.cognigy.ai/testing/personas/options"
payload = {
"flowId": "<string>",
"aiagentReferenceId": "<string>",
"jobNodeId": "<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({flowId: '<string>', aiagentReferenceId: '<string>', jobNodeId: '<string>'})
};
fetch('https://api-trial.cognigy.ai/testing/personas/options', 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/personas/options",
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([
'flowId' => '<string>',
'aiagentReferenceId' => '<string>',
'jobNodeId' => '<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/personas/options"
payload := strings.NewReader("{\n \"flowId\": \"<string>\",\n \"aiagentReferenceId\": \"<string>\",\n \"jobNodeId\": \"<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/personas/options")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"flowId\": \"<string>\",\n \"aiagentReferenceId\": \"<string>\",\n \"jobNodeId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-trial.cognigy.ai/testing/personas/options")
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 \"flowId\": \"<string>\",\n \"aiagentReferenceId\": \"<string>\",\n \"jobNodeId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"simulationName": "<string>",
"missionTypes": [
{
"name": "<string>",
"description": "<string>",
"successCriteria": [
{
"name": "<string>",
"description": "<string>"
}
]
}
],
"personaTypes": [
{
"name": "<string>",
"description": "<string>"
}
]
}{
"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>"
}Authorizations
bearerAuthapiKeyAuth
JWT Bearer Token for authentication
Query Parameters
Project identifier
Body
application/json
Response
Persona options retrieved successfully
Last modified on July 2, 2026
⌘I
Get persona options (mission types and persona types)
curl --request POST \
--url https://api-trial.cognigy.ai/testing/personas/options \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"flowId": "<string>",
"aiagentReferenceId": "<string>",
"jobNodeId": "<string>"
}
'import requests
url = "https://api-trial.cognigy.ai/testing/personas/options"
payload = {
"flowId": "<string>",
"aiagentReferenceId": "<string>",
"jobNodeId": "<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({flowId: '<string>', aiagentReferenceId: '<string>', jobNodeId: '<string>'})
};
fetch('https://api-trial.cognigy.ai/testing/personas/options', 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/personas/options",
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([
'flowId' => '<string>',
'aiagentReferenceId' => '<string>',
'jobNodeId' => '<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/personas/options"
payload := strings.NewReader("{\n \"flowId\": \"<string>\",\n \"aiagentReferenceId\": \"<string>\",\n \"jobNodeId\": \"<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/personas/options")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"flowId\": \"<string>\",\n \"aiagentReferenceId\": \"<string>\",\n \"jobNodeId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-trial.cognigy.ai/testing/personas/options")
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 \"flowId\": \"<string>\",\n \"aiagentReferenceId\": \"<string>\",\n \"jobNodeId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"simulationName": "<string>",
"missionTypes": [
{
"name": "<string>",
"description": "<string>",
"successCriteria": [
{
"name": "<string>",
"description": "<string>"
}
]
}
],
"personaTypes": [
{
"name": "<string>",
"description": "<string>"
}
]
}{
"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>"
}