Monitors
API functions for the Monitors resource.
For AI agents: https://bytekit.com/llms.txt — every docs page is available as markdown by appending .md
Monitors
Functions for interacting with the monitors API resource. Each operation ships in four forms — sync / sync_detailed and their async counterparts.
First-capture behavior is the same for both monitor types: the first capture is a silent baseline (has_change=False, change_pct=None) with no change_detected webhook, whether the monitor is scrape or screenshot. From the second capture onward both types diff against the previous capture.
Create Monitor
Create a change-detection monitor
Creates a recurring change-detection monitor for a URL, delivering results via webhook.
Limits: request bodies are capped at 512 KB. An oversized body
returns a 400 with error code request_too_large.
Parameters
body (MonitorCreateRequest)url—strinterval_type—MonitorCreateRequestIntervalTypewebhook_url—str— Webhook endpoint URL (HTTPS only; http:// rejected with 400 invalid_url, reason scheme_unsupported)type_—MonitorCreateRequestType | Unsetcron_expression—str | Unset— 5-field cron expression. Required when interval_type is "cron".change_threshold—float | Unsetnotify_on—MonitorCreateRequestNotifyOn | Unsetwebhook_secret—str | Unset— HMAC secret used to sign webhook deliveries. Each delivery carriesX-Webhook- TimestampandX-Webhook-Signature(sha256=+ the hex HMAC-SHA256 oftimestamp.body). See https://bytekit.com/docs/guides/webhooks for verification code.webhook_headers—MonitorCreateRequestWebhookHeaders | Unset— Max 20 headers. Keys must match /^[A-Za-z0-9-]+$/ and not be reserved.options—MonitorCreateRequestOptions | Unset— Screenshot monitor options (device, viewport, format, etc.).scrape_options—MonitorCreateRequestScrapeOptions | Unset— Scrape monitor options (formats, country, wait_for_selector, wait_until, delay_ms). Only for type=scrape.metadata—Metadata | Unset— Arbitrary key-value metadata. Max 4096 bytes when JSON-serialized.
Call styles
sync_detailed(client=client, body=body) -> Response[Error | MonitorCreateResponse]
sync(client=client, body=body) -> Error | MonitorCreateResponse | None
await asyncio_detailed(client=client, body=body) -> Response[Error | MonitorCreateResponse]
await asyncio(client=client, body=body) -> Error | MonitorCreateResponse | NoneDelete Monitor
Cancel monitor
Parameters
id (str)
Call styles
sync_detailed(id=id, client=client) -> Response[Any | Error]
sync(id=id, client=client) -> Any | Error | None
await asyncio_detailed(id=id, client=client) -> Response[Any | Error]
await asyncio(id=id, client=client) -> Any | Error | NoneGet Monitor
Get monitor
Parameters
id (str)
Call styles
sync_detailed(id=id, client=client) -> Response[Error | MonitorResponse]
sync(id=id, client=client) -> Error | MonitorResponse | None
await asyncio_detailed(id=id, client=client) -> Response[Error | MonitorResponse]
await asyncio(id=id, client=client) -> Error | MonitorResponse | NoneList Monitor Captures
List monitor captures
Parameters
id (str)limit (int | Unset)cursor (str | Unset)
Call styles
sync_detailed(id=id, client=client, limit=limit, cursor=cursor) -> Response[Error | ListMonitorCapturesResponse200]
sync(id=id, client=client, limit=limit, cursor=cursor) -> Error | ListMonitorCapturesResponse200 | None
await asyncio_detailed(id=id, client=client, limit=limit, cursor=cursor) -> Response[Error | ListMonitorCapturesResponse200]
await asyncio(id=id, client=client, limit=limit, cursor=cursor) -> Error | ListMonitorCapturesResponse200 | NoneList Monitors
List monitors
Parameters
limit (int | Unset)cursor (str | Unset)status (ListMonitorsStatus | Unset)
Call styles
sync_detailed(client=client, limit=limit, cursor=cursor, status=status) -> Response[Error | ListMonitorsResponse200]
sync(client=client, limit=limit, cursor=cursor, status=status) -> Error | ListMonitorsResponse200 | None
await asyncio_detailed(client=client, limit=limit, cursor=cursor, status=status) -> Response[Error | ListMonitorsResponse200]
await asyncio(client=client, limit=limit, cursor=cursor, status=status) -> Error | ListMonitorsResponse200 | NoneUpdate Monitor
Update monitor
Parameters
id (str)body (MonitorUpdateRequest)url—str | Unsetinterval_type—MonitorUpdateRequestIntervalType | Unsetcron_expression—str | Unsetchange_threshold—float | Unsetnotify_on—MonitorUpdateRequestNotifyOn | Unsetwebhook_url—str | Unset— Webhook endpoint URL (HTTPS only; http:// rejected with 400 invalid_url, reason scheme_unsupported)webhook_secret—str | Unset— HMAC secret used to sign webhook deliveries. Each delivery carriesX-Webhook- TimestampandX-Webhook-Signature(sha256=+ the hex HMAC-SHA256 oftimestamp.body). See https://bytekit.com/docs/guides/webhooks for verification code.webhook_headers—MonitorUpdateRequestWebhookHeaders | Unsetstatus—MonitorUpdateRequestStatus | Unsetoptions—MonitorUpdateRequestOptions | Unsetscrape_options—MonitorUpdateRequestScrapeOptions | Unsetmetadata—Metadata | Unset— Arbitrary key-value metadata. Max 4096 bytes when JSON-serialized.
Call styles
sync_detailed(id=id, client=client, body=body) -> Response[Error | MonitorResponse]
sync(id=id, client=client, body=body) -> Error | MonitorResponse | None
await asyncio_detailed(id=id, client=client, body=body) -> Response[Error | MonitorResponse]
await asyncio(id=id, client=client, body=body) -> Error | MonitorResponse | None