SDK ReferencePython SDK

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 — str
  • interval_type — MonitorCreateRequestIntervalType
  • webhook_url — str — Webhook endpoint URL (HTTPS only; http:// rejected with 400 invalid_url, reason scheme_unsupported)
  • type_ — MonitorCreateRequestType | Unset
  • cron_expression — str | Unset — 5-field cron expression. Required when interval_type is "cron".
  • change_threshold — float | Unset
  • notify_on — MonitorCreateRequestNotifyOn | Unset
  • webhook_secret — str | Unset — HMAC secret used to sign webhook deliveries. Each delivery carries X-Webhook- Timestamp and X-Webhook-Signature (sha256= + the hex HMAC-SHA256 of timestamp.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 | None

Delete 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 | None

Get 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 | None

List 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 | None

List 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 | None

Update Monitor

Update monitor

Parameters

  • id (str)
  • body (MonitorUpdateRequest)
  • url — str | Unset
  • interval_type — MonitorUpdateRequestIntervalType | Unset
  • cron_expression — str | Unset
  • change_threshold — float | Unset
  • notify_on — MonitorUpdateRequestNotifyOn | Unset
  • webhook_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 carries X-Webhook- Timestamp and X-Webhook-Signature (sha256= + the hex HMAC-SHA256 of timestamp.body). See https://bytekit.com/docs/guides/webhooks for verification code.
  • webhook_headers — MonitorUpdateRequestWebhookHeaders | Unset
  • status — MonitorUpdateRequestStatus | Unset
  • options — MonitorUpdateRequestOptions | Unset
  • scrape_options — MonitorUpdateRequestScrapeOptions | Unset
  • metadata — 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