Supercheck LogoSupercheck
Monitors API

Update a monitor

Update monitor configuration. Only provided fields are changed.

PATCH
/api/monitors/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

CLI token (sck_live_*) for full API access, or trigger key (sck_trigger_* / legacy job_*) for job trigger endpoint only.

In: header

Path Parameters

id*string

Monitor ID

Formatuuid

Request Body

application/json

name?string
description?string
type?string
Value in"http_request" | "website" | "ping_host" | "port_check" | "synthetic_test"
target?string
frequencyMinutes?integer
Range1 <= value <= 1440
enabled?boolean
status?string
Value in"up" | "down" | "paused" | "pending" | "maintenance" | "error"
config?
alertConfig?

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "https://demo.supercheck.dev/api/monitors/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
  "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
  "createdByUserId": "4d2aef9a-17b0-44e6-902e-616812033620",
  "name": "string",
  "description": "string",
  "target": "string",
  "type": "http_request",
  "status": "up",
  "frequencyMinutes": 0,
  "enabled": true,
  "config": {
    "method": "GET",
    "headers": {
      "property1": "string",
      "property2": "string"
    },
    "body": "string",
    "expectedStatusCodes": "string",
    "keywordInBody": "string",
    "keywordInBodyShouldBePresent": true,
    "responseBodyJsonPath": {
      "path": "string",
      "expectedValue": null
    },
    "auth": {
      "type": "none",
      "username": "string",
      "password": "string",
      "token": "string"
    },
    "port": 0,
    "protocol": "tcp",
    "expectClosed": true,
    "enableSslCheck": true,
    "sslDaysUntilExpirationWarning": 0,
    "sslCheckFrequencyHours": 0,
    "sslLastCheckedAt": "2019-08-24T14:15:22Z",
    "sslCheckOnStatusChange": true,
    "checkExpiration": true,
    "daysUntilExpirationWarning": 0,
    "checkRevocation": true,
    "timeoutSeconds": 1,
    "regions": [
      "string"
    ],
    "locationConfig": {
      "enabled": true,
      "locations": [
        "string"
      ],
      "threshold": 0,
      "strategy": "all"
    },
    "retryStrategy": {
      "maxRetries": 0,
      "backoffFactor": 0
    },
    "alertChannels": [
      "string"
    ],
    "testId": "82d0c3c7-a664-4ee3-9f0e-ea5738ca0af0",
    "testTitle": "string",
    "playwrightOptions": {
      "headless": true,
      "timeout": 0,
      "retries": 0
    }
  },
  "alertConfig": {
    "enabled": true,
    "notificationProviders": [
      "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ],
    "alertOnFailure": true,
    "alertOnRecovery": true,
    "alertOnSslExpiration": true,
    "failureThreshold": 1,
    "recoveryThreshold": 1,
    "customMessage": "string"
  },
  "lastCheckAt": "2019-08-24T14:15:22Z",
  "lastStatusChangeAt": "2019-08-24T14:15:22Z",
  "mutedUntil": "2019-08-24T14:15:22Z",
  "scheduledJobId": "string",
  "recentResults": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "monitorId": "075fef10-8522-4c43-ac39-f1796133943e",
      "checkedAt": "2019-08-24T14:15:22Z",
      "location": "string",
      "status": "up",
      "responseTimeMs": 0,
      "details": {
        "statusCode": 0,
        "statusText": "string",
        "errorMessage": "string",
        "responseHeaders": {
          "property1": "string",
          "property2": "string"
        },
        "responseBodySnippet": "string",
        "ipAddress": "string",
        "location": "string",
        "sslCertificate": {
          "valid": true,
          "issuer": "string",
          "subject": "string",
          "validFrom": "string",
          "validTo": "string",
          "daysRemaining": 0
        }
      },
      "isUp": true,
      "isStatusChange": true,
      "consecutiveFailureCount": 0,
      "consecutiveSuccessCount": 0,
      "alertsSentForFailure": 0,
      "alertsSentForRecovery": 0,
      "testExecutionId": "string",
      "testReportS3Url": "string",
      "executionGroupId": "string"
    }
  ],
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}
Empty
{
  "error": "Unauthorized"
}
{
  "error": "string"
}
{
  "error": "Not found"
}