---
title: "Add a test"
method: POST
path: "/api/v1/eval-cases"
tags: ["authed"]
---

# Add a test

`POST /api/v1/eval-cases`

## Request

- Base URL: `https://api.teaflask.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.teaflask.com/api/v1/eval-cases`
- Auth: none declared

Starts writing a test from a finished conversation an agent had with
one of its users, up to its latest message. The test is written in the
background: its status says when it's ready, refused or failed.

## Request body

- AddTest: The conversation a new test is written from.
  - `conversation_id` string, uuid, required: The conversation to turn into a test, as its agent served it.
  - `note` string, nullable: Why you're adding this test and what to look out for; the test's checks follow it. Leave it out to let the test's goal be inferred.

## Response `202`

Successful Response

- TestSummary: One test in an agent's list of tests.
  - `id` string, uuid, required: The test's id.
  - `agent_id` string, uuid, required: The agent the test belongs to.
  - `conversation_id` string, uuid, required: The conversation the test came from.
  - `conversation_title` string, required: That conversation's title.
  - `title` string, required: The test's title; empty until it is written.
  - `status` 'authoring' | 'authored' | 'admitting' | 'repairing' | 'ready' | 'broken' | 'refused' | 'failed', required
  - `status_reason` string, nullable, required: A sentence saying why the test is where it is, when there's more to say.
  - `status_retryable` boolean, required: Whether writing the test can be tried again.
  - `assertion_count` integer, required: How many checks the test's latest version makes.
  - `version_number` integer, nullable, required: The test's latest version; null until it is written.
  - `created_by_user_id` string, uuid, nullable, required: The member who added it.
  - `created_at` string, date-time, required: When it was added.
  - `updated_at` string, date-time, required: When it last changed.

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `405`: Method not allowed
- `422`: Validation error
- `500`: Internal server error

## Changes

- **2026-11-03** `c6ac9fd6657f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/teaflask/apis/teaflask-api/changes/api/v1/eval-cases/post.md)

---

[API](https://skmtc.dev/teaflask/apis/teaflask-api.md) - [All operations](https://skmtc.dev/teaflask/apis/teaflask-api/llms.txt) - [OpenAPI document](https://skmtc.dev/teaflask/apis/teaflask-api/revisions/c6ac9fd6657f?raw)
