{
  "openapi": "3.1.0",
  "info": {
    "title": "Cheapmonit public API",
    "version": "1.0.0",
    "summary": "Monitors, checks, uptime, incidents, reports, and status pages of one workspace.",
    "description": "The public API works in the workspace its API key belongs to. Send the key as `Authorization: Bearer <key>` on every request; browser sessions, passwords, and keys in query strings are not accepted. A read key reads; a write key also adds, changes, and removes monitors and acknowledges incidents. Keys work only while the workspace's owner is on Premium (in early access). Each key makes up to 120 requests a minute across REST and MCP, besides the limit of 300 API requests a minute per client address. Request bodies are limited to 32 KiB. Members, alert channels, schedules, status page editing, the account, and API keys themselves are not part of the API.",
    "contact": {
      "name": "Cheapmonit documentation",
      "url": "https://cheapmonit.com/docs/team/api-keys"
    }
  },
  "externalDocs": {
    "description": "API keys and the public API",
    "url": "https://cheapmonit.com/docs/team/api-keys"
  },
  "servers": [
    {
      "url": "https://cheapmonit.com/api/v1",
      "description": "Cheapmonit. For a self-hosted installation, replace the origin with your own."
    }
  ],
  "security": [
    {
      "apiKey": ["read"]
    }
  ],
  "tags": [
    { "name": "Monitors", "description": "Monitor settings, the latest check, and observed uptime." },
    { "name": "Incidents", "description": "Confirmed outages of the workspace's monitors." },
    { "name": "Reports", "description": "Availability, error budgets, MTTA, and MTTR." },
    { "name": "Status pages", "description": "The workspace's status pages, read only." },
    { "name": "MCP", "description": "The remote MCP server for agents." }
  ],
  "paths": {
    "/monitors": {
      "get": {
        "tags": ["Monitors"],
        "operationId": "listMonitors",
        "summary": "List monitors",
        "description": "The workspace's monitors, oldest first, each with its latest check and seven days of uptime.",
        "responses": {
          "200": {
            "description": "The workspace's monitors; an empty array when it has none.",
            "content": {
              "application/json": {
                "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Monitor" } }
              }
            }
          },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "429": { "$ref": "#/components/responses/TooManyRequests" }
        }
      },
      "post": {
        "tags": ["Monitors"],
        "operationId": "createMonitor",
        "summary": "Create a monitor",
        "description": "Adds a monitor. Defaults are an enabled HTTP monitor with verified TLS certificates, GET requests, any 2xx response, and hourly checks. The account's monitor limit counts paused monitors too. Creation does not wait for the first check. POST has no idempotency key: after a lost response, list the monitors before retrying.",
        "security": [{ "apiKey": ["write"] }],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/MonitorCreate" },
              "example": { "name": "Production health", "url": "https://example.com/health", "check_interval_seconds": 300 }
            }
          }
        },
        "responses": {
          "200": { "$ref": "#/components/responses/Saved" },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "429": { "$ref": "#/components/responses/TooManyRequests" }
        }
      }
    },
    "/monitors/{id}": {
      "parameters": [{ "$ref": "#/components/parameters/MonitorID" }],
      "get": {
        "tags": ["Monitors"],
        "operationId": "getMonitor",
        "summary": "Read a monitor",
        "responses": {
          "200": {
            "description": "The monitor.",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Monitor" } } }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/TooManyRequests" }
        }
      },
      "patch": {
        "tags": ["Monitors"],
        "operationId": "updateMonitor",
        "summary": "Change a monitor",
        "description": "Changes the settings in the body and keeps every setting it leaves out. Send `enabled: false` to pause and `enabled: true` to resume. When changing `request_headers`, send the whole list: headers left out are removed, and a header sent without `value` keeps its saved value.",
        "security": [{ "apiKey": ["write"] }],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/MonitorInput" },
              "example": { "enabled": false }
            }
          }
        },
        "responses": {
          "200": { "$ref": "#/components/responses/Saved" },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/TooManyRequests" }
        }
      },
      "delete": {
        "tags": ["Monitors"],
        "operationId": "deleteMonitor",
        "summary": "Delete a monitor",
        "description": "Removes the monitor with its check and incident history. This cannot be undone.",
        "security": [{ "apiKey": ["write"] }],
        "responses": {
          "200": { "$ref": "#/components/responses/OK" },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/TooManyRequests" }
        }
      }
    },
    "/monitors/{id}/checks": {
      "parameters": [{ "$ref": "#/components/parameters/MonitorID" }],
      "get": {
        "tags": ["Monitors"],
        "operationId": "listChecks",
        "summary": "List a monitor's checks",
        "description": "Up to 200 checks, newest first. To page back, pass the ID of the oldest check received as before. A monitor outside the workspace, or a before that is not one of the monitor's checks, answers an empty array.",
        "parameters": [{ "name": "before", "in": "query", "required": false, "description": "A check ID of this monitor: answers the checks older than it.", "schema": { "type": "string", "format": "uuid" } }],
        "responses": {
          "200": {
            "description": "Checks, newest first.",
            "content": {
              "application/json": {
                "schema": { "type": "array", "maxItems": 200, "items": { "$ref": "#/components/schemas/Check" } }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "429": { "$ref": "#/components/responses/TooManyRequests" }
        }
      }
    },
    "/monitors/{id}/uptime": {
      "parameters": [{ "$ref": "#/components/parameters/MonitorID" }],
      "get": {
        "tags": ["Monitors"],
        "operationId": "getUptime",
        "summary": "Read a monitor's uptime",
        "description": "Time-weighted uptime over the period and for each UTC day. Pending and paused periods are excluded, and missing observations stay missing (`null`), never 100%.",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "description": "Days of history.",
            "schema": { "type": "integer", "enum": [7, 30, 90], "default": 7 }
          }
        ],
        "responses": {
          "200": {
            "description": "Overall and daily uptime.",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Uptime" } } }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/TooManyRequests" }
        }
      }
    },
    "/incidents": {
      "get": {
        "tags": ["Incidents"],
        "operationId": "listIncidents",
        "summary": "List incidents",
        "description": "The workspace's latest 200 incidents, newest first. There is no pagination.",
        "responses": {
          "200": {
            "description": "Incidents, newest first.",
            "content": {
              "application/json": {
                "schema": { "type": "array", "maxItems": 200, "items": { "$ref": "#/components/schemas/Incident" } }
              }
            }
          },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "429": { "$ref": "#/components/responses/TooManyRequests" }
        }
      }
    },
    "/incidents/{id}/acknowledge": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "description": "The incident's ID, from `GET /incidents`.",
          "schema": { "type": "string", "format": "uuid" }
        }
      ],
      "post": {
        "tags": ["Incidents"],
        "operationId": "acknowledgeIncident",
        "summary": "Acknowledge an incident",
        "description": "Takes ownership of an open outage and stops further escalation. The acknowledgement names the key (`API key <name>`); the first one stands. It does not resolve the outage or change check results.",
        "security": [{ "apiKey": ["write"] }],
        "responses": {
          "200": { "$ref": "#/components/responses/OK" },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "404": { "$ref": "#/components/responses/NotFound" },
          "409": {
            "description": "The incident is already acknowledged or already resolved.",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }
          },
          "429": { "$ref": "#/components/responses/TooManyRequests" }
        }
      }
    },
    "/reports": {
      "get": {
        "tags": ["Reports"],
        "operationId": "getReport",
        "summary": "Read a reliability report",
        "description": "Incident response and availability over the last 7, 30, or 90 days, or over a calendar month in UTC. Incidents are counted by when they started. Error budgets count observed time only; the burn rate is reported, never alerted on.",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "description": "Days to cover. Leave it out when choosing `month`.",
            "schema": { "type": "integer", "enum": [7, 30, 90], "default": 30 }
          },
          {
            "name": "month",
            "in": "query",
            "description": "A UTC calendar month as YYYY-MM: the current month or one of the 12 before it.",
            "schema": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}$" },
            "example": "2026-09"
          },
          {
            "name": "format",
            "in": "query",
            "description": "`csv` downloads the monitor rows of the same report as a file.",
            "schema": { "type": "string", "enum": ["csv"] }
          }
        ],
        "responses": {
          "200": {
            "description": "The report, or with `format=csv` its monitor rows as CSV.",
            "content": {
              "application/json": { "schema": { "$ref": "#/components/schemas/Report" } },
              "text/csv": {
                "schema": { "type": "string" },
                "example": "Monitor,Uptime %,SLA target %,Observed seconds,Downtime seconds,Error budget seconds,Burn rate (24 h),Incidents,Acknowledged,MTTA seconds,MTTR seconds\n"
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "429": { "$ref": "#/components/responses/TooManyRequests" }
        }
      }
    },
    "/status-pages": {
      "get": {
        "tags": ["Status pages"],
        "operationId": "listStatusPages",
        "summary": "List status pages",
        "description": "The workspace's status pages, oldest first, with their sections, components, and up to 50 reported incidents each. A private page's password is never returned.",
        "responses": {
          "200": {
            "description": "Status pages, oldest first.",
            "content": {
              "application/json": {
                "schema": { "type": "array", "items": { "$ref": "#/components/schemas/StatusPage" } }
              }
            }
          },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "429": { "$ref": "#/components/responses/TooManyRequests" }
        }
      }
    },
    "/mcp": {
      "post": {
        "tags": ["MCP"],
        "operationId": "mcp",
        "summary": "MCP over Streamable HTTP",
        "description": "A remote MCP server for agents: JSON-RPC 2.0 over POST, with the same key and permissions as REST. It is stateless, assigns no session ID, answers with JSON, and offers no standalone SSE stream (GET and DELETE answer 405). Batches are refused. A tool's own failure is reported inside a 200 response (`error`, or `isError` in the tool result). See the MCP guide for client configuration.",
        "externalDocs": {
          "description": "MCP setup for Claude Code and Cursor",
          "url": "https://cheapmonit.com/docs/team/mcp"
        },
        "parameters": [
          {
            "name": "MCP-Protocol-Version",
            "in": "header",
            "description": "The protocol version negotiated by `initialize`, on every later request.",
            "schema": { "type": "string" },
            "example": "2025-11-25"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/JSONRPCMessage" },
              "example": {
                "jsonrpc": "2.0",
                "id": 1,
                "method": "initialize",
                "params": {
                  "protocolVersion": "2025-11-25",
                  "capabilities": {},
                  "clientInfo": { "name": "example-client", "version": "1.0" }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A JSON-RPC response.",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JSONRPCMessage" } } }
          },
          "202": { "description": "A notification or response was accepted; there is no body." },
          "400": { "description": "The message is not valid JSON-RPC, or is a batch." },
          "413": { "description": "The request body is larger than 32 KiB." },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "429": { "$ref": "#/components/responses/TooManyRequests" }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "cm_ followed by 64 hexadecimal characters",
        "description": "A workspace API key from Workspace settings → API keys. The roles in each operation's security requirement name the key it needs: `read` (a read or a write key) or `write` (a write key)."
      }
    },
    "parameters": {
      "MonitorID": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The monitor's ID.",
        "schema": { "type": "string", "format": "uuid" }
      }
    },
    "responses": {
      "OK": {
        "description": "Done.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": ["ok"],
              "properties": { "ok": { "type": "boolean", "const": true } }
            }
          }
        }
      },
      "Saved": {
        "description": "The monitor was saved.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": ["id"],
              "properties": {
                "id": { "type": "string", "format": "uuid" },
                "ping_url": { "type": "string", "description": "A new heartbeat monitor's ping URL, answered this once. Only its hash is stored." },
                "ping_token": { "type": "string", "description": "The token at the end of `ping_url`." }
              }
            },
            "example": { "id": "019a0000-0000-7000-8000-000000000001" }
          }
        }
      },
      "BadRequest": {
        "description": "An invalid body, setting, ID, or query, or a plan limit was reached.",
        "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }
      },
      "Unauthorized": {
        "description": "The key is missing, unknown, expired, or removed.",
        "headers": {
          "WWW-Authenticate": { "schema": { "type": "string", "const": "Bearer" } }
        },
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/Error" },
            "example": { "error": "Send a valid API key as Authorization: Bearer <key>" }
          }
        }
      },
      "Forbidden": {
        "description": "A read key tried to write, or the workspace's owner is not on Premium, or the setting needs Premium.",
        "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }
      },
      "NotFound": {
        "description": "Nothing with this ID in the key's workspace.",
        "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }
      },
      "TooManyRequests": {
        "description": "The key's or the client address's limit was reached.",
        "headers": {
          "Retry-After": { "description": "Seconds to wait before retrying.", "schema": { "type": "integer" } }
        },
        "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": ["error"],
        "properties": { "error": { "type": "string", "description": "What went wrong, for people to read." } }
      },
      "MonitorKind": {
        "type": "string",
        "enum": ["http", "tcp", "udp", "dns", "ping", "browser", "heartbeat"]
      },
      "MonitorStatus": {
        "type": "string",
        "enum": ["pending", "up", "confirming_down", "down", "confirming_up", "paused", "maintenance"],
        "description": "`confirming_down` and `confirming_up` wait for the confirmation check 30 seconds after a change."
      },
      "MonitorInput": {
        "type": "object",
        "additionalProperties": false,
        "description": "Monitor settings. No setting has a default here: on PATCH, a setting left out keeps its value, and the values a new monitor starts with are named in each description. A monitor's kind is fixed when it is created. HTTP request and certificate settings apply to HTTP monitors only.",
        "properties": {
          "name": { "type": "string", "minLength": 1, "maxLength": 160, "description": "Up to 160 UTF-8 bytes." },
          "url": { "type": "string", "description": "An HTTP(S) address; host:port for TCP and UDP; a host name for DNS and ping (ping also takes an IP address); empty for heartbeat. Private, loopback, and reserved destinations are refused." },
          "kind": { "allOf": [{ "$ref": "#/components/schemas/MonitorKind" }], "description": "`http` when created without it. Fixed after creation. Every kind but `http` needs Premium." },
          "enabled": { "type": "boolean", "description": "`true` when created without it. `false` pauses checks and keeps open incidents." },
          "check_interval_seconds": { "type": "integer", "enum": [300, 3600], "description": "3600 when created without it. 300 needs Premium." },
          "verify_ssl": { "type": "boolean", "description": "TLS certificate verification; `true` when created without it." },
          "ssl_expiration_days": { "type": ["integer", "null"], "enum": [1, 2, 3, 7, 14, 30, 60, null], "description": "Days before an HTTPS certificate expires to alert; `null` turns the alert off." },
          "http_method": { "type": "string", "enum": ["GET", "HEAD", "POST", "PUT", "PATCH"], "description": "`GET` when created without it." },
          "request_headers": {
            "type": "array",
            "maxItems": 10,
            "description": "The whole list of request headers; `[]` clears them. Values are write-only.",
            "items": { "$ref": "#/components/schemas/RequestHeaderInput" }
          },
          "expected_status": { "type": "string", "maxLength": 100, "description": "Status codes or ranges such as `200-299,401`; empty accepts any 2xx." },
          "keyword": { "type": "string", "maxLength": 200, "description": "A case-sensitive keyword the response must contain; not with HEAD. Empty removes it." },
          "request_body": { "type": "string", "maxLength": 8192, "description": "POST, PUT, and PATCH only: up to 8192 bytes, sent as JSON when it parses as JSON. Switching to another method drops it." },
          "json_path": { "type": "string", "description": "A value the JSON response must contain, such as `data.status` or `checks[0].ok`; not with HEAD. Empty removes the check." },
          "json_expected": { "type": "string", "description": "The value `json_path` must hold: text as written, or JSON such as `true` or `42`. Empty only requires the value to exist." },
          "dns_record_type": { "type": "string", "enum": ["A", "AAAA", "CNAME", "MX", "NS", "TXT"], "description": "DNS monitors only; `A` when created without it." },
          "dns_expected": { "type": "string", "description": "DNS monitors only: an answer one record must equal (TXT: contain); empty accepts any answer." },
          "script": { "type": "string", "description": "Browser monitors only, and required for them: a Playwright test file of up to 64 KB, run against `url` as its base address. Workspace variables are `process.env.NAME`." },
          "browser_timeout_seconds": { "type": "integer", "minimum": 5, "maximum": 120, "description": "Browser monitors only: the seconds a scenario may take; 60 when created without it." },
          "heartbeat_period_seconds": { "type": "integer", "minimum": 60, "maximum": 2592000, "multipleOf": 60, "description": "Heartbeat monitors only: how often the job pings; 86400 when created without it." },
          "heartbeat_grace_seconds": { "type": "integer", "minimum": 60, "maximum": 604800, "multipleOf": 60, "description": "Heartbeat monitors only: how late a ping may be before the monitor goes down; 3600 when created without it." },
          "slow_threshold_ms": { "type": "integer", "anyOf": [{ "const": 0 }, { "minimum": 100, "maximum": 10000 }], "description": "100 to 10000 milliseconds; 0 turns slow-response alerts off." },
          "group_id": { "type": ["string", "null"], "format": "uuid", "description": "A group in this workspace; `null` removes the monitor from its group." },
          "muted_channel_ids": { "type": "array", "items": { "type": "string", "format": "uuid" }, "description": "Alert channels muted for this monitor; `[]` sends its alerts to every active channel." },
          "publish": { "type": "boolean", "description": "On creation only: add the monitor as a component of a status page." },
          "status_page_id": { "type": "string", "format": "uuid", "description": "With `publish`: the page to add it to; the workspace's first page by default." },
          "port_payload": { "type": "string", "description": "UDP monitors only: a hexadecimal payload of up to 512 bytes." },
          "domain_expiration_days": { "type": "integer", "enum": [0, 1, 2, 3, 7, 14, 30, 60], "description": "Days before the domain expires to alert, which also turns on registrar change alerts; 0 turns both off. Premium." },
          "pagespeed_enabled": { "type": "boolean", "description": "HTTP monitors only: a daily page speed measurement. Premium, and the server needs its PageSpeed key." }
        }
      },
      "MonitorCreate": {
        "allOf": [{ "$ref": "#/components/schemas/MonitorInput" }],
        "required": ["name", "url"]
      },
      "RequestHeaderInput": {
        "type": "object",
        "additionalProperties": false,
        "required": ["name"],
        "properties": {
          "name": { "type": "string", "pattern": "^[A-Za-z0-9!#$%&'*+.^_`|~-]{1,64}$" },
          "value": { "type": "string", "description": "Leave it out to keep the saved value of the header with this name." }
        }
      },
      "Monitor": {
        "type": "object",
        "description": "A monitor as the API shows it. Request header values are never returned, only their names.",
        "properties": {
          "id": { "type": "string", "format": "uuid" },
          "group_id": { "type": ["string", "null"], "format": "uuid" },
          "name": { "type": "string" },
          "url": { "type": "string" },
          "kind": { "$ref": "#/components/schemas/MonitorKind" },
          "check_interval_seconds": { "type": "integer", "enum": [300, 3600] },
          "port_payload": { "type": "string" },
          "status": { "$ref": "#/components/schemas/MonitorStatus" },
          "enabled": { "type": "boolean" },
          "verify_ssl": { "type": "boolean" },
          "ssl_expiration_days": { "type": ["integer", "null"] },
          "http_method": { "type": "string" },
          "expected_status": { "type": "string" },
          "keyword": { "type": "string" },
          "slow_threshold_ms": { "type": ["integer", "null"] },
          "request_body": { "type": "string" },
          "json_path": { "type": "string" },
          "json_expected": { "type": "string" },
          "dns_record_type": { "type": "string" },
          "dns_expected": { "type": "string" },
          "script": { "type": "string" },
          "browser_timeout_seconds": { "type": "integer" },
          "heartbeat_period_seconds": { "type": ["integer", "null"] },
          "heartbeat_grace_seconds": { "type": ["integer", "null"] },
          "heartbeat_last_ping_at": { "type": ["string", "null"], "format": "date-time" },
          "domain_expiration_days": { "type": ["integer", "null"] },
          "domain_name": { "type": "string" },
          "domain_registrar": { "type": "string" },
          "domain_expires_at": { "type": ["string", "null"], "format": "date-time" },
          "domain_checked_at": { "type": ["string", "null"], "format": "date-time" },
          "domain_error": { "type": "string" },
          "sla_target": { "type": ["number", "null"], "description": "The availability target in percent." },
          "pagespeed_enabled": { "type": "boolean" },
          "pagespeed_checked_at": { "type": ["string", "null"], "format": "date-time" },
          "pagespeed_error": { "type": "string" },
          "pagespeed": { "oneOf": [{ "$ref": "#/components/schemas/PageSpeed" }, { "type": "null" }], "description": "The latest measurement." },
          "request_headers": {
            "type": "array",
            "items": { "type": "object", "required": ["name"], "properties": { "name": { "type": "string" } } }
          },
          "last_checked_at": { "type": ["string", "null"], "format": "date-time" },
          "next_check_at": { "type": "string", "format": "date-time" },
          "created_at": { "type": "string", "format": "date-time" },
          "uptime": { "type": ["number", "null"], "description": "Uptime over the last seven days in percent; `null` without observations." },
          "last_check": { "oneOf": [{ "$ref": "#/components/schemas/Check" }, { "type": "null" }] },
          "days": { "type": "array", "items": { "$ref": "#/components/schemas/UptimeDay" }, "description": "The last seven UTC days since the first observation." },
          "muted_channel_ids": { "type": "array", "items": { "type": "string", "format": "uuid" } }
        }
      },
      "PageSpeed": {
        "type": "object",
        "properties": {
          "measured_at": { "type": "string", "format": "date-time" },
          "score": { "type": ["integer", "null"] },
          "lcp_ms": { "type": ["integer", "null"] },
          "cls": { "type": ["number", "null"] },
          "tbt_ms": { "type": ["integer", "null"] },
          "fcp_ms": { "type": ["integer", "null"] },
          "field_lcp_ms": { "type": ["integer", "null"] },
          "field_inp_ms": { "type": ["integer", "null"] },
          "field_cls": { "type": ["number", "null"] }
        }
      },
      "Check": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "format": "uuid" },
          "monitor_id": { "type": "string", "format": "uuid" },
          "checked_at": { "type": "string", "format": "date-time" },
          "success": { "type": "boolean" },
          "latency_ms": { "type": "integer" },
          "http_status": { "type": ["integer", "null"] },
          "error": { "type": ["string", "null"] },
          "certificate_expires_at": { "type": ["string", "null"], "format": "date-time" },
          "certificate_valid": { "type": ["boolean", "null"] },
          "kind": { "type": "string", "enum": ["scheduled", "confirmation", "ping"] }
        }
      },
      "UptimeDay": {
        "type": "object",
        "properties": {
          "date": { "type": "string", "format": "date-time", "description": "The start of the UTC day." },
          "uptime": { "type": ["number", "null"], "description": "Percent; `null` without observations." }
        }
      },
      "Uptime": {
        "type": "object",
        "properties": {
          "uptime": { "type": ["number", "null"], "description": "Percent over the whole period; `null` without observations." },
          "days": { "type": "array", "items": { "$ref": "#/components/schemas/UptimeDay" } }
        }
      },
      "Incident": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "format": "uuid" },
          "monitor_id": { "type": "string", "format": "uuid" },
          "monitor_name": { "type": "string" },
          "started_at": { "type": "string", "format": "date-time" },
          "resolved_at": { "type": ["string", "null"], "format": "date-time" },
          "cause": { "type": "string" },
          "public_note": { "type": "string" },
          "acknowledged_at": { "type": ["string", "null"], "format": "date-time" },
          "acknowledged_by": { "type": "string" },
          "escalated_minutes": { "type": "integer" }
        }
      },
      "Report": {
        "type": "object",
        "properties": {
          "days": { "type": ["integer", "null"], "description": "`null` for a calendar month." },
          "month": { "type": ["string", "null"] },
          "from": { "type": "string", "format": "date-time" },
          "to": { "type": "string", "format": "date-time" },
          "incidents": { "type": "integer" },
          "acknowledged": { "type": "integer" },
          "resolved": { "type": "integer" },
          "mtta_seconds": { "type": ["number", "null"] },
          "mttr_seconds": { "type": ["number", "null"] },
          "monitors": { "type": "array", "items": { "$ref": "#/components/schemas/ReportMonitor" } }
        }
      },
      "ReportMonitor": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "format": "uuid" },
          "name": { "type": "string" },
          "sla_target": { "type": ["number", "null"] },
          "uptime": { "type": ["number", "null"], "description": "Percent of observed time." },
          "observed_seconds": { "type": ["number", "null"] },
          "downtime_seconds": { "type": ["number", "null"] },
          "budget_seconds": { "type": ["number", "null"], "description": "The downtime the SLA target allows over the observed time." },
          "burn_rate": { "type": ["number", "null"], "description": "The last 24 hours' downtime relative to the target's allowance; `null` for a month that has ended." },
          "incidents": { "type": "integer" },
          "acknowledged": { "type": "integer" },
          "mtta_seconds": { "type": ["number", "null"] },
          "mttr_seconds": { "type": ["number", "null"] }
        }
      },
      "StatusPage": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "format": "uuid" },
          "workspace_id": { "type": "string", "format": "uuid" },
          "slug": { "type": "string" },
          "title": { "type": "string" },
          "created_at": { "type": "string", "format": "date-time" },
          "announcement": { "type": "string" },
          "announcement_expires_at": { "type": ["string", "null"], "format": "date-time" },
          "visibility": { "type": "string", "enum": ["public", "private"] },
          "logo_url": { "type": "string" },
          "brand_color": { "type": "string" },
          "hide_powered_by": { "type": "boolean" },
          "domain": {
            "description": "The page's own domain, or null. It is served only while verified_at is set; txt_name and txt_value are the TXT record that proves ownership, next to a CNAME record to Cheapmonit.",
            "oneOf": [{ "type": "null" }, { "$ref": "#/components/schemas/StatusPageDomain" }]
          },
          "sections": { "type": "array", "items": { "$ref": "#/components/schemas/StatusPageSection" } },
          "components": { "type": "array", "items": { "$ref": "#/components/schemas/StatusPageComponent" } },
          "incidents": { "type": "array", "maxItems": 50, "items": { "$ref": "#/components/schemas/StatusIncident" } }
        }
      },
      "StatusPageDomain": {
        "type": "object",
        "properties": {
          "domain": { "type": "string" },
          "txt_name": { "type": "string" },
          "txt_value": { "type": "string" },
          "verified_at": { "type": ["string", "null"], "format": "date-time" },
          "checked_at": { "type": ["string", "null"], "format": "date-time" },
          "next_check_at": { "type": ["string", "null"], "format": "date-time" },
          "error": { "type": "string" }
        }
      },
      "StatusPageSection": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "format": "uuid" },
          "status_page_id": { "type": "string", "format": "uuid" },
          "name": { "type": "string" },
          "position": { "type": "integer" }
        }
      },
      "StatusPageComponent": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "format": "uuid" },
          "status_page_id": { "type": "string", "format": "uuid" },
          "section_id": { "type": ["string", "null"], "format": "uuid" },
          "monitor_id": { "type": "string", "format": "uuid" },
          "name": { "type": "string" },
          "position": { "type": "integer" }
        }
      },
      "StatusIncident": {
        "type": "object",
        "description": "An incident reported on the status page. Open incidents come first, then the newest.",
        "properties": {
          "id": { "type": "string", "format": "uuid" },
          "title": { "type": "string" },
          "impact": { "type": "string", "enum": ["none", "minor", "major", "critical"] },
          "state": { "$ref": "#/components/schemas/StatusIncidentState" },
          "created_at": { "type": "string", "format": "date-time" },
          "resolved_at": { "type": ["string", "null"], "format": "date-time" },
          "component_ids": { "type": "array", "items": { "type": "string", "format": "uuid" } },
          "updates": {
            "type": "array",
            "description": "Newest first.",
            "items": {
              "type": "object",
              "properties": {
                "id": { "type": "string", "format": "uuid" },
                "state": { "$ref": "#/components/schemas/StatusIncidentState" },
                "message": { "type": "string" },
                "created_at": { "type": "string", "format": "date-time" }
              }
            }
          }
        }
      },
      "StatusIncidentState": {
        "type": "string",
        "enum": ["investigating", "identified", "monitoring", "resolved"]
      },
      "JSONRPCMessage": {
        "type": "object",
        "required": ["jsonrpc"],
        "description": "A JSON-RPC 2.0 request, notification, or response as MCP defines it.",
        "properties": {
          "jsonrpc": { "type": "string", "const": "2.0" },
          "id": { "type": ["string", "integer", "null"], "description": "`null` only in an answer to a message that could not be read." },
          "method": { "type": "string" },
          "params": { "type": "object" },
          "result": { "type": "object" },
          "error": {
            "type": "object",
            "properties": {
              "code": { "type": "integer" },
              "message": { "type": "string" },
              "data": {}
            }
          }
        }
      }
    }
  }
}
