---
title: "Create multiple Testcases"
method: POST
path: "/testsets/{testsetId}/testcases"
---

# Create multiple Testcases

`POST /testsets/{testsetId}/testcases`

Create multiple Testcases in the specified Testset.

## Path parameters

- `testsetId` string, required

## Request body

- object
  - `items` object[], required — Testcases to create (max 100).
    - `jsonData` object, required — The JSON data of the Testcase, which is validated against the Testset's schema.

## Response `201`

Testcases created successfully

- object
  - `items` Testcase[], required
    - `id` string, required — The ID of the Testcase.
    - `testsetId` string, required — The ID of the Testset this Testcase belongs to.
    - `jsonData` object, required — The JSON data of the Testcase, which is validated against the Testset's schema.
    - `inputs` object, required — Derived from data based on the Testset's fieldMapping. Contains all fields marked as inputs, including those with validation errors.
    - `expected` object, required — Derived from data based on the Testset's fieldMapping. Contains all fields marked as expected outputs, including those with validation errors.
    - `validationErrors` object[] — Validation errors found in the Testcase data. If present, the Testcase doesn't fully conform to its Testset's schema.
      - `path` string, required — JSON Pointer to the field with the validation error.
      - `message` string, required — Human-readable error description.

## Other responses

- `401` — Error indicating that the request is not authenticated.
- `500` — An internal service error indicating an issue with the Scorecard service.

## Changes

- **2025-05-28** `97ddfea9a000` — 1 breaking, 1 info
  - removed the required property `items/items/labels` from the response with the `201` status
  - added the required property `items/items/expected` to the response with the `201` status

[Change history](https://skmtc.dev/scorecard-ai/apis/scorecard-api/changes/testsets/:testsetId/testcases/post.md)

---

[API](https://skmtc.dev/scorecard-ai/apis/scorecard-api.md) · [All operations](https://skmtc.dev/scorecard-ai/apis/scorecard-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/scorecard-ai/scorecard-api/revisions/121aaa257802/schema)
