Skip to main content

API Documentation

OnChange REST API

Programmatic access to your monitors, changes, and notifications. Build dashboards, automate workflows, and integrate OnChange into your toolchain.

Authentication

All requests require an API key passed in theAuthorizationheader as a Bearer token. Generate keys in your dashboard settings.

Base URL

All API endpoints use the base URLhttps://onchange.sairo.app/apiand return JSON responses. Rate limited to 100 requests per minute.

Pagination

List endpoints support cursor-based pagination usingcursorandlimitquery parameters. Default limit is 20, max is 100.

Example request
curl https://onchange.sairo.app/api/v1/monitors \
  -H "Authorization: Bearer oc_live_abc123..." \
  -H "Content-Type: application/json"

Endpoints

GET/v1/monitors

List all monitors in your workspace. Supports pagination, filtering by status, and sorting by creation date or last check time.

POST/v1/monitors

Create a new monitor. Specify the URL, check interval, notification channels, CSS selectors, and comparison mode (text, visual, or API).

GET/v1/monitors/:id

Retrieve a specific monitor by ID. Returns full configuration, current status, last check time, and recent change count.

PATCH/v1/monitors/:id

Update a monitor's configuration. Supports partial updates. Changes take effect on the next scheduled check.

DELETE/v1/monitors/:id

Delete a monitor and all associated change history. This action is irreversible.

GET/v1/monitors/:id/changes

List detected changes for a specific monitor. Returns timestamped diffs, screenshots (for visual monitors), and AI summaries.

GET/v1/changes

List all detected changes across all monitors. Useful for building dashboards and activity feeds. Supports date range filtering.

GET/v1/changes/:id

Retrieve a specific change by ID. Includes the full diff, before/after content, screenshot URLs, and AI-generated summary.

POST/v1/monitors/:id/check

Trigger an immediate check for a specific monitor. Returns the check result including whether a change was detected.

GET/v1/notifications

List notification channel configurations. Returns Slack, Discord, email, and webhook settings for your workspace.

POST/v1/notifications

Create a new notification channel. Supports Slack webhook URLs, Discord webhook URLs, email addresses, and custom webhook endpoints.

GET/v1/account

Retrieve account information including plan details, monitor usage, check counts, and team member list.

Error codes

CodeMeaning
200Success
201Created
400Bad request - invalid parameters
401Unauthorized - invalid or missing API key
403Forbidden - insufficient permissions
404Not found
429Rate limited - too many requests
500Internal server error

Ready to build?

Create a free account to get your API key and start building.