{"openapi":"3.1.0","info":{"title":"WatchFor API","version":"1.0","description":"REST API for the WatchFor monitoring platform. Authenticate with a Bearer API key (Settings → API keys). Errors always return {\"error\":{\"code\",\"message\"}}. POST endpoints accept an Idempotency-Key header for safe retries. Full guides: https://watchfor.io/docs/api"},"servers":[{"url":"https://watchfor.io/api/v1"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"monitors"},{"name":"locations"},{"name":"incidents"},{"name":"maintenance-windows"},{"name":"contacts"},{"name":"contact-groups"},{"name":"status-pages"},{"name":"plan"},{"name":"on-call"},{"name":"meta"},{"name":"activity"},{"name":"notifications"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key, e.g. wf_live_…"}},"parameters":{},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","rate_limited","conflict","method_not_allowed","not_implemented","internal_error"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]},"Monitor":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"type":"string","const":"monitor"},"name":{"type":"string"},"type":{"type":"string","description":"http, api, dns, tcp, ssl, udp, icmp, mtr, smtp, ftp, sftp, websocket, rdap, blacklist, ntp, email_policy, sitemap, favicon, cdn, breach, brotli, cms, browser, heartbeat, mcp"},"target":{"type":"string"},"description":{"type":["string","null"]},"interval_seconds":{"type":"integer"},"status":{"type":"string","enum":["up","down","paused","unknown"]},"active":{"type":"boolean"},"scheduling_strategy":{"type":"string","enum":["roundrobin","random","parallel"]},"locations":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"config":{"type":"object","description":"Type-specific config; secret values are [redacted]"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"MonitorCreate":{"type":"object","required":["name","type","target","interval"],"properties":{"name":{"type":"string","maxLength":30},"type":{"type":"string"},"target":{"type":"string"},"interval":{"type":"integer","description":"Seconds"},"locations":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Location ids from GET /locations; required except for heartbeat"},"schedulingStrategy":{"type":"string","enum":["roundrobin","random","parallel"],"default":"roundrobin"},"tags":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"config":{"type":"object"},"isPaused":{"type":"boolean","default":false}}},"MonitorUpdate":{"type":"object","properties":{"name":{"type":"string"},"target":{"type":"string"},"description":{"type":"string"},"interval":{"type":"integer"},"schedulingStrategy":{"type":"string"},"locations":{"type":"array","items":{"type":"string","format":"uuid"}},"tags":{"type":"array","items":{"type":"string"}},"config":{"type":"object"}}},"Uptime":{"type":"object","properties":{"object":{"type":"string","const":"uptime"},"monitor_id":{"type":"string","format":"uuid"},"period":{"type":"string","enum":["1h","24h","7d","30d","90d"]},"uptime_percent":{"type":["number","null"]},"total_checks":{"type":"integer"},"successful_checks":{"type":"integer"},"failed_checks":{"type":"integer"},"avg_response_time_ms":{"type":["number","null"]},"min_response_time_ms":{"type":["number","null"]},"max_response_time_ms":{"type":["number","null"]},"last_failure_at":{"type":["string","null"]},"uptime_24h":{"type":["number","null"]},"uptime_7d":{"type":["number","null"]},"uptime_30d":{"type":["number","null"]}}},"Check":{"type":"object","properties":{"object":{"type":"string","const":"check"},"timestamp":{"type":"string"},"success":{"type":"boolean"},"duration_ms":{"type":"number"},"location":{"type":"string"},"error":{"type":["string","null"]},"status_code":{"type":"integer"}}},"BulkResult":{"type":"object","properties":{"object":{"type":"string","const":"bulk_result"},"action":{"type":"string","enum":["pause","resume","delete"]},"succeeded":{"type":"array","items":{"type":"string"}},"skipped":{"type":"array","items":{"type":"string"}}}},"AlertRule":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"type":"string","const":"alert_rule"},"monitor_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"metric":{"type":"string"},"operator":{"type":"string"},"value":{"type":"string"},"severity":{"type":"string","enum":["critical","warning","info"]},"failure_threshold":{"type":"integer"},"min_failed_probes":{"type":"integer"},"duration_window_seconds":{"type":"integer"},"enabled":{"type":"boolean"},"is_system":{"type":"boolean"},"contact_group":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"AlertRuleCreate":{"type":"object","required":["name","metric","operator","value"],"properties":{"name":{"type":"string","maxLength":200},"metric":{"type":"string"},"operator":{"type":"string"},"value":{"type":"string"},"severity":{"type":"string","enum":["critical","warning","info"],"default":"critical"},"failureThreshold":{"type":"integer","minimum":1,"maximum":100,"default":1},"minFailedProbes":{"type":"integer","minimum":1,"maximum":100,"default":1},"durationWindow":{"type":"integer","description":"Seconds","default":0},"contactGroupId":{"type":["string","null"],"format":"uuid"}}},"Location":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"type":"string","const":"location"},"name":{"type":"string"},"city":{"type":["string","null"]},"region":{"type":"string"},"country":{"type":"string"},"country_code":{"type":"string"}}},"Incident":{"type":"object","properties":{"id":{"type":"integer"},"object":{"type":"string","const":"incident"},"status":{"type":"string","enum":["firing","acknowledged","resolved"]},"severity":{"type":"string","enum":["warning","critical"]},"message":{"type":"string"},"monitor":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"started_at":{"type":"string","format":"date-time"},"acknowledged_at":{"type":["string","null"]},"resolved_at":{"type":["string","null"]}}},"MaintenanceWindow":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"type":"string","const":"maintenance_window"},"name":{"type":"string"},"description":{"type":["string","null"]},"monitor_ids":{"type":"array","items":{"type":"string"}},"monitor_tags":{"type":"array","items":{"type":"string"}},"starts_at":{"type":"string","format":"date-time"},"duration_minutes":{"type":"integer"},"timezone":{"type":"string"},"recurrence":{"type":"string","enum":["once","daily","weekly","monthly"]},"recurrence_until":{"type":["string","null"]},"suppress_alerts":{"type":"boolean"},"exclude_from_sla":{"type":"boolean"},"enabled":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"MaintenanceWindowCreate":{"type":"object","required":["name","startsAt","durationMinutes"],"properties":{"name":{"type":"string"},"startsAt":{"type":"string","format":"date-time"},"durationMinutes":{"type":"integer","minimum":5,"maximum":43200},"monitorIds":{"type":"array","items":{"type":"string"}},"monitorTags":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"timezone":{"type":"string","default":"UTC"},"recurrence":{"type":"string","enum":["once","daily","weekly","monthly"],"default":"once"},"recurrenceUntil":{"type":"string","format":"date-time"},"suppressAlerts":{"type":"boolean","default":true},"excludeFromSla":{"type":"boolean","default":true}}},"Contact":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"type":"string","const":"contact"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":["string","null"]},"groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"ContactGroup":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"type":"string","const":"contact_group"},"name":{"type":"string"},"description":{"type":["string","null"]},"is_default":{"type":"boolean"},"member_count":{"type":"integer"},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"StatusPage":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"type":"string","const":"status_page"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"public":{"type":"boolean"},"password_protected":{"type":"boolean"},"auto_publish_incidents":{"type":"boolean"},"dim_untracked_days":{"type":"boolean"},"theme":{"type":"string","enum":["light","dark","auto"]},"url":{"type":"string"},"component_count":{"type":"integer"},"components":{"type":"array","items":{"$ref":"#/components/schemas/StatusPageComponent"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"StatusPageComponent":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"type":"string","const":"status_page_component"},"name":{"type":"string"},"description":{"type":["string","null"]},"position":{"type":"integer"},"display_mode":{"type":"string"},"monitor_ids":{"type":"array","items":{"type":"string"}},"monitor_tags":{"type":"array","items":{"type":"string"}}}},"Announcement":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"type":"string","const":"announcement"},"type":{"type":"string","enum":["incident","maintenance"]},"title":{"type":"string"},"body":{"type":"string"},"status":{"type":"string","enum":["investigating","identified","monitoring","resolved"]},"severity":{"type":"string","enum":["minor","major","critical"]},"affected_component_ids":{"type":"array","items":{"type":"string"}},"resolved_at":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Plan":{"type":"object","properties":{"object":{"type":"string","const":"plan"},"name":{"type":"string"},"limits":{"type":["object","null"],"description":"-1 = unlimited, 0 = feature disabled"},"usage":{"type":"object"}}},"Notification":{"type":"object","properties":{"id":{"type":"integer"},"object":{"type":"string","const":"notification"},"status":{"type":"string","enum":["sent","failed","silenced"]},"channel":{"type":"object","properties":{"id":{"type":["integer","null"]},"type":{"type":"string"},"name":{"type":["string","null"]}}},"oncall_page":{"type":"boolean","description":"true when this was a personal on-call page"},"error":{"type":["string","null"]},"severity":{"type":["string","null"]},"incident":{"type":"object"},"monitor":{"type":["object","null"]},"created_at":{"type":"string","format":"date-time"}}},"ActivityEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"type":"string","const":"activity_event"},"entity_type":{"type":"string"},"entity_id":{"type":["string","null"]},"entity_name":{"type":["string","null"],"description":"Current display name of the entity (from the create/delete snapshot when it no longer exists)"},"action":{"type":"string"},"changes":{"type":"object"},"actor":{"type":["object","null"],"properties":{"name":{"type":["string","null"]},"email":{"type":["string","null"]}}},"created_at":{"type":"string","format":"date-time"}}},"Summary":{"type":"object","properties":{"object":{"type":"string","const":"summary"},"monitors":{"type":"object","description":"Status counts (up/down/paused/unknown) + health_score 0-100"},"incidents":{"type":"object","description":"Active incident counts (firing/acknowledged, by severity) + started_24h"},"open_maintenance_windows":{"type":"integer"}}},"IncidentStats":{"type":"object","properties":{"object":{"type":"string","const":"incident_stats"},"period":{"type":"string","enum":["24h","7d","30d","90d"]},"total":{"type":"integer"},"critical":{"type":"integer"},"warning":{"type":"integer"},"mttr_seconds":{"type":["integer","null"],"description":"Mean time to resolve for incidents started in the period (null when none resolved)"},"mtbf_seconds":{"type":["integer","null"],"description":"Period length divided by incident count (null when no incidents)"},"counts":{"type":"array","description":"Hourly buckets for 24h, daily otherwise","items":{"type":"object"}},"top_unstable_monitors":{"type":"array","items":{"type":"object"}}}},"OncallSchedule":{"type":"object","properties":{"id":{"type":"integer"},"object":{"type":"string","const":"oncall_schedule"},"name":{"type":"string"},"timezone":{"type":"string"},"enabled":{"type":"boolean"},"layer_count":{"type":"integer"},"current_on_call":{"type":["object","null"],"properties":{"user_id":{"type":"string"},"name":{"type":["string","null"]},"email":{"type":"string"}}}}}}},"paths":{"/me":{"get":{"tags":["meta"],"summary":"Identify the API key","responses":{"200":{"description":"Key identity + organization"}}}},"/openapi.json":{"get":{"tags":["meta"],"summary":"This document","security":[],"responses":{"200":{"description":"OpenAPI 3.1 spec"}}}},"/meta/monitor-types":{"get":{"tags":["meta"],"summary":"Discovery catalog: per-type alert metrics, config fields + default rules","security":[],"responses":{"200":{"description":"Every monitor type with target format, default alert rules, alert metrics and config fields"}}}},"/monitors":{"get":{"tags":["monitors"],"summary":"List monitors","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"type","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"tag","in":"query","schema":{"type":"string"}},{"name":"q","in":"query","schema":{"type":"string"},"description":"Case-insensitive substring search over name and target"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Monitor"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["monitors"],"summary":"Create a monitor","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorCreate"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Monitor"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/monitors/bulk":{"post":{"tags":["monitors"],"summary":"Bulk pause/resume/delete (max 100 ids)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["action","ids"],"properties":{"action":{"type":"string","enum":["pause","resume","delete"]},"ids":{"type":"array","items":{"type":"string","format":"uuid"}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkResult"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/monitors/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)"}],"get":{"tags":["monitors"],"summary":"Get a monitor","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Monitor"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["monitors"],"summary":"Update a monitor (partial)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorUpdate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Monitor"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["monitors"],"summary":"Delete a monitor and everything it owns","responses":{"204":{"description":"Deleted"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/monitors/{id}/pause":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)"}],"post":{"tags":["monitors"],"summary":"Pause checks (idempotent; closes open incidents)","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Monitor"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/monitors/{id}/resume":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)"}],"post":{"tags":["monitors"],"summary":"Resume checks (idempotent)","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Monitor"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/monitors/{id}/check-now":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)"}],"post":{"tags":["monitors"],"summary":"Dispatch one immediate check (plan-budgeted per hour)","responses":{"202":{"description":"Check dispatched"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/monitors/{id}/uptime":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)"},{"name":"period","in":"query","schema":{"type":"string","enum":["1h","24h","7d","30d","90d"],"default":"24h"}}],"get":{"tags":["monitors"],"summary":"Uptime % and response-time stats (maintenance excluded)","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Uptime"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/monitors/{id}/checks":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)"},{"name":"hours","in":"query","schema":{"type":"integer","minimum":1,"maximum":720,"default":24}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"get":{"tags":["monitors"],"summary":"Raw check history + per-location breakdown","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Check"}},"has_more":{"type":"boolean"},"locations":{"type":"array","items":{"type":"object"}}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/monitors/{id}/alert-rules":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)"}],"get":{"tags":["monitors"],"summary":"List a monitor's alert rules","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/AlertRule"}},"has_more":{"type":"boolean"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["monitors"],"summary":"Create an alert rule (syncs the alerting engine)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleCreate"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRule"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/monitors/{id}/alert-rules/{ruleId}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)"},{"name":"ruleId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)"}],"get":{"tags":["monitors"],"summary":"Get an alert rule","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRule"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["monitors"],"summary":"Update or enable/disable an alert rule","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRule"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["monitors"],"summary":"Delete an alert rule (system rules → 409)","responses":{"204":{"description":"Deleted"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/locations":{"get":{"tags":["locations"],"summary":"List probe locations","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Location"}},"has_more":{"type":"boolean"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/incidents":{"get":{"tags":["incidents"],"summary":"List incidents","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["firing","acknowledged","resolved"]}},{"name":"severity","in":"query","schema":{"type":"string","enum":["warning","critical"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from the previous page's next_cursor"},{"name":"monitor_id","in":"query","schema":{"type":"string","format":"uuid"},"description":"Only incidents of this monitor"},{"name":"since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Incidents started at/after this time"},{"name":"until","in":"query","schema":{"type":"string","format":"date-time"},"description":"Incidents started before this time"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Incident"}},"has_more":{"type":"boolean"},"total":{"type":"integer"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/incidents/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Incident id (integer)"}],"get":{"tags":["incidents"],"summary":"Get an incident","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Incident"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/incidents/{id}/acknowledge":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Incident id (integer)"}],"post":{"tags":["incidents"],"summary":"Acknowledge (idempotent; resolved incidents → 409)","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Incident"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/incidents/{id}/resolve":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Incident id (integer)"}],"post":{"tags":["incidents"],"summary":"Resolve — async, returns 202 with current state","responses":{"200":{"description":"Already resolved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Incident"}}}},"202":{"description":"Resolution requested","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Incident"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/incidents/{id}/mark-maintenance":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Incident id (integer)"}],"post":{"tags":["incidents"],"summary":"Retroactively exclude a resolved incident from uptime/SLA","responses":{"200":{"description":"Already marked"},"201":{"description":"Marked; returns the maintenance window"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/maintenance-windows":{"get":{"tags":["maintenance-windows"],"summary":"List maintenance windows","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from the previous page's next_cursor"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/MaintenanceWindow"}},"has_more":{"type":"boolean"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["maintenance-windows"],"summary":"Schedule a window","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceWindowCreate"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceWindow"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/maintenance-windows/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)"}],"get":{"tags":["maintenance-windows"],"summary":"Get a window","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceWindow"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["maintenance-windows"],"summary":"Update a window (partial; enabled:false disables)","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceWindow"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["maintenance-windows"],"summary":"Delete a window (lifts active silences)","responses":{"204":{"description":"Deleted"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contacts":{"get":{"tags":["contacts"],"summary":"List contacts","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from the previous page's next_cursor"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"has_more":{"type":"boolean"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["contacts"],"summary":"Create a contact","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","email"],"properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"groupIds":{"type":"array","items":{"type":"string","format":"uuid"}}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contacts/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)"}],"get":{"tags":["contacts"],"summary":"Get a contact","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["contacts"],"summary":"Update a contact (partial)","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["contacts"],"summary":"Delete a contact","responses":{"204":{"description":"Deleted"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contact-groups":{"get":{"tags":["contact-groups"],"summary":"List groups","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from the previous page's next_cursor"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ContactGroup"}},"has_more":{"type":"boolean"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["contact-groups"],"summary":"Create a group","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactGroup"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contact-groups/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)"}],"get":{"tags":["contact-groups"],"summary":"Get a group (with members)","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactGroup"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["contact-groups"],"summary":"Update a group (partial)","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactGroup"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["contact-groups"],"summary":"Delete a group (default group → 409)","responses":{"204":{"description":"Deleted"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/status-pages":{"get":{"tags":["status-pages"],"summary":"List status pages","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/StatusPage"}},"has_more":{"type":"boolean"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["status-pages"],"summary":"Create a status page (optionally with components)","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusPage"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/status-pages/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)"}],"get":{"tags":["status-pages"],"summary":"Get a page (with components)","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusPage"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["status-pages"],"summary":"Update a page (partial)","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusPage"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["status-pages"],"summary":"Delete a page","responses":{"204":{"description":"Deleted"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/status-pages/{id}/announcements":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)"}],"get":{"tags":["status-pages"],"summary":"List announcements","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Announcement"}},"has_more":{"type":"boolean"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["status-pages"],"summary":"Publish an incident announcement","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Announcement"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/status-pages/{id}/announcements/{announcementId}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)"},{"name":"announcementId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Resource id (UUID)"}],"get":{"tags":["status-pages"],"summary":"Get an announcement","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Announcement"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["status-pages"],"summary":"Post an update (moves status; resolved closes it)","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Announcement"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["status-pages"],"summary":"Remove from the public page (soft delete)","responses":{"204":{"description":"Deleted"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/plan":{"get":{"tags":["plan"],"summary":"Current plan, limits and live usage","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Plan"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/on-call":{"get":{"tags":["on-call"],"summary":"On-call schedules with the current on-call person","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/OncallSchedule"}},"has_more":{"type":"boolean"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/notifications":{"get":{"tags":["notifications"],"summary":"Alerting delivery history — notification attempts per channel","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from the previous page's next_cursor"},{"name":"status","in":"query","schema":{"type":"string","enum":["sent","failed","silenced"]}},{"name":"channel_type","in":"query","schema":{"type":"string"}},{"name":"monitor_id","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"incident_id","in":"query","schema":{"type":"integer"}},{"name":"since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"until","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Notification"}},"has_more":{"type":"boolean"},"total":{"type":"integer"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/activity":{"get":{"tags":["activity"],"summary":"Organization audit trail (who changed what, when)","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from the previous page's next_cursor"},{"name":"q","in":"query","schema":{"type":"string"},"description":"Free-text search over action, actor and JSON change details"},{"name":"entity_type","in":"query","schema":{"type":"string"}},{"name":"entity_id","in":"query","schema":{"type":"string"}},{"name":"since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"until","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ActivityEvent"}},"has_more":{"type":"boolean"}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/summary":{"get":{"tags":["summary"],"summary":"One-call org snapshot: monitor status counts, active incidents, open maintenance","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Summary"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/incidents/stats":{"get":{"tags":["incidents"],"summary":"Aggregate incident stats over a period: severity totals, MTTR/MTBF, most unstable monitors","parameters":[{"name":"period","in":"query","schema":{"type":"string","enum":["24h","7d","30d","90d"],"default":"7d"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentStats"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}