{"openapi":"3.1.0","info":{"title":"Happy Uptime API","version":"1.0.0","description":"REST API for Happy Uptime — uptime monitoring, incidents, status pages, alerts, and analytics. All endpoints return JSON. Paginated endpoints include a `meta` object.","contact":{"url":"https://happyuptime.com"}},"servers":[{"url":"https://happyuptime.com/api/v1"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Agent Bootstrap","description":"AI agent onboarding — create accounts and invite users without existing credentials"},{"name":"Project","description":"Project info, embed URLs, and badge snippets"},{"name":"Public Widgets","description":"No-auth embeddable badges, status JSON, and downtime banners"},{"name":"Monitors","description":"Create, manage, and query uptime monitors"},{"name":"Incidents","description":"Create and manage incidents with status updates"},{"name":"Status Pages","description":"Branded status pages with components"},{"name":"Alerts","description":"Alert channels and routing rules"},{"name":"Analytics","description":"Uptime, latency, and SLA data"},{"name":"Data Sources","description":"Custom JSON API data sources with field-level rule monitoring"},{"name":"Evidence","description":"SOC 2 evidence export: incidents, alert deliveries, audit log and on-call history"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"hu_api_key","description":"API key with `hu_` prefix. Send exactly `Authorization: Bearer hu_...`. `X-API-Key` is not supported. Create keys in Dashboard → Settings → API Keys."}},"schemas":{"Monitor":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"type":{"type":"string","enum":["http","ping","tcp","dns","keyword","heartbeat"]},"url":{"type":"string","format":"uri"},"method":{"default":"GET","type":"string","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS"]},"headers":{"description":"Request headers. Reads return the value of a credential header (Authorization, Cookie, or a name containing token, secret, key, auth, password, session or signature) as `••••••••`. On update, `••••••••` keeps the stored value; the object is replaced whole, not merged. A create rejects `••••••••`.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"body":{"type":"string"},"interval_seconds":{"default":120,"type":"integer","minimum":30,"maximum":3600},"timeout_ms":{"default":30000,"type":"integer","minimum":1000,"maximum":60000},"regions":{"default":["us-east"],"type":"array","items":{"type":"string","enum":["us-east","us-west","eu-west","eu-central","ap-southeast","ap-northeast"]}},"assertions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"operator":{"type":"string"},"value":{"type":"string"}},"required":["type","operator","value"],"additionalProperties":false}},"auth_type":{"type":"string","enum":["basic","bearer","header"]},"auth_config":{"description":"Auth settings (basic: username, password; bearer: token; api_key: header, key). Reads return every value as `••••••••`. On update, `••••••••` keeps the stored value, a new value replaces it and null clears the object; the object is replaced whole, not merged. A create rejects `••••••••`.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"keyword":{"type":"string"},"keyword_type":{"default":"contains","type":"string","enum":["contains","not_contains","regex"]},"heartbeat_interval":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"heartbeat_grace":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ssl_check":{"default":false,"type":"boolean"},"domain_check":{"default":false,"type":"boolean"},"screenshot_on_failure":{"default":true,"type":"boolean"},"screenshot_compare":{"default":false,"type":"boolean"},"screenshot_threshold":{"default":0.05,"type":"number","minimum":0,"maximum":1},"retry_count":{"default":2,"type":"integer","minimum":0,"maximum":5},"tags":{"type":"array","items":{"type":"string","maxLength":50}},"priority":{"default":"P2","type":"string","enum":["P1","P2","P3"]},"runbook_url":{"type":["string","null"]},"group_key":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]}},"required":["name","type","method","interval_seconds","timeout_ms","regions","keyword_type","ssl_check","domain_check","screenshot_on_failure","screenshot_compare","screenshot_threshold","retry_count","priority"],"additionalProperties":false},"MonitorUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"type":{"type":"string","enum":["http","ping","tcp","dns","keyword","heartbeat"]},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"method":{"type":"string","enum":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS"]},"headers":{"description":"Request headers. Reads return the value of a credential header (Authorization, Cookie, or a name containing token, secret, key, auth, password, session or signature) as `••••••••`. On update, `••••••••` keeps the stored value; the object is replaced whole, not merged. A create rejects `••••••••`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]},"body":{"type":["string","null"]},"interval_seconds":{"type":"integer","minimum":30,"maximum":3600},"timeout_ms":{"type":"integer","minimum":1000,"maximum":60000},"regions":{"type":"array","items":{"type":"string","enum":["us-east","us-west","eu-west","eu-central","ap-southeast","ap-northeast"]}},"assertions":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"operator":{"type":"string"},"value":{"type":"string"}},"required":["type","operator","value"],"additionalProperties":false}},{"type":"null"}]},"keyword":{"type":["string","null"]},"keyword_type":{"type":"string","enum":["contains","not_contains","regex"]},"ssl_check":{"type":"boolean"},"domain_check":{"type":"boolean"},"screenshot_on_failure":{"type":"boolean"},"screenshot_compare":{"type":"boolean"},"retry_count":{"type":"integer","minimum":0,"maximum":5},"tags":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"priority":{"type":"string","enum":["P1","P2","P3"]},"runbook_url":{"type":["string","null"]},"group_key":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]}},"additionalProperties":false},"Incident":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"severity":{"default":"minor","type":"string","enum":["minor","major","critical"]},"priority":{"type":"string","enum":["P1","P2","P3"]},"status":{"default":"investigating","type":"string","enum":["investigating","identified","monitoring","resolved"]},"message":{"type":"string"},"monitor_ids":{"type":"array","items":{"type":"string"}}},"required":["title","severity","status"],"additionalProperties":false},"IncidentUpdate":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"severity":{"type":"string","enum":["minor","major","critical"]},"priority":{"type":"string","enum":["P1","P2","P3"]},"status":{"type":"string","enum":["investigating","identified","monitoring","resolved"]}},"additionalProperties":false},"IncidentStatusUpdate":{"type":"object","properties":{"message":{"type":"string","minLength":1},"status":{"default":"investigating","type":"string","enum":["investigating","identified","monitoring","resolved"]},"is_internal":{"default":false,"type":"boolean"}},"required":["message","status","is_internal"],"additionalProperties":false},"StatusPage":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"slug":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z0-9-]+$"},"template":{"default":"minimal","type":"string","enum":["minimal","brand","terminal","modern","clean","developer"]},"brand_color":{"default":"#2563eb","type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"required":["name","slug","template","brand_color"],"additionalProperties":false},"StatusPageUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"logo_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"favicon_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"brand_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"custom_css":{"type":["string","null"]},"template":{"type":"string","enum":["minimal","brand","terminal","modern","clean","developer"]},"seo_title":{"type":["string","null"]},"seo_description":{"type":["string","null"]},"is_published":{"type":"boolean"}},"additionalProperties":false},"StatusPageComponent":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":["string","null"]},"monitor_id":{"type":["string","null"]}},"required":["name"],"additionalProperties":false},"AlertChannel":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"type":{"type":"string","enum":["slack","slack_app","discord","webhook","telegram","email","teams","sms","imessage","phone","pagerduty","opsgenie"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"is_default":{"default":false,"type":"boolean"},"active_hours":{"anyOf":[{"type":"object","properties":{"timezone":{"type":"string","minLength":1},"ranges":{"minItems":1,"type":"array","items":{"type":"object","properties":{"days":{"minItems":1,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$|^24:00$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$|^24:00$"}},"required":["days","start","end"],"additionalProperties":false}}},"required":["timezone","ranges"],"additionalProperties":false},{"type":"null"}]}},"required":["name","type","config","is_default"],"additionalProperties":false},"AlertRule":{"type":"object","properties":{"monitor_id":{"type":"string","minLength":1},"alert_channel_id":{"type":"string","minLength":1},"on_down":{"default":true,"type":"boolean"},"on_recovery":{"default":true,"type":"boolean"},"on_degraded":{"default":false,"type":"boolean"},"notify_oncall":{"default":false,"type":"boolean"},"mode":{"type":"string","enum":["page","notify"]},"oncall_schedule_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"quiet_hours_start":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"null"}]},"quiet_hours_end":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"null"}]}},"required":["monitor_id","alert_channel_id","on_down","on_recovery","on_degraded","notify_oncall"],"additionalProperties":false},"AlertRuleUpdate":{"type":"object","properties":{"on_down":{"type":"boolean"},"on_recovery":{"type":"boolean"},"on_degraded":{"type":"boolean"},"notify_oncall":{"type":"boolean"},"mode":{"type":"string","enum":["page","notify"]},"oncall_schedule_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"quiet_hours_start":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"null"}]},"quiet_hours_end":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"null"}]}},"additionalProperties":false},"DataSourceField":{"type":"object","properties":{"id":{"type":"string"},"path":{"type":"string"},"name_template":{"type":"string"},"rule_type":{"type":"string","enum":["equals","in","diff_lte","truthy","http_ok"]},"rule_config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"degraded_rule_config":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"display_order":{"type":"number"},"priority":{"type":"string","enum":["P1","P2","P3"]},"detail_path":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}]},"runbook_url":{"type":["string","null"]}},"required":["path","name_template","rule_type","rule_config"],"additionalProperties":false},"CreateDataSource":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"url":{"type":"string","format":"uri"},"method":{"type":"string","enum":["GET","POST"]},"headers":{"description":"Request headers. Reads return the value of a credential header (Authorization, Cookie, or a name containing token, secret, key, auth, password, session or signature) as `••••••••`. On update, `••••••••` keeps the stored value; the object is replaced whole, not merged. A create rejects `••••••••`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]},"body":{"type":["string","null"]},"auth_type":{"anyOf":[{"type":"string","enum":["basic","bearer","api_key"]},{"type":"null"}]},"auth_config":{"description":"Auth settings (basic: username, password; bearer: token; api_key: header, key). Reads return every value as `••••••••`. On update, `••••••••` keeps the stored value, a new value replaces it and null clears the object; the object is replaced whole, not merged. A create rejects `••••••••`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]},"root_path":{"type":["string","null"]},"fetch_interval_s":{"type":"integer","minimum":30,"maximum":9007199254740991},"timeout_ms":{"type":"integer","minimum":1000,"maximum":60000},"values_pre_confirmed":{"type":"boolean"},"link_default_channels":{"type":"boolean"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"path":{"type":"string"},"name_template":{"type":"string"},"rule_type":{"type":"string","enum":["equals","in","diff_lte","truthy","http_ok"]},"rule_config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"degraded_rule_config":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"display_order":{"type":"number"},"priority":{"type":"string","enum":["P1","P2","P3"]},"detail_path":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}]},"runbook_url":{"type":["string","null"]}},"required":["path","name_template","rule_type","rule_config"],"additionalProperties":false}}},"required":["name","url"],"additionalProperties":false},"UpdateDataSource":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"url":{"type":"string","format":"uri"},"method":{"type":"string","enum":["GET","POST"]},"headers":{"description":"Request headers. Reads return the value of a credential header (Authorization, Cookie, or a name containing token, secret, key, auth, password, session or signature) as `••••••••`. On update, `••••••••` keeps the stored value; the object is replaced whole, not merged. A create rejects `••••••••`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]},"body":{"type":["string","null"]},"auth_type":{"anyOf":[{"type":"string","enum":["basic","bearer","api_key"]},{"type":"null"}]},"auth_config":{"description":"Auth settings (basic: username, password; bearer: token; api_key: header, key). Reads return every value as `••••••••`. On update, `••••••••` keeps the stored value, a new value replaces it and null clears the object; the object is replaced whole, not merged. A create rejects `••••••••`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]},"root_path":{"type":["string","null"]},"fetch_interval_s":{"type":"integer","minimum":30,"maximum":9007199254740991},"timeout_ms":{"type":"integer","minimum":1000,"maximum":60000},"values_pre_confirmed":{"type":"boolean"},"link_default_channels":{"type":"boolean"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"path":{"type":"string"},"name_template":{"type":"string"},"rule_type":{"type":"string","enum":["equals","in","diff_lte","truthy","http_ok"]},"rule_config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"degraded_rule_config":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"display_order":{"type":"number"},"priority":{"type":"string","enum":["P1","P2","P3"]},"detail_path":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}]},"runbook_url":{"type":["string","null"]}},"required":["path","name_template","rule_type","rule_config"],"additionalProperties":false}}},"additionalProperties":false},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"not_found"},"message":{"type":"string","example":"Monitor not found"},"status":{"type":"integer","example":404}},"required":["code","message","status"]}},"required":["error"]},"PaginationMeta":{"type":"object","properties":{"page":{"type":"integer","example":1},"per_page":{"type":"integer","example":25},"total":{"type":"integer","example":42},"total_pages":{"type":"integer","example":2}},"required":["page","per_page","total","total_pages"]},"DeletedResponse":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","deleted"]}}},"paths":{"/agent/bootstrap":{"post":{"tags":["Agent Bootstrap"],"summary":"Create account + API key from email","operationId":"agentBootstrap","security":[],"description":"Public endpoint for AI agents. Creates a user account, organization, project, and admin API key from just an email address. The API key works immediately. Returns a claim_url for the user to set their password. Rate-limited to 3 per IP per hour.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email","description":"Customer's email address"},"name":{"type":"string","description":"Customer's name (optional)"}}}}}},"responses":{"201":{"description":"Account created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"api_key":{"type":"string","description":"Admin API key (hu_ prefix). Works immediately."},"organization_id":{"type":"string"},"user_id":{"type":"string"},"email":{"type":"string"},"claim_url":{"type":"string","description":"URL for user to set their password (72h expiry)"},"claim_expires_in":{"type":"string","example":"72h"},"dashboard_url":{"type":"string"},"message":{"type":"string"}}}}}}}},"409":{"description":"Email already registered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (3/hr per IP)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agent/invite":{"post":{"tags":["Agent Bootstrap"],"summary":"Invite user to project","operationId":"agentInvite","description":"Invite a user to the current project. If the email is not registered, a new account is created automatically and a claim_url is returned. Requires admin API key.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"},"name":{"type":"string"},"role":{"type":"string","enum":["admin","editor","viewer"],"default":"editor"}}}}}},"responses":{"200":{"description":"User invited","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"user_id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"is_new_account":{"type":"boolean"},"claim_url":{"type":"string","description":"Only present if a new account was created"}}}}}}}},"409":{"description":"Already a member","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/project":{"get":{"tags":["Project"],"summary":"Get project info, plan, and embed URLs","operationId":"getProject","description":"Returns the current project's ID, name, plan, plan limits, embed URLs, ready-to-paste snippets, and status pages. Use `status_pages[].public_url` or `embeds.links.status_page` as the canonical public status-page URL. Do not infer public routes from project slugs.","responses":{"200":{"description":"Project info with plan, limits, and embeds","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Project ID"},"name":{"type":"string"},"slug":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"plan":{"type":"string","enum":["free","pro","team","enterprise"],"description":"Current billing plan"},"limits":{"type":"object","description":"Plan-specific resource limits","properties":{"monitors":{"type":"integer","description":"Max monitors allowed"},"status_pages":{"type":"integer","description":"Max status pages allowed"},"custom_domains":{"type":"integer","description":"Max custom domains (0 = not available)"},"rate_limit":{"type":"integer","description":"API requests per minute"}}},"embeds":{"type":"object","properties":{"badges":{"type":"object","properties":{"uptime":{"type":"string","format":"uri","description":"Uptime badge SVG URL"},"status":{"type":"string","format":"uri","description":"Status badge SVG URL"},"response_time":{"type":"string","format":"uri","description":"Response time badge SVG URL"}}},"links":{"type":"object","description":"Canonical public links for the project's default status page","properties":{"status_page":{"type":["string","null"],"format":"uri","description":"Canonical public status page URL. Prefers a custom domain when configured."}}},"widgets":{"type":"object","properties":{"status_json":{"type":"string","format":"uri","description":"Status JSON endpoint (CORS-enabled)"},"badge_iframe":{"type":"string","format":"uri"},"downtime_banner":{"type":"string","format":"uri","description":"Embeddable downtime banner JS"}}},"snippets":{"type":"object","description":"Ready-to-paste HTML and Markdown snippets. Badge snippets are pre-linked to the canonical public status page when one exists.","properties":{"uptime_badge_html":{"type":"string"},"status_badge_html":{"type":"string"},"status_badge_iframe_html":{"type":"string","description":"Ready-to-paste iframe HTML for the live status badge widget."},"status_badge_markdown":{"type":"string"},"uptime_badge_markdown":{"type":"string"},"downtime_banner_html":{"type":"string"},"status_json_fetch":{"type":"string"}}}}},"status_pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"template":{"type":"string"},"brand_color":{"type":["string","null"]},"logo_url":{"type":["string","null"],"format":"uri"},"is_published":{"type":"integer","enum":[0,1]},"custom_domain":{"type":["string","null"]},"public_url":{"type":["string","null"],"format":"uri","description":"Canonical public URL for this status page when published. Uses the custom domain when configured, otherwise `/status/{slug}`."},"embeds":{"type":"object","description":"Scoped badge URLs, widget URLs, and copy-paste snippets for this status page only.","properties":{"badges":{"type":"object","properties":{"uptime":{"type":"string","format":"uri"},"status":{"type":"string","format":"uri"},"response_time":{"type":"string","format":"uri"}}},"links":{"type":"object","properties":{"status_page":{"type":["string","null"],"format":"uri"}}},"widgets":{"type":"object","properties":{"status_json":{"type":"string","format":"uri"},"badge_iframe":{"type":"string","format":"uri"},"downtime_banner":{"type":"string","format":"uri"}}},"snippets":{"type":"object","properties":{"uptime_badge_html":{"type":"string"},"status_badge_html":{"type":"string"},"status_badge_iframe_html":{"type":"string"},"status_badge_markdown":{"type":"string"},"uptime_badge_markdown":{"type":"string"},"downtime_banner_html":{"type":"string"},"status_json_fetch":{"type":"string"}}}}}}}}}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/widgets/{statusPageId}/badge":{"get":{"tags":["Public Widgets"],"summary":"Live status badge iframe","operationId":"getStatusBadgeIframe","security":[],"description":"Returns iframe-friendly HTML for a live status badge scoped to one status page. Supports Google Font loading and text styling query parameters.","parameters":[{"name":"statusPageId","in":"path","required":true,"schema":{"type":"string"},"description":"Status page ID"},{"name":"theme","in":"query","schema":{"type":"string","enum":["auto","dark","light"],"default":"auto"}},{"name":"template","in":"query","schema":{"type":"string","enum":["minimal","brand","modern","clean","terminal","developer"]}},{"name":"font","in":"query","schema":{"type":"string","example":"Inter"},"description":"Google Font family name, such as Inter, Manrope, or IBM Plex Sans"},{"name":"weight","in":"query","schema":{"type":"integer","minimum":100,"maximum":900,"multipleOf":100,"example":600}},{"name":"size","in":"query","schema":{"type":"number","minimum":9,"maximum":18,"example":12}},{"name":"tracking","in":"query","schema":{"type":"string","example":"0.02em"},"description":"Letter spacing as em or px, such as 0.02em or 0.5px"},{"name":"case","in":"query","schema":{"type":"string","enum":["none","uppercase","lowercase","capitalize"]}},{"name":"link","in":"query","schema":{"type":"string","format":"uri"},"description":"Optional destination URL. Defaults to the status page URL."}],"responses":{"200":{"description":"HTML badge document","content":{"text/html":{"schema":{"type":"string"},"example":"<iframe src=\"https://happyuptime.com/api/v1/widgets/sp_001/badge?theme=auto&font=Inter&weight=600&size=12&tracking=0.02em&case=none\" title=\"Status\" width=\"320\" height=\"24\" style=\"border:0;overflow:hidden\" loading=\"lazy\"></iframe>"}}}}}},"/widgets/{statusPageId}/status.json":{"get":{"tags":["Public Widgets"],"summary":"Status JSON","operationId":"getStatusWidgetJson","security":[],"description":"Returns CORS-enabled status data for custom frontend indicators.","parameters":[{"name":"statusPageId","in":"path","required":true,"schema":{"type":"string"},"description":"Status page ID"}],"responses":{"200":{"description":"Status data","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["operational","degraded","partial_outage","major_outage"]},"overall":{"type":"string"},"incidents":{"type":"array","items":{"type":"object"}},"maintenance":{"type":"array","items":{"type":"object"}}}}}}}}}},"/widgets/{statusPageId}/embed.js":{"get":{"tags":["Public Widgets"],"summary":"Downtime banner script","operationId":"getDowntimeBannerScript","security":[],"description":"Returns a JavaScript widget that auto-shows during active incidents and hides when systems are operational. Configure behavior with script tag data attributes: data-position, data-style, data-theme, and data-poll.","parameters":[{"name":"statusPageId","in":"path","required":true,"schema":{"type":"string"},"description":"Status page ID"}],"responses":{"200":{"description":"JavaScript widget","content":{"application/javascript":{"schema":{"type":"string"}}}}}}},"/monitors":{"get":{"tags":["Monitors"],"summary":"List monitors","operationId":"listMonitors","parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"per_page","in":"query","schema":{"type":"integer","default":25}},{"name":"status","in":"query","schema":{"type":"string","enum":["unknown","up","down","degraded","paused"]}},{"name":"type","in":"query","schema":{"type":"string","enum":["http","ping","tcp","dns","keyword","heartbeat"]}},{"name":"tag","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated list of monitors","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Monitor"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Monitors"],"summary":"Create monitor","operationId":"createMonitor","x-required-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Monitor"}}}},"responses":{"201":{"description":"Monitor created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Monitor"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/monitors/bulk":{"post":{"tags":["Monitors"],"summary":"Bulk create monitors","operationId":"bulkCreateMonitors","description":"Create up to 50 monitors in a single request. Returns created monitors and per-item errors.","x-required-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["monitors"],"properties":{"monitors":{"type":"array","maxItems":50,"items":{"$ref":"#/components/schemas/Monitor"}}}}}}},"responses":{"201":{"description":"Monitors created","content":{"application/json":{"schema":{"type":"object","properties":{"monitors":{"type":"array","items":{"$ref":"#/components/schemas/Monitor"}},"errors":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"error":{"type":"string"}}}}}}}}}}}},"/monitors/{id}":{"get":{"tags":["Monitors"],"summary":"Get monitor","operationId":"getMonitor","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Monitor detail with uptime","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Monitor"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["Monitors"],"summary":"Update monitor","operationId":"updateMonitor","x-required-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorUpdate"}}}},"responses":{"200":{"description":"Monitor updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Monitor"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Monitors"],"summary":"Delete monitor","operationId":"deleteMonitor","x-required-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Monitor deleted","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeletedResponse"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/monitors/{id}/pause":{"post":{"tags":["Monitors"],"summary":"Pause monitor","operationId":"pauseMonitor","x-required-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Monitor paused","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Monitor"}}}}}}}}},"/monitors/{id}/resume":{"post":{"tags":["Monitors"],"summary":"Resume monitor","operationId":"resumeMonitor","x-required-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Monitor resumed","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Monitor"}}}}}}}}},"/monitors/{id}/checks":{"get":{"tags":["Monitors"],"summary":"Check results","operationId":"listCheckResults","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"per_page","in":"query","schema":{"type":"integer","default":25}}],"responses":{"200":{"description":"Paginated check results"}}}},"/monitors/{id}/uptime":{"get":{"tags":["Monitors"],"summary":"Uptime data","operationId":"getMonitorUptime","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","schema":{"type":"string","enum":["24h","7d","30d","90d"],"default":"30d"}}],"responses":{"200":{"description":"Daily uptime data"}}}},"/incidents":{"get":{"tags":["Incidents"],"summary":"List incidents","operationId":"listIncidents","parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"per_page","in":"query","schema":{"type":"integer","default":25}},{"name":"status","in":"query","schema":{"type":"string","enum":["investigating","identified","monitoring","resolved"]}},{"name":"severity","in":"query","schema":{"type":"string","enum":["minor","major","critical"]}}],"responses":{"200":{"description":"Paginated list of incidents","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Incident"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}}}}}}}},"post":{"tags":["Incidents"],"summary":"Create incident","operationId":"createIncident","x-required-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Incident"}}}},"responses":{"201":{"description":"Incident created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Incident"}}}}}}}}},"/incidents/{id}":{"get":{"tags":["Incidents"],"summary":"Get incident","operationId":"getIncident","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Incident with updates and affected monitors"}}},"put":{"tags":["Incidents"],"summary":"Update incident","operationId":"updateIncident","x-required-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentUpdate"}}}},"responses":{"200":{"description":"Incident updated"}}},"delete":{"tags":["Incidents"],"summary":"Delete incident","operationId":"deleteIncident","x-required-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Incident deleted","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeletedResponse"}}}}}}}}},"/incidents/{id}/updates":{"post":{"tags":["Incidents"],"summary":"Add status update","operationId":"addIncidentUpdate","x-required-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentStatusUpdate"}}}},"responses":{"201":{"description":"Update added"}}}},"/incidents/{id}/resolve":{"post":{"tags":["Incidents"],"summary":"Resolve incident","operationId":"resolveIncident","x-required-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Incident resolved"}}}},"/status-pages":{"get":{"tags":["Status Pages"],"summary":"List pages","operationId":"listStatusPages","parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"per_page","in":"query","schema":{"type":"integer","default":25}}],"responses":{"200":{"description":"Paginated list of status pages"}}},"post":{"tags":["Status Pages"],"summary":"Create page","operationId":"createStatusPage","x-required-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusPage"}}}},"responses":{"201":{"description":"Status page created"},"409":{"description":"Slug conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/status-pages/{id}":{"get":{"tags":["Status Pages"],"summary":"Get page","operationId":"getStatusPage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Status page with components"}}},"put":{"tags":["Status Pages"],"summary":"Update page","operationId":"updateStatusPage","x-required-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusPageUpdate"}}}},"responses":{"200":{"description":"Status page updated"}}},"delete":{"tags":["Status Pages"],"summary":"Delete page","operationId":"deleteStatusPage","x-required-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Status page deleted"}}}},"/status-pages/{id}/components":{"post":{"tags":["Status Pages"],"summary":"Add component","operationId":"addComponent","x-required-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusPageComponent"}}}},"responses":{"201":{"description":"Component added"}}}},"/status-pages/{id}/components/{cid}":{"delete":{"tags":["Status Pages"],"summary":"Delete component","operationId":"deleteComponent","x-required-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Component deleted"}}}},"/status-pages/{id}/components/bulk":{"post":{"tags":["Status Pages"],"summary":"Bulk add components","operationId":"bulkAddComponents","description":"Add up to 50 components to a status page in a single request.","x-required-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["components"],"properties":{"components":{"type":"array","maxItems":50,"items":{"$ref":"#/components/schemas/StatusPageComponent"}}}}}}},"responses":{"201":{"description":"Components added","content":{"application/json":{"schema":{"type":"object","properties":{"components":{"type":"array","items":{"$ref":"#/components/schemas/StatusPageComponent"}},"errors":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"error":{"type":"string"}}}}}}}}}}}},"/status-pages/{id}/groups":{"get":{"tags":["Status Pages"],"summary":"List component groups","operationId":"listComponentGroups","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of component groups","content":{"application/json":{"schema":{"type":"object","properties":{"groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"display_order":{"type":"integer"},"is_collapsed":{"type":"boolean"}}}}}}}}}}},"post":{"tags":["Status Pages"],"summary":"Create component group","operationId":"createComponentGroup","x-required-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"is_collapsed":{"type":"boolean","default":false}}}}}},"responses":{"201":{"description":"Group created"}}}},"/status-pages/{id}/groups/{gid}":{"put":{"tags":["Status Pages"],"summary":"Update component group","operationId":"updateComponentGroup","x-required-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"gid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"display_order":{"type":"integer"},"is_collapsed":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Group updated"}}},"delete":{"tags":["Status Pages"],"summary":"Delete component group","operationId":"deleteComponentGroup","description":"Deletes the group and unlinks all components from it (components are NOT deleted).","x-required-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"gid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Group deleted"}}}},"/status-pages/{id}/custom-domain/analyze":{"post":{"tags":["Status Pages"],"summary":"Analyze custom domain DNS","operationId":"analyzeCustomDomain","x-required-scope":"write","description":"Inspects DNS records, Cloudflare ownership, SSL status, and Domain Connect availability for a custom domain. Returns analysis with CNAME target, verification status, and setup instructions. Requires a paid plan.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"Custom domain hostname (e.g. status.yourdomain.com)"}},"required":["domain"]}}}},"responses":{"200":{"description":"DNS analysis result"},"403":{"description":"Plan upgrade required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/status-pages/{id}/custom-domain/domain-connect":{"post":{"tags":["Status Pages"],"summary":"Prepare Domain Connect launch URL","operationId":"prepareDomainConnectLaunch","x-required-scope":"write","description":"Builds a signed Cloudflare Domain Connect launch URL for one-click DNS setup when the detected DNS provider supports the Happy Uptime status-page template. Requires a paid plan.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"Custom domain hostname (e.g. status.yourdomain.com)"}},"required":["domain"]}}}},"responses":{"200":{"description":"Signed launch URL and Domain Connect metadata"},"403":{"description":"Plan upgrade required"},"422":{"description":"Domain Connect is unavailable for this domain or provider"}}}},"/status-pages/{id}/custom-domain/apply":{"post":{"tags":["Status Pages"],"summary":"Connect custom domain","operationId":"applyCustomDomain","x-required-scope":"write","description":"Registers the custom hostname via Cloudflare for SaaS, provisions SSL, and saves the domain to the status page. User must point a CNAME to status-proxy.happyuptime.com. Requires a paid plan.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"Custom domain hostname (e.g. status.yourdomain.com)"}},"required":["domain"]}}}},"responses":{"200":{"description":"Custom domain applied with SSL provisioning status"},"403":{"description":"Plan upgrade required"},"409":{"description":"Domain already in use or zone not found"}}}},"/status-pages/{id}/custom-domain/verify":{"post":{"tags":["Status Pages"],"summary":"Verify custom domain","operationId":"verifyCustomDomain","x-required-scope":"write","description":"Checks whether the CNAME record is live and SSL is active. Call after the user has configured their DNS. Requires a paid plan.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string"}}}}}},"responses":{"200":{"description":"Verification result with verified boolean and analysis"},"403":{"description":"Plan upgrade required"}}}},"/status-pages/{id}/custom-domain":{"delete":{"tags":["Status Pages"],"summary":"Remove custom domain","operationId":"removeCustomDomain","x-required-scope":"write","description":"Removes the custom domain from the status page and deletes the Cloudflare custom hostname.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Custom domain removed"},"400":{"description":"No custom domain connected"}}}},"/alerts/channels":{"get":{"tags":["Alerts"],"summary":"List channels","operationId":"listAlertChannels","responses":{"200":{"description":"List of alert channels"}}},"post":{"tags":["Alerts"],"summary":"Create channel","operationId":"createAlertChannel","x-required-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertChannel"}}}},"responses":{"201":{"description":"Channel created"}}}},"/alerts/channels/{id}":{"delete":{"tags":["Alerts"],"summary":"Delete channel","operationId":"deleteAlertChannel","x-required-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Channel deleted"}}}},"/alerts/rules":{"get":{"tags":["Alerts"],"summary":"List rules","operationId":"listAlertRules","parameters":[{"name":"monitor_id","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"List of alert rules"}}},"post":{"tags":["Alerts"],"summary":"Create rule","operationId":"createAlertRule","x-required-scope":"write","description":"`notify_oncall` also pages the on-call person (DM, email, SMS, phone, Telegram per their settings). `oncall_schedule_id` must belong to this project; it is rejected with 400 otherwise.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRule"}}}},"responses":{"201":{"description":"Rule created"},"400":{"description":"Invalid body, or schedule not in this project","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/alerts/rules/{id}":{"put":{"tags":["Alerts"],"summary":"Update rule","operationId":"updateAlertRule","x-required-scope":"write","description":"Partial update. Only the fields present in the body change. `oncall_schedule_id` must belong to this project. `quiet_hours_start` and `quiet_hours_end` (HH:MM, UTC) must both be set or both be null.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleUpdate"}}}},"responses":{"200":{"description":"Rule updated"},"400":{"description":"Invalid body, or schedule not in this project","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Rule not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Alerts"],"summary":"Delete rule","operationId":"deleteAlertRule","x-required-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Rule deleted"}}}},"/analytics/uptime":{"get":{"tags":["Analytics"],"summary":"Uptime data","operationId":"getUptime","parameters":[{"name":"monitor_id","in":"query","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","schema":{"type":"string","enum":["24h","7d","30d","90d"],"default":"30d"}}],"responses":{"200":{"description":"Daily uptime with overall percentage"}}}},"/analytics/latency":{"get":{"tags":["Analytics"],"summary":"Latency data","operationId":"getLatency","parameters":[{"name":"monitor_id","in":"query","required":true,"schema":{"type":"string"}},{"name":"region","in":"query","schema":{"type":"string","enum":["us-east","us-west","eu-west","eu-central","ap-southeast","ap-northeast"]}},{"name":"from","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Hourly latency percentiles"}}}},"/analytics/sla":{"get":{"tags":["Analytics"],"summary":"SLA compliance","operationId":"getSla","parameters":[{"name":"monitor_id","in":"query","required":true,"schema":{"type":"string"}},{"name":"target","in":"query","schema":{"type":"number","default":99.9}},{"name":"days","in":"query","schema":{"type":"integer","default":30}}],"responses":{"200":{"description":"SLA compliance data with error budget"}}}},"/analytics/summary":{"get":{"tags":["Analytics"],"summary":"Dashboard summary","operationId":"getSummary","responses":{"200":{"description":"Monitor and incident summary"}}}},"/evidence":{"get":{"tags":["Evidence"],"summary":"SOC 2 evidence export","operationId":"getEvidenceExport","x-required-scope":"read","description":"Read-only export for auditors, scoped to the API key's organization. Returns one page of each requested collection for the range [from, to): `incidents` (with ack/resolve times, who acknowledged, computed `time_to_ack_s` / `time_to_resolve_s` and the incident updates), `alert_log` (delivery attempts, without request bodies or error text), `oncall_audit_log` (on-call changes, escalations and config changes; config actions are prefixed `config.`) and `oncall_shift_history`. Each collection is ordered by time, then insertion order. Follow `meta.next_cursor` until it is null. Timestamps are UTC ISO 8601. Credentials, webhook URLs, phone numbers and emails are never included; free text (incident titles and updates, channel names) is scrubbed of URLs, emails, tokens and phone numbers.","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date-time"},"description":"Start of range, inclusive (ISO 8601)."},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date-time"},"description":"End of range, exclusive (ISO 8601). Must be after `from`."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"description":"Rows per collection per page. Values above 500 are capped."},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque `meta.next_cursor` from the previous page. Keep `from`, `to`, `limit` and `collections` unchanged between pages."},{"name":"collections","in":"query","schema":{"type":"string"},"description":"Comma-separated subset of `incidents,alert_log,oncall_audit_log,oncall_shift_history`. Default: all four."}],"responses":{"200":{"description":"One page of evidence","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"incidents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"severity":{"type":"string"},"auto_created":{"type":"boolean"},"auto_resolved":{"type":"boolean"},"source_monitor_id":{"type":"string","nullable":true},"source_monitor_name":{"type":"string","nullable":true},"started_at":{"type":"string","format":"date-time"},"acknowledged_at":{"type":"string","format":"date-time","nullable":true},"acknowledged_by":{"type":"string","nullable":true,"description":"User id, or `slack:<member id>` when acknowledged from Slack."},"resolved_at":{"type":"string","format":"date-time","nullable":true},"time_to_ack_s":{"type":"integer","nullable":true},"time_to_resolve_s":{"type":"integer","nullable":true},"updates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"incident_id":{"type":"string"},"status":{"type":"string"},"message":{"type":"string"},"is_internal":{"type":"boolean"},"author_id":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time"}}}}}}},"alert_log":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"sent_at":{"type":"string","format":"date-time","nullable":true},"event_type":{"type":"string"},"status":{"type":"string"},"channel_type":{"type":"string"},"channel_name":{"type":"string"},"channel_id":{"type":"string","nullable":true},"monitor_id":{"type":"string","nullable":true},"incident_id":{"type":"string","nullable":true},"alert_rule_id":{"type":"string","nullable":true},"response_code":{"type":"integer","nullable":true},"attempts":{"type":"integer","nullable":true}}}},"oncall_audit_log":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"schedule_id":{"type":"string","nullable":true},"actor_user_id":{"type":"string","nullable":true},"actor_name":{"type":"string","nullable":true},"action":{"type":"string"},"target_type":{"type":"string"},"target_id":{"type":"string","nullable":true},"details":{"type":"object","nullable":true,"description":"Scrubbed JSON. Config changes carry `changed`, `before`, `after`, `via` and `api_key_id`."}}}},"oncall_shift_history":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"schedule_id":{"type":"string","nullable":true,"description":"Null once the schedule is deleted; the row is kept."},"schedule_name":{"type":"string","nullable":true},"layer_id":{"type":"string","nullable":true},"user_id":{"type":"string"},"user_name":{"type":"string","nullable":true},"started_at":{"type":"string","format":"date-time"},"ended_at":{"type":"string","format":"date-time","nullable":true},"source":{"type":"string"}}}}}},"meta":{"type":"object","properties":{"organization_id":{"type":"string"},"range":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}}},"generated_at":{"type":"string","format":"date-time"},"page_size":{"type":"integer"},"collections":{"type":"object","additionalProperties":{"type":"object","properties":{"returned":{"type":"integer"},"has_more":{"type":"boolean"}}}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}}}}}}}},"400":{"description":"Missing or invalid from/to/limit/cursor/collections","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/data-sources":{"get":{"tags":["Data Sources"],"summary":"List data sources","operationId":"listDataSources","description":"Returns all custom JSON API data sources for the project, including field count and child monitor count.","responses":{"200":{"description":"List of data sources","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CreateDataSource"}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Data Sources"],"summary":"Create data source","operationId":"createDataSource","x-required-scope":"write","description":"Create a new custom JSON API data source. Optionally supply `fields` to create monitoring fields inline. Triggers an immediate fetch in the background.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDataSource"},"example":{"name":"My Status API","url":"https://api.example.com/status","method":"GET","fetch_interval_s":60,"fields":[{"path":"services.*.status","name_template":"{{key}}","rule_type":"equals","rule_config":{"value":"ok"}}]}}}},"responses":{"201":{"description":"Data source created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}}}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Tier limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/data-sources/discover":{"post":{"tags":["Data Sources"],"summary":"AI field discovery","operationId":"discoverDataSource","x-required-scope":"write","description":"Fetches a URL (or uses a provided `sample_json`) and uses AI to suggest monitoring fields with rule configs. Each suggestion includes a dry-eval against the live payload. To re-probe a saved source with the masked `headers` / `auth_config` that GET returned, pass its `source_id`: each `••••••••` value is replaced with the stored one. Without `source_id` a masked value is a 400.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"URL to fetch (required unless sample_json is provided)"},"method":{"type":"string","enum":["GET","POST"],"default":"GET"},"headers":{"type":"object","additionalProperties":{"type":"string"},"nullable":true},"auth_type":{"type":"string","enum":["basic","bearer","api_key"],"nullable":true},"auth_config":{"type":"object","additionalProperties":{"type":"string"},"nullable":true},"source_id":{"type":"string","description":"A saved source whose stored secrets replace `••••••••` values in `headers` / `auth_config`"},"sample_json":{"description":"Pre-fetched JSON payload (skips the live fetch)"}}}}}},"responses":{"200":{"description":"Suggested fields with dry-eval results and prompt version"},"429":{"description":"AI usage limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Fetch failed or AI returned invalid schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/data-sources/test":{"post":{"tags":["Data Sources"],"summary":"Dry-eval a mapping","operationId":"testDataSource","x-required-scope":"write","description":"Fetches a URL live and evaluates a set of proposed fields against the response without persisting anything. Useful for previewing rule outcomes before saving. Pass `source_id` to use a saved source's stored secrets for any `••••••••` value; without it a masked value is a 400.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","fields"],"properties":{"url":{"type":"string","format":"uri"},"method":{"type":"string","enum":["GET","POST"],"default":"GET"},"headers":{"type":"object","additionalProperties":{"type":"string"},"nullable":true},"auth_type":{"type":"string","enum":["basic","bearer","api_key"],"nullable":true},"auth_config":{"type":"object","additionalProperties":{"type":"string"},"nullable":true},"source_id":{"type":"string","description":"A saved source whose stored secrets replace `••••••••` values in `headers` / `auth_config`"},"root_path":{"type":"string","nullable":true,"description":"JSONPath root (e.g. `data.services`)"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/DataSourceField"}}}}}}},"responses":{"200":{"description":"Per-field evaluation results with fetch timing and raw payload"},"502":{"description":"Fetch failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/data-sources/{id}":{"get":{"tags":["Data Sources"],"summary":"Get data source","operationId":"getDataSource","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Data source with fields and child monitors"},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["Data Sources"],"summary":"Update data source","operationId":"updateDataSource","x-required-scope":"write","description":"Update source metadata (URL, headers, interval, etc.). Fields are managed via the `/fields` sub-resource. Omitted properties keep their stored values. `headers` and `auth_config` are replaced whole, not merged; inside them `••••••••` (what GET returns for a stored credential) keeps the stored value.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDataSource"}}}},"responses":{"200":{"description":"Source updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}}}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Data Sources"],"summary":"Delete data source","operationId":"deleteDataSource","x-required-scope":"write","description":"Cascade-deletes all fields, child monitors (with their check results and alert rules), and the fetch log before removing the source.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Source deleted","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeletedResponse"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/data-sources/{id}/fetch":{"post":{"tags":["Data Sources"],"summary":"Force an immediate fetch","operationId":"fetchDataSource","x-required-scope":"write","description":"Triggers an immediate out-of-schedule fetch and rule evaluation for the source. Rate-limited to 1 fetch per 10 seconds per source.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Fetch triggered","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"triggered":{"type":"boolean"}}}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (1 fetch / 10s per source)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/data-sources/{id}/fields":{"get":{"tags":["Data Sources"],"summary":"List fields","operationId":"listDataSourceFields","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Ordered list of monitoring fields for the source"}}},"post":{"tags":["Data Sources"],"summary":"Add field","operationId":"addDataSourceField","x-required-scope":"write","description":"Add a new monitoring field to an existing data source. Creates a child `json_api` monitor for the field. Subject to per-source tier limits.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSourceField"},"example":{"path":"queue.depth","name_template":"Queue Depth","rule_type":"diff_lte","rule_config":{"fieldA":"queue.depth","fieldB":"queue.depth","max":1000}}}}},"responses":{"200":{"description":"Field created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}}}}}}}},"402":{"description":"Tier field limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/data-sources/{id}/fields/{fid}":{"put":{"tags":["Data Sources"],"summary":"Update field","operationId":"updateDataSourceField","x-required-scope":"write","description":"Update an existing field's path, name template, rule type, rule config, `detail_path` or `runbook_url`. All fields are optional; only provided keys are updated. `null` clears `detail_path` and `runbook_url`; child monitors read the field's `runbook_url` at alert time.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"fid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSourceField"}}}},"responses":{"200":{"description":"Field updated"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Data Sources"],"summary":"Delete field","operationId":"deleteDataSourceField","x-required-scope":"write","description":"With `?cascade=true`: deletes the field and all child monitors. Without: pauses child monitors and retains the field row.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"fid","in":"path","required":true,"schema":{"type":"string"}},{"name":"cascade","in":"query","schema":{"type":"boolean","default":false},"description":"If true, delete the field and all child monitors. If false (default), pause child monitors."}],"responses":{"200":{"description":"Field deleted or children paused"}}}},"/data-sources/{id}/publish":{"post":{"tags":["Data Sources"],"summary":"Publish fields to status page","operationId":"publishDataSource","x-required-scope":"write","description":"Bulk-creates status page components for the specified field child monitors. The status page must belong to the same organization.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["status_page_id","field_ids"],"properties":{"status_page_id":{"type":"string","description":"Target status page ID"},"group_id":{"type":"string","nullable":true,"description":"Optional component group ID"},"field_ids":{"type":"array","items":{"type":"string"},"description":"Field IDs whose child monitors should be added as components"}}},"example":{"status_page_id":"sp_abc123","field_ids":["fid1","fid2"]}}}},"responses":{"200":{"description":"Components created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"created_component_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"404":{"description":"Data source or status page not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}