---
title: "Update a website"
method: PATCH
path: "/v1/domains/{id}"
tags: ["Domains"]
---

# Update a website

`PATCH /v1/domains/{id}`

## Request

- Base URL: `https://api.upcheck.so`
- URL: `https://api.upcheck.so/v1/domains/{id}`
- Auth: HTTP bearer

Rename the hostname or its label. Changing the hostname resets both expiry clocks and queues fresh probes.

## Path parameters

- `id` string, required

## Request body

- object: Fields to change. Omitted fields are left as they are.
  - `domain` string: A hostname. A scheme, path or port is stripped, so a full URL is accepted.
  - `friendlyName` string, nullable: A label shown instead of the hostname.

## Response `200`

The updated website.

- object: A monitored website with the latest state of its certificate and registration.
  - `id` string, required: Opaque identifier.
  - `organizationId` string, required: Opaque identifier.
  - `domain` string, required
  - `friendlyName` string, nullable, required
  - `hostname` string, required
  - `certificateStatus` 'checking' | 'healthy' | 'expiring_soon' | 'expired' | 'invalid' | 'unreachable', required
  - `certificateIssuer` string, required
  - `certificateExpiresAt` number, required: Unix ms.
  - `certificateDaysRemaining` number, required
  - `certificateLastChecked` number, required
  - `certificateNextCheck` number, required
  - `certificateAutoRenew` boolean, nullable, required
  - `certificate` object, required
    - `issuer` string, required
    - `commonName` string, required
    - `subjectAlternativeNames` string[], required
    - `serialNumber` string, required
    - `signatureAlgorithm` string, required
    - `publicKeyType` string, required
    - `publicKeySize` number, required
    - `validFrom` number, required: Unix ms.
    - `expirationDate` number, required: Unix ms.
    - `fingerprintSha256` string, required
    - `sslVersion` string, required
    - `chain` object[], required
      - `commonName` string, required
      - `issuer` string, required
      - `type` 'leaf' | 'intermediate' | 'root', required
  - `certificateLastError` string, nullable, required
  - `registrationStatus` 'checking' | 'healthy' | 'expiring_soon' | 'expired' | 'at_risk' | 'unsupported' | 'lookup_failed', nullable, required
  - `registrar` string, required
  - `registrationExpiresAt` number, required
  - `registrationDaysRemaining` number, required
  - `registration` object, nullable, required
    - `registrableDomain` string, required
    - `registrar` string, required
    - `registrarUrl` string
    - `createdAt` number, required
    - `expiresAt` number, required: Unix ms. 0 when the registry publishes no expiry.
    - `updatedAt` number, required
    - `statuses` string[], required
    - `nameservers` string[], required
    - `source` string, required
  - `registrationLastChecked` number, nullable, required
  - `registrationNextCheck` number, nullable, required
  - `registrationLastError` string, nullable, required

## Other responses

- `400`: The request body or parameters are invalid. `error` names the first problem.
- `401`: The API key is missing, invalid, or revoked.
- `403`: The key's role does not allow this action.
- `404`: No such resource in this organization.
- `409`: The request conflicts with the current state, for example the website limit.
- `429`: The key's rate limit was exceeded. Honour `Retry-After`.

---

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