Skip to main content
POST
Create a test in a test suite

Authorizations

Authorization
string
header
required

An Egma API key.

Query Parameters

projectId
string
Minimum string length: 1

Body

application/json
suiteId
string
required

An existing active test suite in the current project.

Minimum string length: 1
name
string
required
scenario
string
required

The situation and goal the synthetic caller acts out.

expectedBehaviors
string[]
required

Statements checked independently against the completed conversation. Include at least one non-empty statement.

personas
string[]
required

At least one available persona ID or unambiguous current name. Each selected persona creates one simulation for this test in a run.

description
string | null
mockTools
object[]

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.

env
object | null

Non-secret startup context for the agent's provider. Omit to keep existing context on update, or send null to clear it.

Response

The new test.

id
string
required
Minimum string length: 1
projectId
string
required
Minimum string length: 1
suiteId
string
required
Minimum string length: 1
name
string
required
description
string | null
required
version
integer
required
Required range: x >= 1
versionId
string
required
Minimum string length: 1
scenario
string
required
expectedBehaviors
string[]
required
personas
object[]
required
mockTools
object[]
required

One named tool's fixed response for this test. Supply exactly one of answer or error. Tools without a mock run normally.

env
object | null
required
revision
string
required
Minimum string length: 1
createdAt
string<date-time>
required
updatedAt
string<date-time>
required