Update monitor

PATCH
/v1/monitors/{id}

Authorization

AuthorizationRequiredBearer <token>

API key. Obtain from POST /v1/account/api-keys.

In: header

Request Body

application/jsonRequired
urlstring
Format: "uri"
typestring
Value in: "screenshot" | "scrape"
interval_typestring
Value in: "hourly" | "daily" | "weekly" | "cron"
cron_expressionstring
change_thresholdnumber
Minimum: 0Maximum: 100
notify_onstring
Value in: "change" | "every"
webhook_urlstring

Webhook endpoint URL (HTTPS only; http:// rejected with HTTP 422)

Pattern: "^https://"Format: "uri"
webhook_secretstring
webhook_headersobject
statusstring
Value in: "active" | "paused"
optionsobject
scrape_optionsobject
metadataobject

Arbitrary key-value metadata. Max 4096 bytes when JSON-serialized.

Path Parameters

idRequiredstring
curl -X PATCH "https://api.bytekit.com/v1/monitors/string" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "http://example.com",
    "type": "screenshot",
    "interval_type": "hourly",
    "cron_expression": "string",
    "change_threshold": 100,
    "notify_on": "change",
    "webhook_url": "http://example.com",
    "webhook_secret": "string",
    "webhook_headers": {
      "property1": "string",
      "property2": "string"
    },
    "status": "active",
    "options": {},
    "scrape_options": {},
    "metadata": {}
  }'

Successful response.

{
  "id": "mon_01j9abc123",
  "type": "screenshot",
  "url": "string",
  "status": "active",
  "interval_type": "hourly",
  "cron_expression": "string",
  "next_capture_at": "2019-08-24T14:15:22Z",
  "notify_on": "string",
  "webhook_url": "string",
  "webhook_headers": {},
  "change_threshold": "string",
  "scrape_options": null,
  "last_content_hash": "string",
  "captures_count": 0,
  "changes_count": 0,
  "skipped_captures": 0,
  "last_captured_at": "2019-08-24T14:15:22Z",
  "last_changed_at": "2019-08-24T14:15:22Z",
  "consecutive_failures": 0,
  "last_error_code": "string",
  "suspension_reason": "string",
  "metadata": {},
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "cancelled_at": "2019-08-24T14:15:22Z"
}