Skip to main content
POST
curl

Authorizations

Authorization
string
header
required

An API key (sig_...), or a session token from the web app.

Path Parameters

agentId
string<uuid>
required

The agent's id.

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
Example:

"3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f"

testId
string<uuid>
required

The test's id.

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
Example:

"3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f"

Body

application/json
spec
object
required

The test as it should be, as a TestSpec.

why
string

Why the criteria should change.

Maximum string length: 1000
goalId
string<uuid>
Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
Example:

"3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f"

Response

The proposal, pending.

object
enum<string>
required
Available options:
criteria_proposal
id
string<uuid>
required
Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
Example:

"3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f"

testId
string<uuid>
required
Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
Example:

"3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f"

testTitle
string | null
required
baseRevision
integer
required

The revision it was written against.

currentRevision
integer
required

The test's revision now. Approving a proposal on an older one applies its criteria only.

status
enum<string>
required
Available options:
pending,
approved,
rejected,
superseded
why
string | null
required
diff
object
required

Criterion ids added, removed and changed against the base revision. Rewording counts as a change.

lines
object
required

The diff in the brief's current words.

spec
object
required

The test as proposed.

proposedBy
string | null
required
principalKind
enum<string>
required

Who recorded it: a person, an API key, or the in-app copilot.

Available options:
person,
key,
copilot
decidedBy
string | null
required
decidedAt
string<date-time> | null
required
Example:

"2026-10-02T14:03:07.120Z"

resultingRevision
integer | null
required
goalId
string<uuid> | null
required
Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
Example:

"3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f"

createdAt
string<date-time>
required
Example:

"2026-10-02T14:03:07.120Z"