Create a change-detection monitor

Creates a recurring change-detection monitor for a URL, delivering results via webhook.

POST
/v1/monitors

Authorization

AuthorizationRequiredBearer <token>

API key. Manage keys from the dashboard at app.bytekit.com.

In: header

Request Body

application/jsonRequired
urlRequiredstring
Format: "uri"
typestring
Default: "screenshot"Value in: "screenshot" | "scrape"
interval_typeRequiredstring
Value in: "hourly" | "daily" | "weekly" | "cron"
cron_expressionstring

5-field cron expression. Required when interval_type is "cron".

change_thresholdnumber
Default: 5Minimum: 0Maximum: 100
notify_onstring
Default: "change"Value in: "change" | "every"
webhook_urlRequiredstring

Webhook endpoint URL (HTTPS only; http:// rejected with 400 invalid_url, reason scheme_unsupported)

Pattern: "^https://"Format: "uri"
webhook_secretstring
webhook_headersobject

Max 20 headers. Keys must match /^[A-Za-z0-9-]+$/ and not be reserved.

optionsobject

Screenshot monitor options (device, viewport, format, etc.).

scrape_optionsobject

Scrape monitor options (formats, country, headers, etc.). Only for type=scrape.

metadataobject

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

curl -X POST https://api.bytekit.com/v1/monitors \
  -H "Authorization: Bearer sk_live_your_api_key_here"

Monitor created.

{
  "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",
  "webhook_secret": "a3f1b2c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2"
}