Skip to main content
PATCH
Update a test

Authorizations

Authorization
string
header
required

An Egma API key.

Path Parameters

testId
string
required
Minimum string length: 1

Query Parameters

projectId
string
Minimum string length: 1

Body

application/json
name
string
description
string | null
scenario
string

The situation and goal the synthetic caller acts out.

expectedBehaviors
string[]

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

personas
string[]

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

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.

expectedVersionId
string

The versionId returned by the test read. Required when changing scenario, expectedBehaviors, personas, mockTools, or env; a stale value returns 409.

Minimum string length: 1
expectedRevision
string

The revision returned by the test read. Supply it to reject an update if the test's live identity changed since that read.

Minimum string length: 1

Response

The updated 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