---
title: "Update Expectation"
method: PATCH
path: "/expectations/{id}"
tags: ["expectations", "Expectations"]
---

# Update Expectation

`PATCH /expectations/{id}`

Update Expectation

## Path parameters

- `id` integer, required

## Response `200`

The Expectations object.

- ExpectationEntity — ExpectationEntity model
  - `id` integer — Expectation ID
  - `workspace_id` integer — Workspace ID. `0` means the default workspace.
  - `name` string — Expectation name.
  - `description` string — Expectation description.
  - `path` string — Path scope for the expectation. Supports workspace-relative presentation.
  - `source` string — Source glob used to select candidate files.
  - `exclude_pattern` string — Optional source exclusion glob.
  - `disabled` boolean — If true, the expectation is disabled.
  - `expectations_version` integer — Criteria schema version for this expectation.
  - `trigger` 'manual' | 'upload' | 'daily' | 'custom_schedule' — How this expectation opens windows.
  - `interval` string — If trigger is `daily`, this specifies how often to run the expectation.
  - `recurring_day` integer — If trigger is `daily`, this selects the day number inside the chosen interval.
  - `schedule_id` integer — If trigger is `custom_schedule`, the reusable Schedule used instead of the Expectation's schedule fields.
  - `schedule_days_of_week` integer[] — If trigger is `custom_schedule`, the 0-based weekdays used by the schedule.
  - `schedule_times_of_day` string[] — Times of day in HH:MM format for the Expectation schedule.
  - `schedule_time_zone` string — Time zone used by the Expectation schedule.
  - `holiday_region` string — Optional holiday region used by the Expectation schedule.
  - `lookback_interval` integer — How many seconds before the due boundary the window starts.
  - `late_acceptance_interval` integer — How many seconds a schedule-driven window may remain eligible to close as late.
  - `inactivity_interval` integer — How many quiet seconds are required before final closure.
  - `max_open_interval` integer — Hard-stop duration in seconds for unscheduled expectations.
  - `criteria` object — Versioned success criteria definition for the expectation. Criteria v2 supports optional FTS content validation.
  - `last_evaluated_at` string, date-time — Last time this expectation was evaluated.
  - `last_success_at` string, date-time — Last time this expectation closed successfully.
  - `last_failure_at` string, date-time — Last time this expectation closed with a failure result.
  - `last_result` 'success' | 'late' | 'missing' | 'invalid' — Most recent terminal result for this expectation.
  - `created_at` string, date-time — Creation time.
  - `updated_at` string, date-time — Last update time.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `405` — Method Not Allowed
- `409` — Conflict
- `412` — Precondition Failed
- `422` — Unprocessable Entity
- `423` — Locked
- `429` — Too Many Requests

---

[API](https://skmtc.net/files/apis/files-com-api.md) · [All operations](https://skmtc.net/files/apis/files-com-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/files/files-com-api/versions/c80c746637fd/schema)
