{
"openapi": "3.1.0",
"info": {
"title": "Visual Sentinel API",
"description": "Website monitoring API with six layers: uptime, performance, SSL, DNS, visual change detection and content change detection.\n\n## Authentication\n\nEndpoints accept either of two credentials unless an operation says otherwise.\n\n### 1. Session cookie (web clients)\nCall `POST /api/auth/login` with email and password to get a session cookie. The cookie is sent automatically with later requests. Session writes are CSRF protected (send `X-CSRF-Token` on POST, PUT, PATCH and DELETE).\n\n### 2. API key (agents, integrations, scripts)\nOwners and admins create keys in **Organization settings > Developer**. A key is `vs_` followed by 64 hexadecimal characters and is shown once. Send it as any of:\n- `Authorization: Bearer vs_...` header (recommended)\n- `X-API-Key: vs_...` header\n- `?api_key=vs_...` query parameter\n\n**API access comes with every paid plan** (Solo, Starter, Business, Agency and custom Enterprise plans). On a plan without it (Free) every key request returns 403 with code `API_ACCESS_NOT_IN_PLAN`.\n\nScopes have the form `{resource}:{read|write}`:\n- GET requests need `{resource}:read`. POST, PUT, PATCH and DELETE need `{resource}:write`. In the dashboard, choosing write also grants read.\n- `{resource}:*` grants read and write on one resource. `*` grants every resource.\n- A missing scope returns 403 with code `SCOPE_DENIED` and names the scope the request needs.\n- Platform admin endpoints under `/api/admin/*` are blocked for API keys whatever the scope.\n- CSRF checks are skipped for API key requests.\n- The role of the member who created the key applies, so a key made by a viewer cannot write.\n\nResources and the paths they cover:\n- `monitors`: `/api/monitors/*`, `/api/monitoring/*`, `/api/metrics/*`, `/api/dependencies/*`, `/api/reports/*`, `/api/dns/*`\n- `incidents`: `/api/incidents/*`\n- `servers`: `/api/servers/*`\n- `status-pages`: `/api/status-pages/*`\n- `alerts`: `/api/alerts/*`, `/api/alert-rules/*`, `/api/alert-groups/*`\n- `channels`: `/api/notification-channels/*`, `/api/notifications/*`\n- `maintenance`: `/api/maintenance/*`\n- `organization`: `/api/organization/*`, `/api/settings/*`, `/api/plan`, `/api/integrations/*`\n- `user`: `/api/user/*`, `/api/profile/*`, `/api/onboarding/*`\n\nOther paths, for example `/api/overview`, `/api/workspace/*`, `/api/insights/*`, `/api/analytics/*` and `/api/billing/*`, resolve to the `general` resource and need a key with the `*` scope. The dashboard does not create `*` keys.\n\n### Session-only endpoints (cookie required)\nThese endpoints stay session-only by design. An API key on them returns 403 with code `SESSION_REQUIRED` (or 401 where no session exists):\n- `/api/auth/*` (login, logout, refresh, 2FA, password reset, OAuth)\n- `/api/billing/checkout`, `/api/billing/change-plan`, `/api/billing/portal` (billing changes)\n- `DELETE /api/organization`, member and invitation management under `/api/organization/members` and `/api/organization/invitations`, `POST/PUT/DELETE /api/organization/smtp`, `POST /api/organization/leave`, and `POST/PATCH/DELETE /api/api-keys` (account and access management)\n- `/api/integrations/slack/auth` (OAuth start)\n- `/api/organization/invitations/accept` (email link flow)\n- `/api/user/delete-account`\n- `/api/user/organizations/switch` (changes the session cookie)\n- `/api/chat/*`, `/api/ai/*`, `/api/incidents/{id}/summarize`, `/api/alert-groups/{id}/summarize`, `/api/reports/digest`, `POST /api/monitors/{id}/anomalies`, `POST /api/monitors/{id}/report` (AI and reporting features)\n\n## Check regions\n\nUptime checks for HTTP, HTTPS, KEYWORD, API and GRAPHQL monitors can run from `EU` (Europe), `US` (United States) and `ASIA` (Asia Pacific); other monitor types run from `EU`. Set them with `locations` on monitor create and update. Screenshots for visual checks are taken in `EU` or `ASIA` (`visualRegion`).\n\nAsia Pacific is enabled per workspace during its rollout. `GET /api/monitoring/regions` reports whether this workspace can use it. When it cannot, monitor create and update with `ASIA` return 400 with code `REGION_UNAVAILABLE`. A region outside your plan returns 403 with code `LOCATION_RESTRICTED`.\n\n## Mobile apps (iOS, Android, Mac)\n\nNative apps can use the same login flow: `POST /api/auth/login` returns a JWT. Send it as `Authorization: Bearer