---
title: "Replace an http check's response assertions (full replace)"
method: PATCH
path: "/checks/{id}/assertions"
tags: ["Checks"]
---

# Replace an http check's response assertions (full replace)

`PATCH /checks/{id}/assertions`

## Request

- Base URL: `https://realuptime.io/api/v1`
- URL: `https://realuptime.io/api/v1/checks/{id}/assertions`
- Auth: HTTP bearer

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `assertionBodyOp` 'contains' | 'not_contains'
  - `assertionBodyValue` string
  - `assertionBodyCaseSensitive` boolean
  - `assertionHeaderName` string
  - `assertionHeaderOp` 'equals' | 'contains'
  - `assertionHeaderValue` string
  - `assertionStatusMin` integer
  - `assertionStatusMax` integer
  - `assertionJsonPath` string
  - `assertionJsonOp` 'equals' | 'contains' | 'exists'
  - `assertionJsonValue` string

## Response `200`

The updated check.

- object
  - `check` object, required
    - `id` string, required
    - `account_id` string, required
    - `name` string, required
    - `url` string, nullable, required
    - `type` 'http' | 'heartbeat' | 'tcp' | 'dns' | 'multistep' | 'smtp' | 'ping' | 'browser', required
    - `tcp_host` string, nullable, required
    - `tcp_port` number, nullable, required
    - `tcp_tls` boolean, required
    - `interval_seconds` number, required
    - `selected_regions` string[], required
    - `assertion_body_op` 'contains' | 'not_contains', nullable
    - `assertion_body_value` string, nullable
    - `assertion_body_case_sensitive` boolean, nullable
    - `assertion_header_name` string, nullable
    - `assertion_header_op` 'equals' | 'contains', nullable
    - `assertion_header_value` string, nullable
    - `assertion_status_min` number, nullable
    - `assertion_status_max` number, nullable
    - `assertion_json_path` string, nullable
    - `assertion_json_op` 'equals' | 'contains' | 'exists', nullable
    - `assertion_json_value` string, nullable
    - `smtp_host` string, nullable
    - `smtp_port` number, nullable
    - `smtp_starttls` boolean
    - `ping_host` string, nullable
    - `paused_at` string, nullable
    - `tags` string[]
  - `isFirstCheck` boolean
  - `heartbeat` object
    - `state` 'operational' | 'down', required
    - `last_ping_at` string, nullable, required
    - `grace_seconds` number, required
    - `max_runtime_seconds` number, nullable, required
    - `latched` boolean, required
    - `latched_since` string, nullable, required
    - `last_run` object, nullable, required
      - `id` string, required
      - `run_id` string, nullable, required
      - `started_at` string, nullable, required
      - `finished_at` string, nullable, required
      - `outcome` 'running' | 'success' | 'fail' | 'superseded', required
      - `duration_ms` number, nullable, required
      - `stuck` boolean, required
      - `exit_code` number, nullable, required
      - `exit_detail` string, nullable, required

## Other responses

- `400`: Malformed body, an inconsistent assertion group, or the check is not an http check. - `RU-3001` Invalid check request: https://realuptime.io/kb/errors/ru-3001 - `RU-3004` Invalid response assertions: https://realuptime.io/kb/errors/ru-3004
- `401`: Missing, invalid, or revoked API key. - `RU-1001` Missing API credentials: https://realuptime.io/kb/errors/ru-1001 - `RU-1002` Invalid or revoked API key: https://realuptime.io/kb/errors/ru-1002
- `403`: This key is read-only, or this key is IP-restricted and the request came from outside its allowlist. - `RU-1004` API key is read-only: https://realuptime.io/kb/errors/ru-1004 - `RU-1007` API key is restricted to an IP allowlist: https://realuptime.io/kb/errors/ru-1007
- `404`: No such check on this account. - `RU-3003` Check not found: https://realuptime.io/kb/errors/ru-3003
- `429`: Per-key rate limit exceeded, a Free account's per-account request budget exceeded, or too many failed authentication attempts. - `RU-2003` API write rate limit exceeded: https://realuptime.io/kb/errors/ru-2003 - `RU-2001` Too many failed authentication attempts: https://realuptime.io/kb/errors/ru-2001

---

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