---
search:
  tags:
    - V1
    - POST
seo:
  description: >-
    Add cases to the test suite's draft. Each case… Reference for the POST
    /v1/projects/{projectId}/test-suites/{testSuiteId}/cases endpoint in the
    Judgeval API.
sidebar:
  label: Add cases to a test suite's draft
  badge: POST
title: Add cases to a test suite's draft
type: openapi-operation
---
Add cases to the test suite's draft. Each case has an input for the agent and an expected object keyed by judge id: &#123;judge_major_version, judge_minor_version, op, expected&#125;. A check passes when the judge's output &lt;op> expected; op is eq, ne, lt, lte, gt, gte, in or not_in. Publish the draft to run it.

`POST /v1/projects/{projectId}/test-suites/{testSuiteId}/cases`

**Request body** (`application/json`, required)

- `cases` (TestCaseInput[], required)

Request body example:

```json
{
  "cases": [
    {
      "name": "string",
      "input": null,
      "expected": {},
      "tags": [
        "string"
      ],
      "metadata": {}
    }
  ]
}
```

**Responses**

- `200` — Response for status 200
- `404` — Response for status 404
- `409` — Response for status 409
- `422` — Response for status 422

Response example, 200:

```json
{
  "case_ids": [
    "string"
  ]
}
```
