Create Website

POST /api/websites

Create Website

POST /api/websites

Creates a new website monitor for a customer.

Example (cURL)

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

curl -X POST "$BASE_URL/api/websites" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "customerId": "059e1469-0f05-4c93-bd4d-89c45bb2afd9",
    "name": "New Landing Page",
    "url": "https://landing.example.com",
    "monitoringType": "combined",
    "checkInterval": 5
  }'

Request Body

Core fields

FieldTypeRequiredDefaultDescription
customerIdnumber|stringYesCustomer public ID (preferred) or legacy numeric ID
namestringYesDisplay name (1–255 chars)
urlstringYes*URL to monitor (1–2048 chars). Required for non-heartbeat monitors. For DNS monitors, use a hostname without protocol.
monitoringTypestringNocombinedcombined, http_status, ssl_check, playwright, heartbeat, dns
statusstringNoactiveactive, inactive, maintenance (paused accepted, mapped to inactive)
checkIntervalnumberNo30Check interval in minutes (1–60, min depends on package)
timeoutSecondsnumberNo30Request timeout in seconds (1–60)
expectedStatusCodesstringNo200,301,302Comma-separated expected HTTP status codes
allowedCheckCountryCodesstring|nullNoorg defaultArray of 2-letter country codes to restrict monitoring locations
searchTermstring|nullNonullKeyword to search for in response body (max 255 chars)
customFieldsobject|nullNonullCustom field values as key-value pairs

Authentication

FieldTypeRequiredDefaultDescription
authModestringNononenone, authorization_header, basic
authorizationHeaderstring|nullNonullRequired when authMode is authorization_header (1–4096 chars). Encrypted at rest.
basicAuthUsernamestring|nullNonullRequired when authMode is basic (1–255 chars)
basicAuthPasswordstring|nullNonullRequired when authMode is basic (1–4096 chars). Encrypted at rest.

HTTP Request Configuration

FieldTypeRequiredDefaultDescription
httpMethodstringNoGETGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
customHeadersobject|nullNonullCustom HTTP headers as key-value pairs. Keys: 1–100 chars, values: max 8192 chars. Encrypted at rest.
requestBodystring|nullNonullRequest body for POST/PUT/PATCH requests (max 100KB). Encrypted at rest.
followRedirectsbooleanNotrueWhether to follow HTTP redirects
cookieHandlingstringNononenone or jar (maintain cookie jar across redirects)

mTLS (Mutual TLS)

FieldTypeRequiredDefaultDescription
mtlsEnabledbooleanNofalseEnable mutual TLS authentication
mtlsClientCertstring|nullNonullRequired when mtlsEnabled is true (1–100000 chars). Encrypted at rest.
mtlsClientKeystring|nullNonullRequired when mtlsEnabled is true (1–100000 chars). Encrypted at rest.

Playwright Monitoring

FieldTypeRequiredDefaultDescription
playwrightScriptstring|nullNo*nullRequired when monitoringType is playwright (1–20000 chars)
playwrightEnvobject|nullNo{}Environment variables (max 50, keys 1–64 chars, values max 2000 chars)
playwrightDevicestring|nullNonullDevice emulation preset (1–100 chars)
playwrightViewportWidthnumber|nullNonullViewport width (1–3840). Must be set with playwrightViewportHeight.
playwrightViewportHeightnumber|nullNonullViewport height (1–3840). Must be set with playwrightViewportWidth.
playwrightRetriesnumber|nullNo0Number of retries (0–5)
playwrightTimeoutMsnumber|nullNo30000Timeout in milliseconds (1000–180000)

Expected Response Validation

FieldTypeRequiredDefaultDescription
checkExpectedResponseEnabledbooleanNofalseEnable response body validation
expectedResponseMatchTypestring|nullNocontainscontains, equals, json_path_equals
expectedResponseValuestring|nullNonullRequired when checkExpectedResponseEnabled is true (max 10000 chars)
expectedResponseJsonPathstring|nullNonullRequired when expectedResponseMatchType is json_path_equals (max 500 chars)

Check Configuration

FieldTypeRequiredDefaultDescription
checkSslEnabledbooleanNotrueEnable SSL certificate checks (disabled for Playwright)
checkHttpsRedirectEnabledbooleanNotrueCheck HTTPS redirect (disabled for Playwright)
checkStatusEnabledbooleanNotrueCheck HTTP status (disabled for Playwright)
checkSizeEnabledbooleanNotrueCheck response size (disabled for Playwright)
checkResponseTimeEnabledbooleanNotrueCheck response time (disabled for Playwright)
checkKeywordEnabledbooleanNotrueEnable keyword search (disabled for Playwright)

SSL & Domain Thresholds

FieldTypeRequiredDefaultDescription
sslNoticeDaysnumberNo7Days before SSL expiry to trigger notice (1–365)
sslErrorDaysnumberNo0Days before SSL expiry to trigger error (0–365, must be ≤ sslNoticeDays)
checkDomainExpiryEnabledbooleanNotrueEnable domain expiry checks (disabled for Playwright)
domainExpiryNoticeDaysnumberNo30Days before domain expiry to trigger notice (1–365)
domainExpiryErrorDaysnumberNo7Days before domain expiry to trigger error (0–365, must be ≤ domainExpiryNoticeDays)

Page Size Limits

FieldTypeRequiredDefaultDescription
minPageSizenumber|nullNonullMinimum expected page size in bytes (disabled for Playwright)
maxPageSizenumber|nullNonullMaximum expected page size in bytes (disabled for Playwright)

DNS Monitoring

FieldTypeRequiredDefaultDescription
dnsConfigobjectNo{}DNS query configuration (only for monitoringType: dns)

Heartbeat

FieldTypeRequiredDefaultDescription
heartbeatTokenstring|nullNoauto-generatedCustom heartbeat token (max 255 chars)
heartbeatGracePeriodMinutesnumberNo5Grace period in minutes (1–10080, max 1 week)

Response

Returns the created website record. Encrypted fields (authorizationHeader, basicAuthPassword, customHeaders, requestBody, mtlsClientCert, mtlsClientKey) are never returned in API responses.

{
  "id": 103,
  "customerId": 1,
  "name": "New Landing Page",
  "url": "https://landing.example.com",
  "status": "active",
  "monitoringType": "combined",
  "checkInterval": 5,
  "httpMethod": "GET",
  "followRedirects": true,
  "cookieHandling": "none",
  "mtlsEnabled": false,
  "createdAt": "2026-02-26T12:05:00.000Z"
}

Common errors

  • 401 Unauthorized when you are not logged in
  • 403 Forbidden when you cannot create websites for the organization/customer
  • 404 Customer not found when customerId does not resolve to an existing customer