> For the complete documentation index, see [llms.txt](https://help.aximo.autify.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.aximo.autify.com/api-reference-ko/test-cases.md).

# Test Cases

Create, list, and inspect saved test cases.

## Save a session as a test case

> Persists a finished agent session as a reusable test case and links the two.\
> The session must be in a terminal state (\`succeeded\`, \`failed\`, \`terminated\`,\
> \`error\`) and not already linked to a case. The scenario defaults to the\
> session summary; mobile/web run configuration is carried over automatically.\
> \
> The created case has \*\*API access enabled by default\*\*, so it can be triggered\
> immediately with \`POST /api/triggers/cases/{caseId}/run\`.<br>

```json
{"openapi":"3.0.3","info":{"title":"Aximo API","version":"1.0.0"},"tags":[{"name":"Test Cases","description":"Create, list, and inspect saved test cases."}],"servers":[{"url":"/","description":"Current environment"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Organization API key generated from Settings → API Keys."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit exceeded — e.g. the daily session limit was reached for the\norganization, or too many API requests were sent in a short window\n(retry after the number of seconds in the `Retry-After` header).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/sessions/{sessionId}/save-as-case":{"post":{"operationId":"saveSessionAsCase","summary":"Save a session as a test case","description":"Persists a finished agent session as a reusable test case and links the two.\nThe session must be in a terminal state (`succeeded`, `failed`, `terminated`,\n`error`) and not already linked to a case. The scenario defaults to the\nsession summary; mobile/web run configuration is carried over automatically.\n\nThe created case has **API access enabled by default**, so it can be triggered\nimmediately with `POST /api/triggers/cases/{caseId}/run`.\n","tags":["Test Cases"],"parameters":[{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Session UUID to save as a case."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500,"description":"Case title. Defaults to the session title."},"type":{"type":"string","enum":["web","mobile","desktop"],"description":"Case type. Inferred from the session platform if omitted."},"scenario":{"type":"string","minLength":1,"description":"Scenario text. Defaults to the session summary."},"format":{"type":"string","enum":["gherkin","markdown","plain_text"],"description":"Scenario format."}}}}}},"responses":{"201":{"description":"Case created from the session.","content":{"application/json":{"schema":{"type":"object","required":["success","caseId","projectId"],"properties":{"success":{"type":"boolean"},"caseId":{"type":"string","format":"uuid"},"projectId":{"type":"string","format":"uuid"}}}}}},"400":{"description":"Session is not in a terminal state, is already linked to a case, has no\nproject, or has no summary and no scenario was provided.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Session not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```

## List test cases

> List saved test cases for a workspace.

```json
{"openapi":"3.0.3","info":{"title":"Aximo API","version":"1.0.0"},"tags":[{"name":"Test Cases","description":"Create, list, and inspect saved test cases."}],"servers":[{"url":"/","description":"Current environment"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Organization API key generated from Settings → API Keys."}},"schemas":{"CaseList":{"type":"object","required":["items","totalCount","page","pageSize","totalPages"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CaseListItem"}},"totalCount":{"type":"integer"},"page":{"type":"integer"},"pageSize":{"type":"integer"},"totalPages":{"type":"integer"}}},"CaseListItem":{"type":"object","required":["id","projectId","type","createdAt","updatedAt"],"properties":{"id":{"type":"string","format":"uuid"},"projectId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["web","mobile","desktop","multi_device"]},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true,"description":"Truncated to 200 characters."},"startUrl":{"type":"string","nullable":true},"lastRunAt":{"type":"string","format":"date-time","nullable":true},"lastStatus":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit exceeded — e.g. the daily session limit was reached for the\norganization, or too many API requests were sent in a short window\n(retry after the number of seconds in the `Retry-After` header).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/cases":{"get":{"operationId":"listCases","summary":"List test cases","description":"List saved test cases for a workspace.","tags":["Test Cases"],"parameters":[{"name":"projectId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"type","in":"query","schema":{"type":"string","enum":["web","mobile","desktop","multi_device"]}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Free-text match on title, description, or scenario."},{"name":"directoryId","in":"query","schema":{"type":"string"},"description":"Filter cases by directory. Pass a UUID to filter to that directory, or an\nempty string (`?directoryId=`) to filter to cases not in any directory.\nOmit the parameter entirely to include all cases.\n"},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"pageSize","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}],"responses":{"200":{"description":"Paginated case list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseList"}}}},"400":{"description":"Invalid query parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Project not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```

## Create a test case

> Creates a saved test case in a workspace. Cases created via the API have\
> \*\*API access enabled by default\*\*, so they can be triggered immediately with\
> \`POST /api/triggers/cases/{caseId}/run\`.<br>

```json
{"openapi":"3.0.3","info":{"title":"Aximo API","version":"1.0.0"},"tags":[{"name":"Test Cases","description":"Create, list, and inspect saved test cases."}],"servers":[{"url":"/","description":"Current environment"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Organization API key generated from Settings → API Keys."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit exceeded — e.g. the daily session limit was reached for the\norganization, or too many API requests were sent in a short window\n(retry after the number of seconds in the `Retry-After` header).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/cases":{"post":{"operationId":"createCase","summary":"Create a test case","description":"Creates a saved test case in a workspace. Cases created via the API have\n**API access enabled by default**, so they can be triggered immediately with\n`POST /api/triggers/cases/{caseId}/run`.\n","tags":["Test Cases"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["projectId","scenario"],"properties":{"projectId":{"type":"string","format":"uuid","description":"ID of the workspace to create the case in."},"scenario":{"type":"string","minLength":1,"description":"Test scenario text (Gherkin, markdown, or plain text)."},"type":{"type":"string","enum":["web","mobile","desktop"],"default":"web","description":"Test case type."},"title":{"type":"string","minLength":1,"maxLength":500,"description":"Case title. Defaults to the first line of the scenario."},"description":{"type":"string"},"format":{"type":"string","enum":["gherkin","markdown","plain_text"],"description":"Scenario format."},"startUrl":{"type":"string","format":"uri","nullable":true,"description":"Starting URL (web/desktop cases)."},"directoryId":{"type":"string","format":"uuid","description":"Optional directory to place the case in."}}}}}},"responses":{"201":{"description":"Case created.","content":{"application/json":{"schema":{"type":"object","required":["success","caseId"],"properties":{"success":{"type":"boolean"},"caseId":{"type":"string","format":"uuid"}}}}}},"400":{"description":"Invalid request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Project or directory not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```

## Get a test case

> Returns the full scenario text and metadata for a test case, including\
> its per-target default configuration (mobile, web hostname overrides,\
> desktop, multi-device). Device and upload identifiers in the configs\
> are encrypted tokens (the same currency as \`/api/devices\` and\
> \`/api/uploads\`). The top-level \`deviceArn\` and \`uploadArn\` tokens can\
> be passed to \`POST /api/triggers/cases/{caseId}/run\` as per-run\
> overrides, which supersede the stored mobile/web/desktop defaults for\
> a single run.<br>

```json
{"openapi":"3.0.3","info":{"title":"Aximo API","version":"1.0.0"},"tags":[{"name":"Test Cases","description":"Create, list, and inspect saved test cases."}],"servers":[{"url":"/","description":"Current environment"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Organization API key generated from Settings → API Keys."}},"schemas":{"CaseDetail":{"type":"object","required":["id","projectId","type","scenario","format","createdAt","updatedAt"],"properties":{"id":{"type":"string","format":"uuid"},"projectId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["web","mobile","desktop","multi_device"]},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"scenario":{"type":"string","description":"Test case content (interpretation depends on `format`)."},"format":{"type":"string","enum":["gherkin","markdown","plain_text"]},"startUrl":{"type":"string","nullable":true},"apiEnabled":{"type":"boolean"},"lastRunAt":{"type":"string","format":"date-time","nullable":true},"lastStatus":{"type":"string","nullable":true},"archivedAt":{"type":"string","format":"date-time","nullable":true,"description":"Set when the case was archived (soft-deleted). Archived cases are excluded from lists but stay readable by id."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"apiMobileConfig":{"allOf":[{"$ref":"#/components/schemas/CaseMobileConfig"}],"nullable":true,"description":"Default mobile targeting; per-run trigger overrides supersede it."},"apiWebConfig":{"allOf":[{"$ref":"#/components/schemas/CaseWebConfig"}],"nullable":true,"description":"Default web hostname overrides; per-run trigger overrides supersede them."},"apiDesktopConfig":{"allOf":[{"$ref":"#/components/schemas/CaseDesktopConfig"}],"nullable":true,"description":"Default BYOD desktop targeting; per-run trigger overrides supersede it."},"apiMultiDeviceConfig":{"type":"array","nullable":true,"minItems":2,"maxItems":3,"items":{"$ref":"#/components/schemas/CaseMultiDeviceDevice"},"description":"Multi-device targeting (2-3 devices). Read-only default: the\ntrigger endpoint has no multi-device override fields, so runs\nalways use this stored configuration.\n"}}},"CaseMobileConfig":{"type":"object","required":["deviceArn","deviceName"],"properties":{"deviceArn":{"type":"string","description":"Encrypted device identifier token."},"deviceName":{"type":"string"},"platform":{"type":"string","enum":["ANDROID","IOS"]},"uploadArn":{"type":"string","description":"Encrypted upload identifier token."},"uploadType":{"type":"string","enum":["own_app","existing","sample"]},"appName":{"type":"string"},"bundleId":{"type":"string"},"apps":{"type":"array","maxItems":3,"items":{"$ref":"#/components/schemas/CaseAppInfo"}}}},"CaseAppInfo":{"type":"object","required":["uploadArn","uploadType","appName"],"properties":{"uploadArn":{"type":"string","description":"Encrypted upload identifier token."},"uploadType":{"type":"string","enum":["own_app","existing","sample"]},"appName":{"type":"string","nullable":true},"bundleId":{"type":"string"}}},"CaseWebConfig":{"type":"object","properties":{"hostnameOverrideIds":{"type":"array","items":{"type":"string","format":"uuid"}}}},"CaseDesktopConfig":{"type":"object","required":["userDeviceId","name","platform","os"],"properties":{"userDeviceId":{"type":"string","format":"uuid","description":"The registered BYOD desktop device this case runs on."},"name":{"type":"string"},"platform":{"type":"string","enum":["windows","macos","linux"]},"os":{"type":"string","nullable":true}}},"CaseMultiDeviceDevice":{"oneOf":[{"$ref":"#/components/schemas/CaseMultiDeviceWebDevice"},{"$ref":"#/components/schemas/CaseMultiDeviceMobileDevice"}],"discriminator":{"propertyName":"kind","mapping":{"web":"#/components/schemas/CaseMultiDeviceWebDevice","mobile":"#/components/schemas/CaseMultiDeviceMobileDevice"}}},"CaseMultiDeviceWebDevice":{"type":"object","required":["kind","name"],"properties":{"kind":{"type":"string","enum":["web"]},"name":{"type":"string"},"startUrl":{"type":"string","nullable":true},"userDeviceId":{"type":"string","format":"uuid","description":"When set, this entry runs on the user's registered desktop device."},"localDeviceName":{"type":"string","description":"Display-name snapshot of the registered device, resolved when the config was saved."}}},"CaseMultiDeviceMobileDevice":{"type":"object","required":["kind","name","mobilePlatform"],"properties":{"kind":{"type":"string","enum":["mobile"]},"name":{"type":"string"},"mobilePlatform":{"type":"string","enum":["android","ios"]},"deviceArn":{"type":"string","description":"Encrypted device identifier token."},"deviceName":{"type":"string"},"userDeviceId":{"type":"string","format":"uuid","description":"When set, this entry runs on the user's registered phone."},"localDeviceName":{"type":"string","description":"Display-name snapshot of the registered device, resolved when the config was saved."},"uploadArn":{"type":"string","description":"Encrypted upload identifier token."},"uploadType":{"type":"string","enum":["own_app","existing","sample"]},"appName":{"type":"string"},"bundleId":{"type":"string"},"apps":{"type":"array","maxItems":3,"items":{"$ref":"#/components/schemas/CaseAppInfo"}}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit exceeded — e.g. the daily session limit was reached for the\norganization, or too many API requests were sent in a short window\n(retry after the number of seconds in the `Retry-After` header).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/cases/{caseId}":{"get":{"operationId":"getCase","summary":"Get a test case","description":"Returns the full scenario text and metadata for a test case, including\nits per-target default configuration (mobile, web hostname overrides,\ndesktop, multi-device). Device and upload identifiers in the configs\nare encrypted tokens (the same currency as `/api/devices` and\n`/api/uploads`). The top-level `deviceArn` and `uploadArn` tokens can\nbe passed to `POST /api/triggers/cases/{caseId}/run` as per-run\noverrides, which supersede the stored mobile/web/desktop defaults for\na single run.\n","tags":["Test Cases"],"parameters":[{"name":"caseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Test case.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Test case not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```

## Permanently delete an archived test case

> 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;\
> past run sessions are kept but detached from the case. This cannot be undone.<br>

```json
{"openapi":"3.0.3","info":{"title":"Aximo API","version":"1.0.0"},"tags":[{"name":"Test Cases","description":"Create, list, and inspect saved test cases."}],"servers":[{"url":"/","description":"Current environment"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Organization API key generated from Settings → API Keys."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit exceeded — e.g. the daily session limit was reached for the\norganization, or too many API requests were sent in a short window\n(retry after the number of seconds in the `Retry-After` header).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/cases/{caseId}":{"delete":{"operationId":"deleteCase","summary":"Permanently delete an archived test case","description":"Permanently deletes a test case that has already been archived. Archive it\nfirst with `POST /api/cases/{caseId}/archive`; a case that is not archived\nis refused with 409. The case is removed from any plans it belongs to;\npast run sessions are kept but detached from the case. This cannot be undone.\n","tags":["Test Cases"],"parameters":[{"name":"caseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Case deleted.","content":{"application/json":{"schema":{"type":"object","required":["success"],"properties":{"success":{"type":"boolean"}}}}}},"400":{"description":"Invalid case ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Test case not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Case is not archived. Archive it first via POST /api/cases/{caseId}/archive.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```

## Update a test case

> Updates the provided fields of a test case; omitted fields are left\
> unchanged. At least one field is required. Set \`startUrl\` or\
> \`description\` to \`null\` to clear it; an empty-string \`description\` is\
> stored as an empty description, not treated as a clear.<br>

```json
{"openapi":"3.0.3","info":{"title":"Aximo API","version":"1.0.0"},"tags":[{"name":"Test Cases","description":"Create, list, and inspect saved test cases."}],"servers":[{"url":"/","description":"Current environment"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Organization API key generated from Settings → API Keys."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit exceeded — e.g. the daily session limit was reached for the\norganization, or too many API requests were sent in a short window\n(retry after the number of seconds in the `Retry-After` header).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/cases/{caseId}":{"patch":{"operationId":"updateCase","summary":"Update a test case","description":"Updates the provided fields of a test case; omitted fields are left\nunchanged. At least one field is required. Set `startUrl` or\n`description` to `null` to clear it; an empty-string `description` is\nstored as an empty description, not treated as a clear.\n","tags":["Test Cases"],"parameters":[{"name":"caseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","minProperties":1,"properties":{"title":{"type":"string","maxLength":500},"description":{"type":"string","nullable":true,"description":"Set to `null` to clear the description. Omitting the field leaves it unchanged; an empty string is stored as an empty description, not a clear."},"scenario":{"type":"string","description":"Scenario content; interpretation depends on `format`."},"type":{"type":"string","enum":["web","mobile","desktop","multi_device"]},"format":{"type":"string","enum":["gherkin","markdown","plain_text"]},"startUrl":{"type":"string","format":"uri","nullable":true}}}}}},"responses":{"200":{"description":"Case updated.","content":{"application/json":{"schema":{"type":"object","required":["success","case"],"properties":{"success":{"type":"boolean"},"case":{"type":"object","required":["id","projectId","type","title","scenario","format","updatedAt"],"properties":{"id":{"type":"string","format":"uuid"},"projectId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["web","mobile","desktop","multi_device"]},"title":{"type":"string"},"description":{"type":"string","nullable":true},"scenario":{"type":"string"},"format":{"type":"string","enum":["gherkin","markdown","plain_text"]},"startUrl":{"type":"string","format":"uri","nullable":true},"updatedAt":{"type":"string","format":"date-time"}}}}}}}},"400":{"description":"Invalid request body or case ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Test case not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```

## Archive a test case

> Archives (soft-deletes) a test case. The case is hidden from case lists,\
> directory counts, and plan membership, and can no longer be updated or\
> run, but its plan membership rows and run history are kept and the case\
> stays readable by id with \`archivedAt\` set. Idempotent: archiving an\
> already-archived case succeeds.<br>

```json
{"openapi":"3.0.3","info":{"title":"Aximo API","version":"1.0.0"},"tags":[{"name":"Test Cases","description":"Create, list, and inspect saved test cases."}],"servers":[{"url":"/","description":"Current environment"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Organization API key generated from Settings → API Keys."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit exceeded — e.g. the daily session limit was reached for the\norganization, or too many API requests were sent in a short window\n(retry after the number of seconds in the `Retry-After` header).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/cases/{caseId}/archive":{"post":{"operationId":"archiveCase","summary":"Archive a test case","description":"Archives (soft-deletes) a test case. The case is hidden from case lists,\ndirectory counts, and plan membership, and can no longer be updated or\nrun, but its plan membership rows and run history are kept and the case\nstays readable by id with `archivedAt` set. Idempotent: archiving an\nalready-archived case succeeds.\n","tags":["Test Cases"],"parameters":[{"name":"caseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Case archived.","content":{"application/json":{"schema":{"type":"object","required":["archived"],"properties":{"archived":{"type":"boolean"}}}}}},"400":{"description":"Invalid case ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Test case not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```
