---
title: "Archive Environment Variant"
method: POST
path: "/preview/environments/variants/{environment_variant_id}/archive"
tags: ["Environments"]
---

# Archive Environment Variant

`POST /preview/environments/variants/{environment_variant_id}/archive`

## Path parameters

- `environment_variant_id` string, uuid, required

## Response `200`

Successful Response

- EnvironmentVariantResponse
  - `count` integer
  - `environment_variant` EnvironmentVariant
    - `environment_id` string, uuid, nullable
    - `artifact_id` string, uuid, nullable
    - `flags` object, nullable
    - `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
    - `slug` string, nullable
    - `id` string, uuid, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2026-02-13** `72fe88316d15` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/agenta-ai/apis/agenta-api/changes/preview/environments/variants/:environment_variant_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/8b06b786c977?raw)
