---
title: "Update Spec"
method: PATCH
path: "/api/specs/{spec_id}"
tags: ["specs"]
---

# Update Spec

`PATCH /api/specs/{spec_id}`

## Request

- Base URL: `https://api.modelwatch.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.modelwatch.app/api/specs/{spec_id}`
- Auth: HTTP bearer

## Path parameters

- `spec_id` string, uuid, required

## Request body

- SpecUpdate
  - `name` string, nullable
  - `description` string, nullable
  - `input_text` string, nullable
  - `expected_format` string, nullable
  - `expected_json_schema` object, nullable
  - `expected_contains` string[], nullable
  - `expected_not_contains` string[], nullable
  - `min_length` integer, nullable
  - `max_length` integer, nullable
  - `semantic_threshold` number, nullable
  - `schedule` 'hourly' | 'daily' | 'weekly' | 'on_trigger'
  - `is_active` boolean, nullable

## Response `200`

Successful Response

- SpecOut
  - `id` string, uuid, required
  - `endpoint_id` string, uuid, required
  - `name` string, required
  - `description` string, nullable, required
  - `input_text` string, required
  - `expected_format` string, nullable, required
  - `expected_contains` string[], nullable, required
  - `expected_not_contains` string[], nullable, required
  - `min_length` integer, nullable, required
  - `max_length` integer, nullable, required
  - `semantic_threshold` number, required
  - `schedule` 'hourly' | 'daily' | 'weekly' | 'on_trigger', required
  - `is_active` boolean, required
  - `has_baseline` boolean
  - `baseline_set_at` string, date-time, nullable
  - `created_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

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