---
title: "Update Testset"
method: PUT
path: "/testsets/{testset_id}"
tags: ["Testsets"]
---

# Update Testset

`PUT /testsets/{testset_id}`

Update a testset with given id, update the testset in Postgres.

Args:
testset_id (str): id of the test set to be updated.
csvdata (NewTestset): New data to replace the old testset.

Returns:
str: The id of the test set updated.

## Path parameters

- `testset_id` string, required

## Request body

- NewTestset
  - `name` string, required
  - `csvdata` object[], required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

## Changes

- **2025-06-27** `e3e84db47198` — 3 breaking, 5 warning, 2 info
  - added the new required request property `csvdata`
  - added the new required request property `name`
  - the response's body type/format changed from `object`/`` to ``/`` for status `200`
  - removed the request property `testset`
  - …6 more

[Change history](https://skmtc.dev/agenta-ai/apis/agenta-api/changes/testsets/:testset_id/put.md)

---

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