Update Website

PATCH /api/websites/:websitePublicId

Update Website

PATCH /api/websites/:websitePublicId

Updates a website. Supports both partial updates (only sent fields are changed) and full updates (all required fields must be present).

A request is treated as a full update when customerId, name, and url are all present in the body. Otherwise, it is treated as a partial update.

Example (cURL) — Partial update

BASE_URL="https://uptimeify.io"
TOKEN="<your-api-token>"

curl -X PATCH "$BASE_URL/api/websites/9a3d4d4d-7a4b-4f37-a9df-2a6f6d9d7a10" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "name": "Updated Website Name",
    "checkInterval": 5,
    "timeoutSeconds": 10
  }'

Example (cURL) — Full update with HTTP configuration

curl -X PATCH "$BASE_URL/api/websites/9a3d4d4d-7a4b-4f37-a9df-2a6f6d9d7a10" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "customerId": 5,
    "name": "API Endpoint Monitor",
    "url": "https://api.example.com/health",
    "httpMethod": "POST",
    "customHeaders": { "X-API-Key": "abc123", "Content-Type": "application/json" },
    "requestBody": "{\"check\": true}",
    "followRedirects": false,
    "cookieHandling": "jar",
    "mtlsEnabled": true,
    "mtlsClientCert": "-----BEGIN CERTIFICATE-----\n...",
    "mtlsClientKey": "-----BEGIN PRIVATE KEY-----\n..."
  }'

Request Body

All fields are optional for partial updates. For full updates, customerId, name, and url are required.

Core fields

FieldTypeDescription
customerIdnumber|stringCustomer public ID (preferred) or legacy numeric ID
namestringDisplay name (1–255 chars)
urlstringURL to monitor (1–2048 chars). For DNS monitors, use hostname without protocol.
monitoringTypestringcombined, http_status, ssl_check, playwright, heartbeat, dns
statusstringactive, inactive, maintenance (pausedinactive)
checkIntervalnumberCheck interval in minutes (1–60)
timeoutSecondsnumberRequest timeout in seconds (1–60)
expectedStatusCodesstringComma-separated expected HTTP status codes
allowedCheckCountryCodesstring|nullArray of 2-letter country codes, or null to reset to org default
searchTermstring|nullKeyword to search for (null clears it)
customFieldsobject|nullCustom field values

Authentication

FieldTypeDescription
authModestringnone, authorization_header, basic. Setting to none clears auth credentials.
authorizationHeaderstring|nullRequired when authMode is authorization_header. Encrypted at rest.
basicAuthUsernamestring|nullRequired when authMode is basic.
basicAuthPasswordstring|nullRequired when authMode is basic. Encrypted at rest.

HTTP Request Configuration

FieldTypeDescription
httpMethodstringGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
customHeadersobject|nullCustom HTTP headers (keys: 1–100 chars, values: max 8192 chars). Null clears them. Encrypted at rest.
requestBodystring|nullRequest body for POST/PUT/PATCH (max 100KB). Null clears it. Encrypted at rest.
followRedirectsbooleanWhether to follow HTTP redirects
cookieHandlingstringnone or jar (maintain cookie jar across redirects)

mTLS (Mutual TLS)

FieldTypeDescription
mtlsEnabledbooleanEnable mutual TLS authentication. Setting to false clears cert and key.
mtlsClientCertstring|nullClient certificate (max 100KB). Required when mtlsEnabled is true. Encrypted at rest.
mtlsClientKeystring|nullClient private key (max 100KB). Required when mtlsEnabled is true. Encrypted at rest.

Playwright Monitoring

FieldTypeDescription
playwrightScriptstring|nullRequired when monitoringType is playwright (1–20000 chars)
playwrightEnvobject|nullEnvironment variables (max 50, keys must match ^[A-Z_][A-Z0-9_]*$)
playwrightDevicestring|nullDevice emulation preset
playwrightViewportWidthnumber|nullViewport width (1–3840). Must be set with playwrightViewportHeight.
playwrightViewportHeightnumber|nullViewport height (1–3840). Must be set with playwrightViewportWidth.
playwrightRetriesnumber|nullRetries (0–5)
playwrightTimeoutMsnumber|nullTimeout in milliseconds (1000–180000)

Expected Response Validation

FieldTypeDescription
checkExpectedResponseEnabledbooleanEnable response body validation
expectedResponseMatchTypestring|nullcontains, equals, json_path_equals
expectedResponseValuestring|nullValue to match (max 10000 chars). Required when enabled.
expectedResponseJsonPathstring|nullJSON path (max 500 chars). Required when json_path_equals.

Check Configuration

FieldTypeDescription
checkSslEnabledbooleanEnable SSL checks (disabled for Playwright)
checkHttpsRedirectEnabledbooleanCheck HTTPS redirect (disabled for Playwright)
checkStatusEnabledbooleanCheck HTTP status (disabled for Playwright)
checkSizeEnabledbooleanCheck response size (disabled for Playwright)
checkResponseTimeEnabledbooleanCheck response time (disabled for Playwright)
checkKeywordEnabledbooleanEnable keyword search (disabled for Playwright)

SSL & Domain Thresholds

FieldTypeDescription
sslNoticeDaysnumberSSL notice threshold (1–365, must be ≥ sslErrorDays)
sslErrorDaysnumberSSL error threshold (0–365)
checkDomainExpiryEnabledbooleanEnable domain expiry checks (disabled for Playwright)
domainExpiryNoticeDaysnumberDomain expiry notice threshold (1–365)
domainExpiryErrorDaysnumberDomain expiry error threshold (0–365)

Page Size & Other

FieldTypeDescription
minPageSizenumber|nullMinimum page size in bytes (must be ≤ maxPageSize)
maxPageSizenumber|nullMaximum page size in bytes
dnsConfigobjectDNS query configuration (only for dns monitoring type)
heartbeatGracePeriodMinutesnumberHeartbeat grace period (1–10080)

Response

Returns the updated website record. Encrypted fields are never included in responses.

{
  "id": 101,
  "customerId": 1,
  "name": "Updated Website Name",
  "url": "https://example.com",
  "status": "active",
  "monitoringType": "combined",
  "checkInterval": 5,
  "timeoutSeconds": 10,
  "httpMethod": "POST",
  "followRedirects": false,
  "cookieHandling": "jar",
  "mtlsEnabled": true,
  "updatedAt": "2026-02-26T12:34:56.000Z"
}

Common errors

  • 400 Website public ID (UUID) is required when :websitePublicId is missing
  • 401 Unauthorized when you are not logged in
  • 403 Forbidden when you cannot write to the website (e.g. readonly/global supporter)
  • 404 Customer not found when customerId does not resolve to an existing customer
  • 500 Failed to update website on server errors