---
title: "Replace a private-location check's authentication (secret references only, full replace)"
method: PATCH
path: "/checks/{id}/auth"
tags: ["Checks"]
---

# Replace a private-location check's authentication (secret references only, full replace)

`PATCH /checks/{id}/auth`

## Request

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

Request headers and URL credentials as ${SECRET:NAME} reference templates. The private location resolves each name on its own machine; a credential's value is never sent to or stored by RealUptime. `{}` removes all authentication. See docs/api.md "PATCH /checks/:id/auth".

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `headers` object[]
    - `name` string, required
    - `value` string, required
  - `userinfo` string, nullable

## Response `200`

The check's authentication after the replace.

- object
  - `check_id` string, required
  - `auth` object, required
    - `headers` object[], required
      - `name` string, required
      - `value` string, required
    - `userinfo` string, nullable, required

## Other responses

- `400`: Malformed body, or a configuration that is wrong: a value with no secret reference, a pasted credential, a malformed reference, or a header name the location does not allow. - `RU-3001` Invalid check request: https://realuptime.io/kb/errors/ru-3001 - `RU-3013` Invalid check authentication: https://realuptime.io/kb/errors/ru-3013
- `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`: The check cannot carry authentication: not a private-location http check, below Growth on both Status and Monitor, or the location's agent is older than 0.4.0. This key is read-only, or this key is IP-restricted and the request came from outside its allowlist. - `RU-3014` Check authentication not available: https://realuptime.io/kb/errors/ru-3014 - `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)
