---
title: "Archive Testset Revision"
method: POST
path: "/preview/testsets/revisions/{testset_revision_id}/archive"
tags: ["Testsets"]
---

# Archive Testset Revision

`POST /preview/testsets/revisions/{testset_revision_id}/archive`

## Request

- Base URL: `https://cloud.agenta.ai/api`
- URL: `https://cloud.agenta.ai/api/preview/testsets/revisions/{testset_revision_id}/archive`
- Auth: API key in header `Authorization`

## Path parameters

- `testset_revision_id` string, uuid, required

## Response `200`

Successful Response

- TestsetRevisionResponse
  - `count` integer
  - `testset_revision` TestsetRevision
    - `testset_variant_id` string, uuid, nullable
    - `variant_id` string, uuid, nullable
    - `testset_id` string, uuid, nullable
    - `artifact_id` string, uuid, nullable
    - `author` string, uuid, nullable
    - `date` string, date-time, nullable
    - `message` string, nullable
    - `flags` TestsetFlags: Placeholder for testset-level flags. This model is intentionally empty but kept as a dedicated type so that: - existing references to `flags: Optional[TestsetFlags]` remain valid, and - structured flags can be added here in the future without breaking the surrounding DTOs.
    - `tags` object, nullable
    - `meta` object, nullable
    - `name` string, nullable
    - `description` string, nullable
    - `created_at` string, date-time, nullable
    - `updated_at` string, date-time, nullable
    - `deleted_at` string, date-time, nullable
    - `created_by_id` string, uuid, nullable
    - `updated_by_id` string, uuid, nullable
    - `deleted_by_id` string, uuid, nullable
    - `version` string, nullable
    - `slug` string, nullable
    - `id` string, uuid, nullable
    - `data` TestsetRevisionDataOutput
      - `testcase_ids` string[], nullable
      - `testcases` TestcaseOutput[], nullable
        - `testset_id` string, uuid, nullable
        - `set_id` string, uuid, nullable
        - `created_at` string, date-time, nullable
        - `updated_at` string, date-time, nullable
        - `deleted_at` string, date-time, nullable
        - `created_by_id` string, uuid, nullable
        - `updated_by_id` string, uuid, nullable
        - `deleted_by_id` string, uuid, nullable
        - `id` string, uuid, nullable
        - `flags` object, nullable
        - `tags` object, nullable
        - `meta` object, nullable
        - `data` object, nullable

## Other responses

- `422`: Validation Error

## Changes

- **2026-02-13** `72fe88316d15`: 2 warning, 2 info
  - removed the optional property `testset_revision/anyOf[subschema #1: TestsetRevision]/flags/anyOf[subschema #1: TestsetFlags]/has_testcases` from the response with the `200` status
  - removed the optional property `testset_revision/anyOf[subschema #1: TestsetRevision]/flags/anyOf[subschema #1: TestsetFlags]/has_traces` from the response with the `200` status
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
- …earlier changes not shown

[Operation history](https://skmtc.dev/agenta-ai/apis/agenta-api/changes/preview/testsets/revisions/:testset_revision_id/archive/post.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.dev/agenta-ai/apis/agenta-api/revisions/42bb75a1c2e6?raw)
