curl --request PATCH \
--url https://app.egma.ai/v1/tests/{testId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'{
"id": "<string>",
"projectId": "<string>",
"suiteId": "<string>",
"name": "<string>",
"description": "<string>",
"version": 2,
"versionId": "<string>",
"scenario": "<string>",
"expectedBehaviors": [
"<string>"
],
"personas": [
{
"id": "<string>",
"name": "<string>",
"archivedAt": "2023-11-07T05:31:56Z"
}
],
"mockTools": [
{
"tool": "<string>",
"answer": "<unknown>",
"error": "<unknown>"
}
],
"env": {
"retell_dynamic_variables": {},
"job_dispatch_metadata": {}
},
"revision": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "version_conflict",
"message": "<string>",
"test": {
"id": "<string>",
"name": "<string>"
},
"expectedVersionId": "<string>",
"currentVersionId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Update a test
Omitted fields keep their current values. Content changes create an immutable version and require expectedVersionId from the last read. Name and description changes keep the content version. Existing simulations retain their original evidence.
curl --request PATCH \
--url https://app.egma.ai/v1/tests/{testId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'{
"id": "<string>",
"projectId": "<string>",
"suiteId": "<string>",
"name": "<string>",
"description": "<string>",
"version": 2,
"versionId": "<string>",
"scenario": "<string>",
"expectedBehaviors": [
"<string>"
],
"personas": [
{
"id": "<string>",
"name": "<string>",
"archivedAt": "2023-11-07T05:31:56Z"
}
],
"mockTools": [
{
"tool": "<string>",
"answer": "<unknown>",
"error": "<unknown>"
}
],
"env": {
"retell_dynamic_variables": {},
"job_dispatch_metadata": {}
},
"revision": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "version_conflict",
"message": "<string>",
"test": {
"id": "<string>",
"name": "<string>"
},
"expectedVersionId": "<string>",
"currentVersionId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Authorizations
An Egma API key.
Path Parameters
1Query Parameters
1Body
The situation and goal the synthetic caller acts out.
Statements checked independently against the completed conversation. Include at least one non-empty statement.
At least one available persona ID or unambiguous current name. Each selected persona creates one simulation for this test in a run.
Test-owned tool answers. Use an empty array to remove existing mocks on update. Applying mocks requires a supported connection and, for LiveKit, tool instrumentation.
One named tool's fixed response for this test. Supply exactly one of answer or error. Tools without a mock run normally.
- Option 1
- Option 2
Show child attributes
Show child attributes
Non-secret startup context for the agent's provider. Omit to keep existing context on update, or send null to clear it.
Show child attributes
Show child attributes
The versionId returned by the test read. Required when changing scenario, expectedBehaviors, personas, mockTools, or env; a stale value returns 409.
1The revision returned by the test read. Supply it to reject an update if the test's live identity changed since that read.
1Response
The updated test.
111x >= 11Show child attributes
Show child attributes
One named tool's fixed response for this test. Supply exactly one of answer or error. Tools without a mock run normally.
- Option 1
- Option 2
Show child attributes
Show child attributes
Show child attributes
Show child attributes
1