---
title: "Permanently delete an archived test case"
method: DELETE
path: "/api/cases/{caseId}"
tags: ["Test Cases"]
---

# Permanently delete an archived test case

`DELETE /api/cases/{caseId}`

## Request

- Base URL: `https://aximo.autify.com`
- URL: `https://aximo.autify.com/api/cases/{caseId}`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/autify/apis/aximo-api/docs/api/cases/:caseId/delete.ts> (a function with typed inputs; its response is checked against the schema)

Permanently deletes a test case that has already been archived. Archive it
first with `POST /api/cases/{caseId}/archive`; a case that is not archived
is refused with 409. The case is removed from any plans it belongs to, and
its rows in past plan runs are removed with it, so those runs show fewer
cases than their stored totals. The agent sessions themselves are kept but
detached from the case. This cannot be undone.

Requires an organization admin or owner. Member-scoped API keys receive
403; this permission was tightened and previously accepted any member.

## Path parameters

- `caseId` string, uuid, required

## Response `200`

Case deleted.

- object
  - `success` boolean, required

## Other responses

- `400`: Invalid case ID.
- `401`: Missing or invalid API key.
- `403`: Requires an organization admin or owner.
- `404`: Test case not found.
- `409`: Case is not archived. Archive it first via POST /api/cases/{caseId}/archive.
- `429`: Rate limit exceeded — e.g. the daily session limit was reached for the organization, or too many API requests were sent in a short window (retry after the number of seconds in the `Retry-After` header).
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/autify/apis/aximo-api.md) - [All operations](https://skmtc.dev/autify/apis/aximo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/autify/apis/aximo-api/revisions/590722011284?raw)
