curl --request POST \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/eval-suites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Booking golden path",
"description": "Happy-path bookings and a reschedule",
"scenarios": [
{
"name": "Book a table for two",
"simulator_config": {
"prompt": "You are Sara. You want a table for two tomorrow at 8 pm. Give your phone number when asked.",
"max_turns": 20
},
"test_cases": [
{
"name": "Confirms the booking",
"when_relevant": "The caller asks to book a table.",
"success_criteria": "The agent repeats date, time and party size and confirms the booking.",
"failure_criteria": "The agent ends the call without confirming the details."
}
]
},
{
"scenario_id": "b2a4c6e8-0f1d-4e3b-9c5a-7e9f1b3d5c7a"
}
],
"common_test_cases": [
{
"test_case_id": "c3d5e7f9-1a2b-4c3d-8e4f-5a6b7c8d9e0f"
}
]
}
'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/eval-suites"
payload = {
"name": "Booking golden path",
"description": "Happy-path bookings and a reschedule",
"scenarios": [{
"name": "Book a table for two",
"simulator_config": {
"prompt": "You are Sara. You want a table for two tomorrow at 8 pm. Give your phone number when asked.",
"max_turns": 20
},
"test_cases": [
{
"name": "Confirms the booking",
"when_relevant": "The caller asks to book a table.",
"success_criteria": "The agent repeats date, time and party size and confirms the booking.",
"failure_criteria": "The agent ends the call without confirming the details."
}
]
}, { "scenario_id": "b2a4c6e8-0f1d-4e3b-9c5a-7e9f1b3d5c7a" }],
"common_test_cases": [{ "test_case_id": "c3d5e7f9-1a2b-4c3d-8e4f-5a6b7c8d9e0f" }]
}
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({
name: 'Booking golden path',
description: 'Happy-path bookings and a reschedule',
scenarios: [
{
name: 'Book a table for two',
simulator_config: {
prompt: 'You are Sara. You want a table for two tomorrow at 8 pm. Give your phone number when asked.',
max_turns: 20
},
test_cases: [
{
name: 'Confirms the booking',
when_relevant: 'The caller asks to book a table.',
success_criteria: 'The agent repeats date, time and party size and confirms the booking.',
failure_criteria: 'The agent ends the call without confirming the details.'
}
]
},
{scenario_id: 'b2a4c6e8-0f1d-4e3b-9c5a-7e9f1b3d5c7a'}
],
common_test_cases: [{test_case_id: 'c3d5e7f9-1a2b-4c3d-8e4f-5a6b7c8d9e0f'}]
})
};
fetch('https://voice-api.onclarity.com/v1/projects/{projectId}/eval-suites', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"suite": {
"id": "7d1c2f8e-3b0a-4c55-9a1e-2f4b6c8d0e11",
"project_id": "4f3a9b2c-1d2e-4f5a-8b6c-7d8e9f0a1b2c",
"name": "Booking golden path",
"description": "Happy-path bookings and a reschedule",
"scenario_ids": [
"a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"b2a4c6e8-0f1d-4e3b-9c5a-7e9f1b3d5c7a"
],
"common_test_case_ids": [
"c3d5e7f9-1a2b-4c3d-8e4f-5a6b7c8d9e0f"
],
"sheet_refs": {},
"field_overrides": {},
"scenarios": [],
"common_test_cases": [],
"submissions_count": 0,
"created_by": "org-token:42",
"created_at": "2026-10-22T10:00:00.000Z",
"updated_at": "2026-10-22T10:00:00.000Z",
"deleted_at": null
}
}{
"error": "Invalid or revoked token"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "One or more scenario_ids not found in this project",
"missing_scenario_ids": [
"b2a4c6e8-0f1d-4e3b-9c5a-7e9f1b3d5c7a"
]
}{
"error": "An eval suite named \"Booking golden path\" already exists in this project"
}{
"error": "name: String must contain at least 1 character(s)",
"issues": [
{
"path": "name",
"code": "too_small",
"message": "String must contain at least 1 character(s)",
"minimum": 1
}
]
}Create an eval suite
Creates a suite in one request. Each scenario and test case is either a reference to an existing one (scenario_id / test_case_id) or a new one written inline, which is created with the suite. Everything is created together or not at all.
curl --request POST \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/eval-suites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Booking golden path",
"description": "Happy-path bookings and a reschedule",
"scenarios": [
{
"name": "Book a table for two",
"simulator_config": {
"prompt": "You are Sara. You want a table for two tomorrow at 8 pm. Give your phone number when asked.",
"max_turns": 20
},
"test_cases": [
{
"name": "Confirms the booking",
"when_relevant": "The caller asks to book a table.",
"success_criteria": "The agent repeats date, time and party size and confirms the booking.",
"failure_criteria": "The agent ends the call without confirming the details."
}
]
},
{
"scenario_id": "b2a4c6e8-0f1d-4e3b-9c5a-7e9f1b3d5c7a"
}
],
"common_test_cases": [
{
"test_case_id": "c3d5e7f9-1a2b-4c3d-8e4f-5a6b7c8d9e0f"
}
]
}
'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/eval-suites"
payload = {
"name": "Booking golden path",
"description": "Happy-path bookings and a reschedule",
"scenarios": [{
"name": "Book a table for two",
"simulator_config": {
"prompt": "You are Sara. You want a table for two tomorrow at 8 pm. Give your phone number when asked.",
"max_turns": 20
},
"test_cases": [
{
"name": "Confirms the booking",
"when_relevant": "The caller asks to book a table.",
"success_criteria": "The agent repeats date, time and party size and confirms the booking.",
"failure_criteria": "The agent ends the call without confirming the details."
}
]
}, { "scenario_id": "b2a4c6e8-0f1d-4e3b-9c5a-7e9f1b3d5c7a" }],
"common_test_cases": [{ "test_case_id": "c3d5e7f9-1a2b-4c3d-8e4f-5a6b7c8d9e0f" }]
}
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({
name: 'Booking golden path',
description: 'Happy-path bookings and a reschedule',
scenarios: [
{
name: 'Book a table for two',
simulator_config: {
prompt: 'You are Sara. You want a table for two tomorrow at 8 pm. Give your phone number when asked.',
max_turns: 20
},
test_cases: [
{
name: 'Confirms the booking',
when_relevant: 'The caller asks to book a table.',
success_criteria: 'The agent repeats date, time and party size and confirms the booking.',
failure_criteria: 'The agent ends the call without confirming the details.'
}
]
},
{scenario_id: 'b2a4c6e8-0f1d-4e3b-9c5a-7e9f1b3d5c7a'}
],
common_test_cases: [{test_case_id: 'c3d5e7f9-1a2b-4c3d-8e4f-5a6b7c8d9e0f'}]
})
};
fetch('https://voice-api.onclarity.com/v1/projects/{projectId}/eval-suites', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"suite": {
"id": "7d1c2f8e-3b0a-4c55-9a1e-2f4b6c8d0e11",
"project_id": "4f3a9b2c-1d2e-4f5a-8b6c-7d8e9f0a1b2c",
"name": "Booking golden path",
"description": "Happy-path bookings and a reschedule",
"scenario_ids": [
"a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"b2a4c6e8-0f1d-4e3b-9c5a-7e9f1b3d5c7a"
],
"common_test_case_ids": [
"c3d5e7f9-1a2b-4c3d-8e4f-5a6b7c8d9e0f"
],
"sheet_refs": {},
"field_overrides": {},
"scenarios": [],
"common_test_cases": [],
"submissions_count": 0,
"created_by": "org-token:42",
"created_at": "2026-10-22T10:00:00.000Z",
"updated_at": "2026-10-22T10:00:00.000Z",
"deleted_at": null
}
}{
"error": "Invalid or revoked token"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "One or more scenario_ids not found in this project",
"missing_scenario_ids": [
"b2a4c6e8-0f1d-4e3b-9c5a-7e9f1b3d5c7a"
]
}{
"error": "An eval suite named \"Booking golden path\" already exists in this project"
}{
"error": "name: String must contain at least 1 character(s)",
"issues": [
{
"path": "name",
"code": "too_small",
"message": "String must contain at least 1 character(s)",
"minimum": 1
}
]
}Authorizations
Your organization API key (it starts with anek_org_). The same key works on the Voice API and the Support API. See Authentication.
Path Parameters
Project id
Body
Unique within the project.
1 - 2561 - 20 elementsEither a reference to an existing scenario or a new scenario.
- Option 1
- Option 2
Show child attributes
Show child attributes
50Either a reference to an existing test case or a new test case.
- Option 1
- Option 2
Show child attributes
Show child attributes
Sheet replacements for eval calls; see EvalSuite.sheet_refs.
Show child attributes
Show child attributes
Prompt field values for every call of the suite. Checked against the agent's overridable fields when a submission is created.
Show child attributes
Show child attributes
Response
The created suite
A named, reusable set of scenarios plus test cases that apply to every scenario. An eval submission runs one suite against one agent.
Show child attributes
Show child attributes