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.
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
}'
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..."
}'
All fields are optional for partial updates. For full updates, customerId, name, and url are required.
| Field | Type | Description |
|---|
customerId | number|string | Customer public ID (preferred) or legacy numeric ID |
name | string | Display name (1–255 chars) |
url | string | URL to monitor (1–2048 chars). For DNS monitors, use hostname without protocol. |
monitoringType | string | combined, http_status, ssl_check, playwright, heartbeat, dns |
status | string | active, inactive, maintenance (paused → inactive) |
checkInterval | number | Check interval in minutes (1–60) |
timeoutSeconds | number | Request timeout in seconds (1–60) |
expectedStatusCodes | string | Comma-separated expected HTTP status codes |
allowedCheckCountryCodes | string|null | Array of 2-letter country codes, or null to reset to org default |
searchTerm | string|null | Keyword to search for (null clears it) |
customFields | object|null | Custom field values |
| Field | Type | Description |
|---|
authMode | string | none, authorization_header, basic. Setting to none clears auth credentials. |
authorizationHeader | string|null | Required when authMode is authorization_header. Encrypted at rest. |
basicAuthUsername | string|null | Required when authMode is basic. |
basicAuthPassword | string|null | Required when authMode is basic. Encrypted at rest. |
| Field | Type | Description |
|---|
httpMethod | string | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
customHeaders | object|null | Custom HTTP headers (keys: 1–100 chars, values: max 8192 chars). Null clears them. Encrypted at rest. |
requestBody | string|null | Request body for POST/PUT/PATCH (max 100KB). Null clears it. Encrypted at rest. |
followRedirects | boolean | Whether to follow HTTP redirects |
cookieHandling | string | none or jar (maintain cookie jar across redirects) |
| Field | Type | Description |
|---|
mtlsEnabled | boolean | Enable mutual TLS authentication. Setting to false clears cert and key. |
mtlsClientCert | string|null | Client certificate (max 100KB). Required when mtlsEnabled is true. Encrypted at rest. |
mtlsClientKey | string|null | Client private key (max 100KB). Required when mtlsEnabled is true. Encrypted at rest. |
| Field | Type | Description |
|---|
playwrightScript | string|null | Required when monitoringType is playwright (1–20000 chars) |
playwrightEnv | object|null | Environment variables (max 50, keys must match ^[A-Z_][A-Z0-9_]*$) |
playwrightDevice | string|null | Device emulation preset |
playwrightViewportWidth | number|null | Viewport width (1–3840). Must be set with playwrightViewportHeight. |
playwrightViewportHeight | number|null | Viewport height (1–3840). Must be set with playwrightViewportWidth. |
playwrightRetries | number|null | Retries (0–5) |
playwrightTimeoutMs | number|null | Timeout in milliseconds (1000–180000) |
| Field | Type | Description |
|---|
checkExpectedResponseEnabled | boolean | Enable response body validation |
expectedResponseMatchType | string|null | contains, equals, json_path_equals |
expectedResponseValue | string|null | Value to match (max 10000 chars). Required when enabled. |
expectedResponseJsonPath | string|null | JSON path (max 500 chars). Required when json_path_equals. |
| Field | Type | Description |
|---|
checkSslEnabled | boolean | Enable SSL checks (disabled for Playwright) |
checkHttpsRedirectEnabled | boolean | Check HTTPS redirect (disabled for Playwright) |
checkStatusEnabled | boolean | Check HTTP status (disabled for Playwright) |
checkSizeEnabled | boolean | Check response size (disabled for Playwright) |
checkResponseTimeEnabled | boolean | Check response time (disabled for Playwright) |
checkKeywordEnabled | boolean | Enable keyword search (disabled for Playwright) |
| Field | Type | Description |
|---|
sslNoticeDays | number | SSL notice threshold (1–365, must be ≥ sslErrorDays) |
sslErrorDays | number | SSL error threshold (0–365) |
checkDomainExpiryEnabled | boolean | Enable domain expiry checks (disabled for Playwright) |
domainExpiryNoticeDays | number | Domain expiry notice threshold (1–365) |
domainExpiryErrorDays | number | Domain expiry error threshold (0–365) |
| Field | Type | Description |
|---|
minPageSize | number|null | Minimum page size in bytes (must be ≤ maxPageSize) |
maxPageSize | number|null | Maximum page size in bytes |
dnsConfig | object | DNS query configuration (only for dns monitoring type) |
heartbeatGracePeriodMinutes | number | Heartbeat grace period (1–10080) |
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"
}
400 Website public ID (UUID) is required when :websitePublicId is missing401 Unauthorized when you are not logged in403 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 customer500 Failed to update website on server errors