---
title: "Create or update a case"
method: POST
path: "/validations/{uri}/{case_id}"
tags: ["validations"]
---

# Create or update a case

`POST /validations/{uri}/{case_id}`

## Request

- The document declares no server URL.
- Auth: none declared

Creates or updates a case in a validation file. If the case ID exists, it will be updated; otherwise, a new case will be created.

## Path parameters

- `uri` string, required: Validation file URI (base64url-encoded)
- `case_id` string, required: Case ID (base64url-encoded)

## Request body

- ValidationCaseRequest: Request body for creating or updating a validation case.
  - `id` union
    - string
    - string[]
  - `labels` object, nullable
  - `predicate` string, nullable
  - `split` string, nullable
  - `target` unknown
  - `task_id` string, nullable
  - `task_repeat` integer, nullable

## Response `200`

Successful Response

- object

## Changes

- **2026-05-24** `6482a1a81d1b`: 2 info
  - added the new optional request property `task_id`
  - added the new optional request property `task_repeat`
- **2026-04-03** `0fc41a5c1e02`: 1 breaking
  - removed `subschema #1, subschema #2, subschema #3, subschema #4, subschema #5, subschema #6, subschema #7` from the `target/anyOf[#/components/schemas/JsonValue]/` request property `oneOf` list
- **2026-03-17** `d2a0b9f760ff`: 2 warning, 1 info
  - removed the request property `task_id`
  - removed the request property `task_repeat`
  - added `subschema #1, subschema #2, subschema #3, subschema #4, subschema #5, subschema #6, subschema #7` to the `target/anyOf[#/components/schemas/JsonValue]/` request property `oneOf` list

[Operation history](https://skmtc.dev/meridianlabs-ai/apis/inspect-scout-viewer-api/changes/validations/:uri/:case_id/post.md)

---

[API](https://skmtc.dev/meridianlabs-ai/apis/inspect-scout-viewer-api.md) - [All operations](https://skmtc.dev/meridianlabs-ai/apis/inspect-scout-viewer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/meridianlabs-ai/apis/inspect-scout-viewer-api/revisions/b799e9a81653?raw)
