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.
curl https://onchange.sairo.app/api/v1/monitors \ -H "Authorization: Bearer oc_live_abc123..." \ -H "Content-Type: application/json"
Endpoints
/v1/monitorsList all monitors in your workspace. Supports pagination, filtering by status, and sorting by creation date or last check time.
/v1/monitorsCreate a new monitor. Specify the URL, check interval, notification channels, CSS selectors, and comparison mode (text, visual, or API).
/v1/monitors/:idRetrieve a specific monitor by ID. Returns full configuration, current status, last check time, and recent change count.
/v1/monitors/:idUpdate a monitor's configuration. Supports partial updates. Changes take effect on the next scheduled check.
/v1/monitors/:idDelete a monitor and all associated change history. This action is irreversible.
/v1/monitors/:id/changesList detected changes for a specific monitor. Returns timestamped diffs, screenshots (for visual monitors), and AI summaries.
/v1/changesList all detected changes across all monitors. Useful for building dashboards and activity feeds. Supports date range filtering.
/v1/changes/:idRetrieve a specific change by ID. Includes the full diff, before/after content, screenshot URLs, and AI-generated summary.
/v1/monitors/:id/checkTrigger an immediate check for a specific monitor. Returns the check result including whether a change was detected.
/v1/notificationsList notification channel configurations. Returns Slack, Discord, email, and webhook settings for your workspace.
/v1/notificationsCreate a new notification channel. Supports Slack webhook URLs, Discord webhook URLs, email addresses, and custom webhook endpoints.
/v1/accountRetrieve account information including plan details, monitor usage, check counts, and team member list.
Error codes
| Code | Meaning |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad request - invalid parameters |
| 401 | Unauthorized - invalid or missing API key |
| 403 | Forbidden - insufficient permissions |
| 404 | Not found |
| 429 | Rate limited - too many requests |
| 500 | Internal server error |
Ready to build?
Create a free account to get your API key and start building.