{
  "openapi": "3.1.0",
  "info": {
    "title": "Glowo API",
    "version": "0.1.0",
    "summary": "Uptime monitoring, alerting and public status pages.",
    "description": "Glowo watches HTTP, TCP, ping, DNS, WebSocket and heartbeat targets from multiple\nregions, routes failures to notification channels, and publishes branded status\npages with incidents and postmortems.\n\n## Authenticating\n\nMost operations accept either a browser session cookie or a personal access token\n(`Authorization: Bearer gl_…`). Tokens are created self-serve in the dashboard, are\nscoped to one workspace, carry an explicit capability set, and declare the surfaces\nthey may be used on (`rest`, `mcp`, or both). Each operation lists the capabilities\nit needs under `x-glowo-required-capabilities`; the vocabulary is the same one MCP\nOAuth grants use as scopes.\n\nFour capabilities — `workspace:manage`, `billing:manage`, `members:manage` and\n`audit:read` — are session-only and can never be attached to a token. Operations\nrequiring them declare `sessionCookie` as their only security scheme.\n\n## Agents\n\nAgents can drive Glowo over this REST API with a token, or over the Model Context\nProtocol at `POST /mcp` using an OAuth 2.1 grant. See https://docs.glowo.dev/ai-agents.\n\n## What is not in this document\n\nDeliberately excluded, because no agent can usefully call them: server-sent-event\nstreams, the Stripe billing webhook (raw-body signature verification), signed\none-click email action links, and the endpoints Better Auth mounts under `/auth`\n(sign-in, SSO, OAuth token exchange) — those are described by the OAuth discovery\nmetadata instead.",
    "termsOfService": "https://glowo.dev/terms",
    "contact": {
      "name": "Glowo support",
      "email": "support@glowo.dev",
      "url": "https://glowo.dev/contact"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://glowo.dev/terms"
    }
  },
  "servers": [
    {
      "url": "https://api.glowo.dev",
      "description": "Production"
    }
  ],
  "externalDocs": {
    "description": "Glowo documentation",
    "url": "https://docs.glowo.dev"
  },
  "tags": [
    {
      "name": "Monitors",
      "description": "Create and drive checks; read heartbeats, uptime and reports."
    },
    {
      "name": "Maintenance",
      "description": "Scheduled windows that suppress alerts for a monitor."
    },
    {
      "name": "Push",
      "description": "Heartbeat ingestion for cron jobs, backups and batch pipelines."
    },
    {
      "name": "Projects",
      "description": "Group monitors and status pages, and order them."
    },
    {
      "name": "Notifications",
      "description": "Notification channels and their delivery history."
    },
    {
      "name": "Escalation policies",
      "description": "Ordered escalation steps for unacknowledged alerts."
    },
    {
      "name": "Status pages",
      "description": "Public status pages, branding, publication and domains."
    },
    {
      "name": "Incidents",
      "description": "Open, update, resolve and publish incidents."
    },
    {
      "name": "Postmortems",
      "description": "Write-ups linked to resolved incidents."
    },
    {
      "name": "Public status",
      "description": "Unauthenticated read API behind a status page slug."
    },
    {
      "name": "Embed",
      "description": "Publishable-key widget API for embedding status in your own site."
    },
    {
      "name": "Subscribers",
      "description": "Public subscribe, verify and unsubscribe flows."
    },
    {
      "name": "API keys",
      "description": "Mint, rotate and revoke personal access tokens."
    },
    {
      "name": "Workspace",
      "description": "Workspace settings, members and invitations."
    },
    {
      "name": "Billing",
      "description": "Subscription, usage and Stripe portal links."
    },
    {
      "name": "Audit log",
      "description": "Workspace activity history."
    },
    {
      "name": "MCP",
      "description": "Model Context Protocol transport and OAuth discovery."
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Personal access token (`gl_…`) sent as `Authorization: Bearer <token>`. Keys are workspace-scoped, carry an explicit capability set, and declare which surfaces they may be presented on — a key minted for the MCP surface is refused on REST with 403, and vice versa. Create one at https://glowo.dev/app/settings (self-serve, no sales contact)."
      },
      "sessionCookie": {
        "type": "apiKey",
        "in": "cookie",
        "name": "glowo.session_token",
        "description": "Browser session cookie issued by the dashboard sign-in flow. Required for the operations whose capability is session-only (billing, members, workspace settings, audit log) — no API key can carry those."
      },
      "oauth2": {
        "type": "oauth2",
        "description": "OAuth 2.1 authorization-code flow with PKCE, used by MCP clients. Discovery metadata: RFC 8414 at https://api.glowo.dev/.well-known/oauth-authorization-server/auth, RFC 9728 at https://api.glowo.dev/.well-known/oauth-protected-resource. Dynamic client registration (RFC 7591) is supported.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://api.glowo.dev/auth/oauth2/authorize",
            "tokenUrl": "https://api.glowo.dev/auth/oauth2/token",
            "refreshUrl": "https://api.glowo.dev/auth/oauth2/token",
            "scopes": {
              "monitors:read": "Read monitors and heartbeats",
              "monitors:write": "Create, update, pause and resume monitors; run on-demand checks",
              "monitors:delete": "Delete monitors",
              "status_pages:read": "Read status pages",
              "status_pages:write": "Create, update and publish status pages",
              "status_pages:delete": "Delete status pages",
              "incidents:read": "Read incidents",
              "incidents:write": "File, update, resolve and reopen incidents",
              "incidents:delete": "Delete incidents",
              "postmortems:read": "Read postmortems",
              "postmortems:write": "Write and publish postmortems",
              "postmortems:delete": "Delete postmortems",
              "notifications:read": "Read notification channels and delivery history",
              "notifications:write": "Manage notification channels and send tests",
              "notifications:delete": "Delete notification channels",
              "maintenance:write": "Schedule maintenance windows",
              "identity:read": "View workspace and plan"
            }
          }
        }
      },
      "publishableKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Status-page publishable key, for the embeddable widget API. Read-only, scoped to a single status page, and safe to ship in a browser bundle. May also be passed as `?token=`."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "statusCode",
          "code",
          "message"
        ],
        "properties": {
          "statusCode": {
            "type": "integer",
            "description": "HTTP status, repeated in the body."
          },
          "code": {
            "type": "string",
            "description": "Stable machine-readable error code. Branch on this, not on `message`.",
            "examples": [
              "MONITOR_NOT_FOUND",
              "PLAN_LIMIT_EXCEEDED",
              "VALIDATION_ERROR"
            ]
          },
          "message": {
            "type": "string",
            "description": "Human-readable explanation."
          },
          "field": {
            "type": "string",
            "description": "Request field that failed validation, when applicable."
          },
          "flattened": {
            "type": "object",
            "description": "Per-field validation detail, present on validation failures.",
            "properties": {
              "formErrors": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "fieldErrors": {
                "type": "object",
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "ApiKey": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "tokenHint": {
            "type": "string"
          },
          "surfaces": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "rest",
                "mcp"
              ]
            }
          },
          "permissions": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "monitors:read",
                "monitors:write",
                "monitors:delete",
                "status_pages:read",
                "status_pages:write",
                "status_pages:delete",
                "incidents:read",
                "incidents:write",
                "incidents:delete",
                "postmortems:read",
                "postmortems:write",
                "postmortems:delete",
                "notifications:read",
                "notifications:write",
                "notifications:delete",
                "maintenance:write",
                "identity:read"
              ]
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "REVOKED"
            ]
          },
          "expiresAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "lastUsedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "name",
          "tokenHint",
          "surfaces",
          "permissions",
          "status",
          "expiresAt",
          "lastUsedAt",
          "createdBy",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "ApiKeyList": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ApiKey"
        }
      },
      "AuditLogPage": {
        "type": "object",
        "properties": {
          "entries": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "workspaceId": {
                  "type": "string"
                },
                "userId": {
                  "type": "string"
                },
                "action": {
                  "type": "string"
                },
                "resourceType": {
                  "type": "string"
                },
                "resourceId": {
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "ipAddress": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "actorEmail": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "userAgent": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                }
              },
              "required": [
                "id",
                "workspaceId",
                "userId",
                "action",
                "resourceType",
                "resourceId",
                "metadata",
                "ipAddress",
                "actorEmail",
                "userAgent",
                "createdAt"
              ],
              "additionalProperties": false
            }
          },
          "total": {
            "type": "number"
          }
        },
        "required": [
          "entries",
          "total"
        ],
        "additionalProperties": false
      },
      "CheckResult": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string"
          }
        },
        "required": [
          "correlationId"
        ],
        "additionalProperties": false
      },
      "CurrentWorkspace": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "ownerId": {
            "type": "string"
          },
          "memberCount": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "ownerId",
          "memberCount"
        ],
        "additionalProperties": false
      },
      "EscalationPolicy": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "steps": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "stepOrder": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "delayMinutes": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "notificationChannelIds": {
                  "readOnly": true,
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "id",
                "stepOrder",
                "delayMinutes",
                "notificationChannelIds"
              ],
              "additionalProperties": false
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "name",
          "steps",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "EscalationPolicyList": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/EscalationPolicy"
        }
      },
      "Heartbeat": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "monitorId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "UP",
              "DOWN",
              "DEGRADED",
              "CHANGED",
              "MAINTENANCE",
              "PENDING"
            ]
          },
          "latency": {
            "type": "number"
          },
          "statusCode": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "retryCount": {
            "type": "number"
          },
          "timings": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "dns": {
                    "type": "number"
                  },
                  "tcp": {
                    "type": "number"
                  },
                  "tls": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "firstByte": {
                    "type": "number"
                  },
                  "transfer": {
                    "type": "number"
                  }
                },
                "required": [
                  "dns",
                  "tcp",
                  "tls",
                  "firstByte",
                  "transfer"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "region": {
            "type": "string"
          },
          "responseHeaders": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "responseBody": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "resolvedIP": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "assertionResults": {
            "anyOf": [
              {
                "readOnly": true,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "index": {
                      "type": "number"
                    },
                    "passed": {
                      "type": "boolean"
                    },
                    "actual": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "severity": {
                      "type": "string",
                      "enum": [
                        "warn",
                        "fail"
                      ]
                    }
                  },
                  "required": [
                    "index",
                    "passed",
                    "actual",
                    "message",
                    "severity"
                  ],
                  "additionalProperties": false
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "monitorId",
          "status",
          "latency",
          "statusCode",
          "message",
          "retryCount",
          "timings",
          "region",
          "responseHeaders",
          "responseBody",
          "resolvedIP",
          "assertionResults",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "HeartbeatList": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Heartbeat"
        }
      },
      "HourlyStat": {
        "type": "object",
        "properties": {
          "bucket": {
            "type": "string"
          },
          "totalChecks": {
            "type": "number"
          },
          "upChecks": {
            "type": "number"
          },
          "downChecks": {
            "type": "number"
          },
          "degradedChecks": {
            "type": "number"
          },
          "avgLatency": {
            "type": "number"
          },
          "maxLatency": {
            "type": "number"
          },
          "minLatency": {
            "type": "number"
          },
          "p95Latency": {
            "type": "number"
          }
        },
        "required": [
          "bucket",
          "totalChecks",
          "upChecks",
          "downChecks",
          "degradedChecks",
          "avgLatency",
          "maxLatency",
          "minLatency",
          "p95Latency"
        ],
        "additionalProperties": false
      },
      "HourlyStatList": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/HourlyStat"
        }
      },
      "Incident": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "statusPageId": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "INVESTIGATING",
              "IDENTIFIED",
              "MONITORING",
              "RESOLVED"
            ]
          },
          "severity": {
            "type": "string",
            "enum": [
              "NONE",
              "MINOR",
              "MAJOR",
              "CRITICAL"
            ]
          },
          "visibility": {
            "type": "string",
            "enum": [
              "DRAFT",
              "PUBLISHED",
              "SCHEDULED"
            ]
          },
          "affectedComponentIds": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sourceMonitorId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "autoGenerated": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "resolvedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "publishedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "scheduledFor": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "statusPageId",
          "workspaceId",
          "title",
          "status",
          "severity",
          "visibility",
          "affectedComponentIds",
          "sourceMonitorId",
          "autoGenerated",
          "createdAt",
          "updatedAt",
          "resolvedAt",
          "publishedAt",
          "scheduledFor",
          "archivedAt"
        ],
        "additionalProperties": false
      },
      "IncidentList": {
        "type": "object",
        "properties": {
          "incidents": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "statusPageId": {
                  "type": "string"
                },
                "workspaceId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "INVESTIGATING",
                    "IDENTIFIED",
                    "MONITORING",
                    "RESOLVED"
                  ]
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "NONE",
                    "MINOR",
                    "MAJOR",
                    "CRITICAL"
                  ]
                },
                "visibility": {
                  "type": "string",
                  "enum": [
                    "DRAFT",
                    "PUBLISHED",
                    "SCHEDULED"
                  ]
                },
                "affectedComponentIds": {
                  "readOnly": true,
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "sourceMonitorId": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "autoGenerated": {
                  "type": "boolean"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                },
                "resolvedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "publishedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "scheduledFor": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "archivedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "statusPageId",
                "workspaceId",
                "title",
                "status",
                "severity",
                "visibility",
                "affectedComponentIds",
                "sourceMonitorId",
                "autoGenerated",
                "createdAt",
                "updatedAt",
                "resolvedAt",
                "publishedAt",
                "scheduledFor",
                "archivedAt"
              ],
              "additionalProperties": false
            }
          },
          "total": {
            "type": "number"
          }
        },
        "required": [
          "incidents",
          "total"
        ],
        "additionalProperties": false
      },
      "IncidentUpdate": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "incidentId": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "INVESTIGATING",
              "IDENTIFIED",
              "MONITORING",
              "RESOLVED"
            ]
          },
          "systemGenerated": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "incidentId",
          "message",
          "status",
          "systemGenerated",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "IncidentWithUpdates": {
        "type": "object",
        "properties": {
          "incident": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "statusPageId": {
                "type": "string"
              },
              "workspaceId": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "INVESTIGATING",
                  "IDENTIFIED",
                  "MONITORING",
                  "RESOLVED"
                ]
              },
              "severity": {
                "type": "string",
                "enum": [
                  "NONE",
                  "MINOR",
                  "MAJOR",
                  "CRITICAL"
                ]
              },
              "visibility": {
                "type": "string",
                "enum": [
                  "DRAFT",
                  "PUBLISHED",
                  "SCHEDULED"
                ]
              },
              "affectedComponentIds": {
                "readOnly": true,
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "sourceMonitorId": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "autoGenerated": {
                "type": "boolean"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              "resolvedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "publishedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "scheduledFor": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "archivedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "statusPageId",
              "workspaceId",
              "title",
              "status",
              "severity",
              "visibility",
              "affectedComponentIds",
              "sourceMonitorId",
              "autoGenerated",
              "createdAt",
              "updatedAt",
              "resolvedAt",
              "publishedAt",
              "scheduledFor",
              "archivedAt"
            ],
            "additionalProperties": false
          },
          "updates": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "incidentId": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "INVESTIGATING",
                    "IDENTIFIED",
                    "MONITORING",
                    "RESOLVED"
                  ]
                },
                "systemGenerated": {
                  "type": "boolean"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                },
                "updatedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "incidentId",
                "message",
                "status",
                "systemGenerated",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "incident",
          "updates"
        ],
        "additionalProperties": false
      },
      "IssuedApiKey": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "tokenHint": {
            "type": "string"
          },
          "surfaces": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "rest",
                "mcp"
              ]
            }
          },
          "permissions": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "monitors:read",
                "monitors:write",
                "monitors:delete",
                "status_pages:read",
                "status_pages:write",
                "status_pages:delete",
                "incidents:read",
                "incidents:write",
                "incidents:delete",
                "postmortems:read",
                "postmortems:write",
                "postmortems:delete",
                "notifications:read",
                "notifications:write",
                "notifications:delete",
                "maintenance:write",
                "identity:read"
              ]
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "REVOKED"
            ]
          },
          "expiresAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "lastUsedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "token": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "tokenHint",
          "surfaces",
          "permissions",
          "status",
          "expiresAt",
          "lastUsedAt",
          "createdBy",
          "createdAt",
          "updatedAt",
          "token"
        ],
        "additionalProperties": false
      },
      "MaintenanceWindow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          },
          "monitorId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "startsAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "endsAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "timezone": {
            "type": "string"
          },
          "recurring": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "frequency": {
                    "type": "string",
                    "enum": [
                      "daily",
                      "weekly",
                      "monthly",
                      "cron"
                    ]
                  },
                  "dayOfWeek": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 6
                  },
                  "dayOfMonth": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 31
                  },
                  "expression": {
                    "type": "string",
                    "maxLength": 100
                  }
                },
                "required": [
                  "frequency"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "excludeFromUptime": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "monitorId",
          "title",
          "description",
          "startsAt",
          "endsAt",
          "timezone",
          "recurring",
          "excludeFromUptime",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "MaintenanceWindowList": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/MaintenanceWindow"
        }
      },
      "McpGrantList": {
        "readOnly": true,
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "clientId": {
              "type": "string"
            },
            "scopes": {
              "readOnly": true,
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "updatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "lastUsedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "id",
            "clientId",
            "scopes",
            "createdAt",
            "updatedAt",
            "lastUsedAt"
          ],
          "additionalProperties": false
        }
      },
      "Message": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "additionalProperties": false
      },
      "Monitor": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          },
          "projectIds": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "HTTP",
              "TCP",
              "PING",
              "DNS",
              "DNS_DIFF",
              "WEBSOCKET",
              "PUSH"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "UP",
              "DOWN",
              "DEGRADED",
              "CHANGED",
              "MAINTENANCE",
              "PENDING"
            ]
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "host": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "port": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "interval": {
            "type": "number"
          },
          "retries": {
            "type": "number"
          },
          "timeout": {
            "type": "number"
          },
          "tags": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "config": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "regions": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "regionStrategy": {
            "type": "string",
            "enum": [
              "all",
              "round_robin",
              "random"
            ]
          },
          "confirmationsRequired": {
            "type": "number"
          },
          "recoveryConfirmationsRequired": {
            "type": "number"
          },
          "minFailureDurationMs": {
            "type": "number"
          },
          "consecutiveFailures": {
            "type": "number"
          },
          "consecutiveSuccesses": {
            "type": "number"
          },
          "pendingFailureSince": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "active": {
            "type": "boolean"
          },
          "pushToken": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "lastPushAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "certificateExpiry": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "certificateIssuer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "uptimePercentage": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "isSystemManaged": {
            "type": "boolean"
          },
          "avgResponseTime": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "notificationChannelIds": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "lastCheckedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "lastStatusChange": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "flapState": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "classification": {
                    "type": "string",
                    "enum": [
                      "stable",
                      "noisy",
                      "flapping",
                      "severe"
                    ]
                  },
                  "needsAttention": {
                    "type": "boolean"
                  },
                  "suppressedLast24h": {
                    "type": "number"
                  },
                  "transitionsLast24h": {
                    "type": "number"
                  },
                  "watchdogTripsLast24h": {
                    "type": "number"
                  },
                  "lastObservedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "classification",
                  "needsAttention",
                  "suppressedLast24h",
                  "transitionsLast24h",
                  "watchdogTripsLast24h",
                  "lastObservedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "workspaceId",
          "projectIds",
          "name",
          "type",
          "status",
          "url",
          "host",
          "port",
          "interval",
          "retries",
          "timeout",
          "tags",
          "description",
          "config",
          "regions",
          "regionStrategy",
          "confirmationsRequired",
          "recoveryConfirmationsRequired",
          "minFailureDurationMs",
          "consecutiveFailures",
          "consecutiveSuccesses",
          "pendingFailureSince",
          "active",
          "pushToken",
          "lastPushAt",
          "certificateExpiry",
          "certificateIssuer",
          "uptimePercentage",
          "isSystemManaged",
          "avgResponseTime",
          "notificationChannelIds",
          "lastCheckedAt",
          "lastStatusChange",
          "createdAt",
          "updatedAt",
          "flapState"
        ],
        "additionalProperties": false
      },
      "MonitorList": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Monitor"
        }
      },
      "MonitorDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          },
          "projectIds": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "HTTP",
              "TCP",
              "PING",
              "DNS",
              "DNS_DIFF",
              "WEBSOCKET",
              "PUSH"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "UP",
              "DOWN",
              "DEGRADED",
              "CHANGED",
              "MAINTENANCE",
              "PENDING"
            ]
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "host": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "port": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "interval": {
            "type": "number"
          },
          "retries": {
            "type": "number"
          },
          "timeout": {
            "type": "number"
          },
          "tags": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "config": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "regions": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "regionStrategy": {
            "type": "string",
            "enum": [
              "all",
              "round_robin",
              "random"
            ]
          },
          "confirmationsRequired": {
            "type": "number"
          },
          "recoveryConfirmationsRequired": {
            "type": "number"
          },
          "minFailureDurationMs": {
            "type": "number"
          },
          "consecutiveFailures": {
            "type": "number"
          },
          "consecutiveSuccesses": {
            "type": "number"
          },
          "pendingFailureSince": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "active": {
            "type": "boolean"
          },
          "pushToken": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "lastPushAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "certificateExpiry": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "certificateIssuer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "uptimePercentage": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "isSystemManaged": {
            "type": "boolean"
          },
          "avgResponseTime": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "notificationChannelIds": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "lastCheckedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "lastStatusChange": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "flapState": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "classification": {
                    "type": "string",
                    "enum": [
                      "stable",
                      "noisy",
                      "flapping",
                      "severe"
                    ]
                  },
                  "needsAttention": {
                    "type": "boolean"
                  },
                  "suppressedLast24h": {
                    "type": "number"
                  },
                  "transitionsLast24h": {
                    "type": "number"
                  },
                  "watchdogTripsLast24h": {
                    "type": "number"
                  },
                  "lastObservedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "classification",
                  "needsAttention",
                  "suppressedLast24h",
                  "transitionsLast24h",
                  "watchdogTripsLast24h",
                  "lastObservedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "recentHeartbeats": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "monitorId": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "UP",
                    "DOWN",
                    "DEGRADED",
                    "CHANGED",
                    "MAINTENANCE",
                    "PENDING"
                  ]
                },
                "latency": {
                  "type": "number"
                },
                "statusCode": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "message": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "retryCount": {
                  "type": "number"
                },
                "timings": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "dns": {
                          "type": "number"
                        },
                        "tcp": {
                          "type": "number"
                        },
                        "tls": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "firstByte": {
                          "type": "number"
                        },
                        "transfer": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "dns",
                        "tcp",
                        "tls",
                        "firstByte",
                        "transfer"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "region": {
                  "type": "string"
                },
                "responseHeaders": {
                  "anyOf": [
                    {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "responseBody": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "resolvedIP": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "assertionResults": {
                  "anyOf": [
                    {
                      "readOnly": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "index": {
                            "type": "number"
                          },
                          "passed": {
                            "type": "boolean"
                          },
                          "actual": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "message": {
                            "type": "string"
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "warn",
                              "fail"
                            ]
                          }
                        },
                        "required": [
                          "index",
                          "passed",
                          "actual",
                          "message",
                          "severity"
                        ],
                        "additionalProperties": false
                      }
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                }
              },
              "required": [
                "id",
                "monitorId",
                "status",
                "latency",
                "statusCode",
                "message",
                "retryCount",
                "timings",
                "region",
                "responseHeaders",
                "responseBody",
                "resolvedIP",
                "assertionResults",
                "createdAt"
              ],
              "additionalProperties": false
            }
          },
          "dailyStats": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "date": {
                  "type": "string"
                },
                "totalChecks": {
                  "type": "number"
                },
                "upChecks": {
                  "type": "number"
                },
                "downChecks": {
                  "type": "number"
                },
                "degradedChecks": {
                  "type": "number"
                },
                "avgLatency": {
                  "type": "number"
                },
                "maxLatency": {
                  "type": "number"
                },
                "minLatency": {
                  "type": "number"
                }
              },
              "required": [
                "date",
                "totalChecks",
                "upChecks",
                "downChecks",
                "degradedChecks",
                "avgLatency",
                "maxLatency",
                "minLatency"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "workspaceId",
          "projectIds",
          "name",
          "type",
          "status",
          "url",
          "host",
          "port",
          "interval",
          "retries",
          "timeout",
          "tags",
          "description",
          "config",
          "regions",
          "regionStrategy",
          "confirmationsRequired",
          "recoveryConfirmationsRequired",
          "minFailureDurationMs",
          "consecutiveFailures",
          "consecutiveSuccesses",
          "pendingFailureSince",
          "active",
          "pushToken",
          "lastPushAt",
          "certificateExpiry",
          "certificateIssuer",
          "uptimePercentage",
          "isSystemManaged",
          "avgResponseTime",
          "notificationChannelIds",
          "lastCheckedAt",
          "lastStatusChange",
          "createdAt",
          "updatedAt",
          "flapState",
          "recentHeartbeats",
          "dailyStats"
        ],
        "additionalProperties": false
      },
      "MonitorPage": {
        "type": "object",
        "properties": {
          "items": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "workspaceId": {
                  "type": "string"
                },
                "projectIds": {
                  "readOnly": true,
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "name": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "HTTP",
                    "TCP",
                    "PING",
                    "DNS",
                    "DNS_DIFF",
                    "WEBSOCKET",
                    "PUSH"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "UP",
                    "DOWN",
                    "DEGRADED",
                    "CHANGED",
                    "MAINTENANCE",
                    "PENDING"
                  ]
                },
                "url": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "host": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "port": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "interval": {
                  "type": "number"
                },
                "retries": {
                  "type": "number"
                },
                "timeout": {
                  "type": "number"
                },
                "tags": {
                  "readOnly": true,
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "description": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "config": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "regions": {
                  "readOnly": true,
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "regionStrategy": {
                  "type": "string",
                  "enum": [
                    "all",
                    "round_robin",
                    "random"
                  ]
                },
                "confirmationsRequired": {
                  "type": "number"
                },
                "recoveryConfirmationsRequired": {
                  "type": "number"
                },
                "minFailureDurationMs": {
                  "type": "number"
                },
                "consecutiveFailures": {
                  "type": "number"
                },
                "consecutiveSuccesses": {
                  "type": "number"
                },
                "pendingFailureSince": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "active": {
                  "type": "boolean"
                },
                "pushToken": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "lastPushAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "certificateExpiry": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "certificateIssuer": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "uptimePercentage": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "isSystemManaged": {
                  "type": "boolean"
                },
                "avgResponseTime": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "notificationChannelIds": {
                  "readOnly": true,
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "lastCheckedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "lastStatusChange": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                },
                "flapState": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "classification": {
                          "type": "string",
                          "enum": [
                            "stable",
                            "noisy",
                            "flapping",
                            "severe"
                          ]
                        },
                        "needsAttention": {
                          "type": "boolean"
                        },
                        "suppressedLast24h": {
                          "type": "number"
                        },
                        "transitionsLast24h": {
                          "type": "number"
                        },
                        "watchdogTripsLast24h": {
                          "type": "number"
                        },
                        "lastObservedAt": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "classification",
                        "needsAttention",
                        "suppressedLast24h",
                        "transitionsLast24h",
                        "watchdogTripsLast24h",
                        "lastObservedAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "workspaceId",
                "projectIds",
                "name",
                "type",
                "status",
                "url",
                "host",
                "port",
                "interval",
                "retries",
                "timeout",
                "tags",
                "description",
                "config",
                "regions",
                "regionStrategy",
                "confirmationsRequired",
                "recoveryConfirmationsRequired",
                "minFailureDurationMs",
                "consecutiveFailures",
                "consecutiveSuccesses",
                "pendingFailureSince",
                "active",
                "pushToken",
                "lastPushAt",
                "certificateExpiry",
                "certificateIssuer",
                "uptimePercentage",
                "isSystemManaged",
                "avgResponseTime",
                "notificationChannelIds",
                "lastCheckedAt",
                "lastStatusChange",
                "createdAt",
                "updatedAt",
                "flapState"
              ],
              "additionalProperties": false
            }
          },
          "nextCursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "NotificationChannel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "config": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "events": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "MONITOR_DOWN",
                "MONITOR_UP",
                "MONITOR_DEGRADED",
                "MONITOR_CHANGED",
                "CERTIFICATE_EXPIRING",
                "INCIDENT_CREATED"
              ]
            }
          },
          "enabled": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "monitorIds": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "workspaceId",
          "name",
          "type",
          "config",
          "events",
          "enabled",
          "createdAt",
          "updatedAt",
          "monitorIds"
        ],
        "additionalProperties": false
      },
      "NotificationChannelList": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/NotificationChannel"
        }
      },
      "NotificationDelivery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "dispatchId": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          },
          "channelId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "monitorId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "incidentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "subscriberId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "channelType": {
            "type": "string"
          },
          "eventType": {
            "type": "string"
          },
          "eventId": {
            "type": "string"
          },
          "target": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "in_flight",
              "success",
              "failed_transient",
              "dead_lettered",
              "cancelled"
            ]
          },
          "attempt": {
            "type": "number"
          },
          "nextAttemptAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "claimedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "succeededAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "deadLetteredAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "lastError": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "lastStatusCode": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "payload": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "dispatchId",
          "workspaceId",
          "channelId",
          "monitorId",
          "incidentId",
          "subscriberId",
          "channelType",
          "eventType",
          "eventId",
          "target",
          "status",
          "attempt",
          "nextAttemptAt",
          "claimedAt",
          "succeededAt",
          "deadLetteredAt",
          "lastError",
          "lastStatusCode",
          "payload",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "NotificationDeliveryList": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/NotificationDelivery"
        }
      },
      "Postmortem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "statusPageId": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          },
          "incidentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "INLINE",
              "EXTERNAL"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "PUBLISHED",
              "ARCHIVED"
            ]
          },
          "title": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "externalUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "publishedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "statusPageId",
          "workspaceId",
          "incidentId",
          "kind",
          "status",
          "title",
          "slug",
          "body",
          "externalUrl",
          "publishedAt",
          "archivedAt",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "PostmortemList": {
        "type": "object",
        "properties": {
          "postmortems": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "statusPageId": {
                  "type": "string"
                },
                "workspaceId": {
                  "type": "string"
                },
                "incidentId": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "INLINE",
                    "EXTERNAL"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "DRAFT",
                    "PUBLISHED",
                    "ARCHIVED"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "slug": {
                  "type": "string"
                },
                "body": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "externalUrl": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "publishedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "archivedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                }
              },
              "required": [
                "id",
                "statusPageId",
                "workspaceId",
                "incidentId",
                "kind",
                "status",
                "title",
                "slug",
                "body",
                "externalUrl",
                "publishedAt",
                "archivedAt",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          },
          "total": {
            "type": "number"
          }
        },
        "required": [
          "postmortems",
          "total"
        ],
        "additionalProperties": false
      },
      "Project": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          },
          "parentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "monitorCount": {
            "type": "number"
          },
          "statusPageCount": {
            "type": "number"
          },
          "orderedMonitorIds": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "parentId",
          "name",
          "slug",
          "description",
          "monitorCount",
          "statusPageCount",
          "orderedMonitorIds",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "ProjectList": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Project"
        }
      },
      "PushTokenRotation": {
        "type": "object",
        "properties": {
          "pushToken": {
            "type": "string"
          }
        },
        "required": [
          "pushToken"
        ],
        "additionalProperties": false
      },
      "RevokedMcpGrants": {
        "type": "object",
        "properties": {
          "revokedIds": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "skippedIds": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "revokedIds",
          "skippedIds"
        ],
        "additionalProperties": false
      },
      "StatusPage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          },
          "projectIds": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "visibility": {
            "type": "string",
            "enum": [
              "PUBLISHED",
              "UNPUBLISHED"
            ]
          },
          "published": {
            "type": "boolean"
          },
          "customDomain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "privacyPolicyUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "logoUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "faviconUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "monitors": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "publishableKey": {
            "type": "string"
          },
          "previewToken": {
            "type": "string"
          },
          "showValues": {
            "type": "boolean"
          },
          "componentGroups": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "monitorIds": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "sortOrder": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "id",
                "name",
                "monitorIds",
                "sortOrder"
              ],
              "additionalProperties": false
            }
          },
          "template": {
            "type": "string",
            "enum": [
              "classic",
              "minimal",
              "dashboard"
            ]
          },
          "theme": {
            "type": "object",
            "properties": {
              "primaryColor": {
                "type": "string",
                "pattern": "^#[0-9a-fA-F]{3,8}$"
              },
              "bgColor": {
                "type": "string",
                "pattern": "^#[0-9a-fA-F]{3,8}$"
              },
              "textColor": {
                "type": "string",
                "pattern": "^#[0-9a-fA-F]{3,8}$"
              },
              "borderRadius": {
                "type": "string",
                "pattern": "^\\d+(\\.\\d+)?(px|rem|em)$"
              },
              "fontFamily": {
                "type": "string",
                "enum": [
                  "'Inter', sans-serif",
                  "'Space Grotesk', sans-serif",
                  "'JetBrains Mono', monospace",
                  "'DM Sans', sans-serif",
                  "'IBM Plex Sans', sans-serif",
                  "'Nunito', sans-serif",
                  "system-ui, sans-serif"
                ]
              },
              "darkMode": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "autoIncident": {
            "type": "boolean"
          },
          "customDomainVerified": {
            "type": "boolean"
          },
          "domainMonitorId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "lastRenderedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "workspaceId",
          "projectIds",
          "name",
          "slug",
          "description",
          "visibility",
          "published",
          "customDomain",
          "privacyPolicyUrl",
          "logoUrl",
          "faviconUrl",
          "monitors",
          "publishableKey",
          "previewToken",
          "showValues",
          "componentGroups",
          "template",
          "theme",
          "autoIncident",
          "customDomainVerified",
          "domainMonitorId",
          "createdAt",
          "updatedAt",
          "lastRenderedAt"
        ],
        "additionalProperties": false
      },
      "StatusPageList": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/StatusPage"
        }
      },
      "Subscription": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          },
          "plan": {
            "type": "string",
            "enum": [
              "FREE",
              "PRO",
              "BUSINESS"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "PAST_DUE",
              "CANCELED",
              "INCOMPLETE",
              "TRIALING"
            ]
          },
          "stripeCustomerId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "stripeSubscriptionId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "currentPeriodEnd": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "trialEndsAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "plan",
          "status",
          "stripeCustomerId",
          "stripeSubscriptionId",
          "currentPeriodEnd",
          "trialEndsAt",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "Team": {
        "type": "object",
        "properties": {
          "owner": {
            "type": "object",
            "properties": {
              "userId": {
                "type": "string"
              },
              "role": {
                "type": "string",
                "const": "OWNER"
              },
              "name": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "email": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "userId",
              "role",
              "name",
              "email"
            ],
            "additionalProperties": false
          },
          "viewer": {
            "type": "object",
            "properties": {
              "userId": {
                "type": "string"
              },
              "role": {
                "type": "string",
                "enum": [
                  "OWNER",
                  "ADMIN",
                  "MEMBER"
                ]
              },
              "canManageMembers": {
                "type": "boolean"
              }
            },
            "required": [
              "userId",
              "role",
              "canManageMembers"
            ],
            "additionalProperties": false
          },
          "members": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "userId": {
                  "type": "string"
                },
                "name": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "email": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "ADMIN",
                    "MEMBER"
                  ]
                },
                "joinedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                }
              },
              "required": [
                "userId",
                "name",
                "email",
                "role",
                "joinedAt"
              ],
              "additionalProperties": false
            }
          },
          "invitations": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "ADMIN",
                    "MEMBER"
                  ]
                },
                "expiresAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                },
                "invitedBy": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "invitedByName": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "PENDING",
                    "EXPIRED"
                  ]
                }
              },
              "required": [
                "id",
                "email",
                "role",
                "expiresAt",
                "createdAt",
                "invitedBy",
                "invitedByName",
                "status"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "owner",
          "viewer",
          "members",
          "invitations"
        ],
        "additionalProperties": false
      },
      "Usage": {
        "type": "object",
        "properties": {
          "monitors": {
            "type": "number"
          },
          "notificationChannels": {
            "type": "number"
          },
          "statusPages": {
            "type": "number"
          }
        },
        "required": [
          "monitors",
          "notificationChannels",
          "statusPages"
        ],
        "additionalProperties": false
      },
      "WorkspaceActivity": {
        "type": "object",
        "properties": {
          "events": {
            "readOnly": true,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "monitorId": {
                  "type": "string"
                },
                "monitorName": {
                  "type": "string"
                },
                "previousStatus": {
                  "type": "string"
                },
                "newStatus": {
                  "type": "string"
                },
                "previousStatusChangedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "timestamp": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                }
              },
              "required": [
                "id",
                "monitorId",
                "monitorName",
                "previousStatus",
                "newStatus",
                "previousStatusChangedAt",
                "timestamp"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "events"
        ],
        "additionalProperties": false
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Malformed request, or a body/query that failed schema validation.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Missing, malformed or expired credential.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Authenticated, but the credential lacks a required capability, or was minted for a different surface.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "ForbiddenSessionOnly": {
        "description": "Authenticated, but this operation is session-only — an API key can never carry the capability it needs.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "No such resource in this workspace.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "PaymentRequired": {
        "description": "`PLAN_LIMIT_EXCEEDED` — the workspace is at a plan limit. Nothing was created and nothing was charged; existing resources keep working.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Conflict": {
        "description": "The resource is not in a state that permits this, or a concurrent write won the version check (`STALE_ENTITY`). Re-read and re-apply.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Rate limited. Retry after the window in the `Retry-After` header.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "ServerError": {
        "description": "Unexpected server error.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  },
  "paths": {
    "/.well-known/oauth-authorization-server/auth": {
      "get": {
        "operationId": "getOAuthAuthorizationServerMetadata",
        "summary": "OAuth authorization-server metadata (RFC 8414)",
        "description": "Authorization-server metadata for the Glowo issuer. The issuer is `https://api.glowo.dev/auth`, so RFC 8414 §3.1 places the issuer path after the well-known prefix — this URL, not the bare `/.well-known/oauth-authorization-server`. Serving it at the bare path would advertise an issuer that does not match the retrieval URL, which §3.3 forbids and strict clients reject.",
        "tags": [
          "MCP"
        ],
        "responses": {
          "200": {
            "description": "Authorization-server metadata."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": []
      }
    },
    "/.well-known/oauth-protected-resource": {
      "get": {
        "operationId": "getOAuthProtectedResourceMetadata",
        "summary": "Protected-resource metadata (RFC 9728)",
        "description": "Describes the `/mcp` resource: its authorization servers, JWKS URI, accepted bearer methods and the complete list of grantable scopes.",
        "tags": [
          "MCP"
        ],
        "responses": {
          "200": {
            "description": "Protected-resource metadata."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": []
      }
    },
    "/.well-known/oauth-protected-resource/mcp": {
      "get": {
        "operationId": "getOAuthProtectedResourceMetadataForMcp",
        "summary": "Protected-resource metadata, path-suffixed",
        "description": "The same document as `getOAuthProtectedResourceMetadata`, at the path-suffixed URL some MCP SDKs probe first.",
        "tags": [
          "MCP"
        ],
        "responses": {
          "200": {
            "description": "Protected-resource metadata."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": []
      }
    },
    "/api-keys": {
      "post": {
        "operationId": "createApiKey",
        "summary": "Create an API key",
        "description": "Mints a personal access token and returns the secret **once** — it is stored hashed and cannot be read again. Choose the narrowest capability set that works and declare the surfaces (`rest`, `mcp`) the key may be presented on. `expiresInDays` must be one of 1, 7, 30, 90 or 365 and is capped by the plan; omitting it does not mean \"never\", it means the plan's ceiling.",
        "tags": [
          "API keys"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "permissions": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "monitors:read",
                        "monitors:write",
                        "monitors:delete",
                        "status_pages:read",
                        "status_pages:write",
                        "status_pages:delete",
                        "incidents:read",
                        "incidents:write",
                        "incidents:delete",
                        "postmortems:read",
                        "postmortems:write",
                        "postmortems:delete",
                        "notifications:read",
                        "notifications:write",
                        "notifications:delete",
                        "maintenance:write",
                        "identity:read"
                      ]
                    }
                  },
                  "expiresInDays": {
                    "type": "number"
                  },
                  "surfaces": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "rest",
                        "mcp"
                      ]
                    }
                  }
                },
                "required": [
                  "name",
                  "permissions"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The key, including the secret shown only here.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IssuedApiKey"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenSessionOnly"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "workspace:manage"
        ]
      },
      "get": {
        "operationId": "listApiKeys",
        "summary": "List API keys",
        "description": "Keys issued for this workspace, with their capabilities, surfaces, expiry and last use. Secrets are never returned — only the prefix.",
        "tags": [
          "API keys"
        ],
        "responses": {
          "200": {
            "description": "API keys.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenSessionOnly"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "workspace:manage"
        ]
      }
    },
    "/api-keys/{id}": {
      "patch": {
        "operationId": "updateApiKey",
        "summary": "Rename an API key",
        "description": "Changes the key's name. Capabilities and surfaces are fixed at creation — rotate instead.",
        "tags": [
          "API keys"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "permissions": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "monitors:read",
                        "monitors:write",
                        "monitors:delete",
                        "status_pages:read",
                        "status_pages:write",
                        "status_pages:delete",
                        "incidents:read",
                        "incidents:write",
                        "incidents:delete",
                        "postmortems:read",
                        "postmortems:write",
                        "postmortems:delete",
                        "notifications:read",
                        "notifications:write",
                        "notifications:delete",
                        "maintenance:write",
                        "identity:read"
                      ]
                    }
                  },
                  "surfaces": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "rest",
                        "mcp"
                      ]
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKey"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenSessionOnly"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "workspace:manage"
        ]
      },
      "delete": {
        "operationId": "deleteApiKey",
        "summary": "Delete an API key",
        "description": "Removes the record entirely. Revoke instead if you want to keep the audit trail.",
        "tags": [
          "API keys"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenSessionOnly"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "workspace:manage"
        ]
      }
    },
    "/api-keys/{id}/revoke": {
      "post": {
        "operationId": "revokeApiKey",
        "summary": "Revoke an API key",
        "description": "Invalidates the key immediately while keeping the record for audit. This is the correct first move for a leaked credential.",
        "tags": [
          "API keys"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The revoked key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKey"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenSessionOnly"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "workspace:manage"
        ]
      }
    },
    "/api-keys/{id}/rotate": {
      "post": {
        "operationId": "rotateApiKey",
        "summary": "Rotate an API key",
        "description": "Issues a new secret for the same key and invalidates the old one immediately. The new secret is returned once.",
        "tags": [
          "API keys"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The rotated key with its new secret.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IssuedApiKey"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenSessionOnly"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "workspace:manage"
        ]
      }
    },
    "/api/v1/embed": {
      "get": {
        "operationId": "getEmbedStatusPage",
        "summary": "Embed: status page",
        "description": "Widget API for embedding status in your own site. Authenticated by the status page's publishable key, which is read-only and safe to ship in a browser bundle.",
        "tags": [
          "Embed"
        ],
        "responses": {
          "200": {
            "description": "The status page snapshot."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "publishableKey": []
          }
        ]
      }
    },
    "/api/v1/embed/components": {
      "get": {
        "operationId": "getEmbedComponents",
        "summary": "Embed: components",
        "description": "Components and their statuses for the key's status page.",
        "tags": [
          "Embed"
        ],
        "responses": {
          "200": {
            "description": "Components."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "publishableKey": []
          }
        ]
      }
    },
    "/api/v1/embed/incidents": {
      "get": {
        "operationId": "getEmbedIncidents",
        "summary": "Embed: incidents",
        "description": "Current incidents for the key's status page.",
        "tags": [
          "Embed"
        ],
        "responses": {
          "200": {
            "description": "Incidents."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "publishableKey": []
          }
        ]
      }
    },
    "/api/v1/embed/summary": {
      "get": {
        "operationId": "getEmbedSummary",
        "summary": "Embed: summary",
        "description": "Overall and per-component status for the key's status page.",
        "tags": [
          "Embed"
        ],
        "responses": {
          "200": {
            "description": "The summary."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "publishableKey": []
          }
        ]
      }
    },
    "/api/v1/embed/uptime": {
      "get": {
        "operationId": "getEmbedUptime",
        "summary": "Embed: uptime",
        "description": "Uptime figures for the key's status page over the requested window.",
        "tags": [
          "Embed"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "componentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Uptime figures."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "publishableKey": []
          }
        ]
      }
    },
    "/api/v1/status-pages/{slug}": {
      "get": {
        "operationId": "getStatusPagePublicApi",
        "summary": "Status page (public API)",
        "description": "Stable, versioned public read API for a published status page. Prefer these `/api/v1/` routes over `/public/status/…` when building an integration — they are the documented public contract.",
        "tags": [
          "Public status"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The status page."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": []
      }
    },
    "/api/v1/status-pages/{slug}/badge.svg": {
      "get": {
        "operationId": "getStatusBadge",
        "summary": "Status badge",
        "description": "An SVG badge showing the page's current overall status, for embedding in a README.",
        "tags": [
          "Public status"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "schema": {
              "default": "status",
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SVG badge.",
            "content": {
              "image/svg+xml": {}
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": []
      }
    },
    "/api/v1/status-pages/{slug}/components": {
      "get": {
        "operationId": "listStatusPageComponents",
        "summary": "List components",
        "description": "The components shown on the page, with their current status and grouping.",
        "tags": [
          "Public status"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Components."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": []
      }
    },
    "/api/v1/status-pages/{slug}/components/{componentId}": {
      "get": {
        "operationId": "getStatusPageComponent",
        "summary": "Get a component",
        "description": "One component's current status and recent history.",
        "tags": [
          "Public status"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "componentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The component."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": []
      }
    },
    "/api/v1/status-pages/{slug}/feed.atom": {
      "get": {
        "operationId": "getStatusPageAtomFeed",
        "summary": "Atom feed",
        "description": "Incident updates as an Atom feed, for readers and integrations that poll.",
        "tags": [
          "Public status"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Atom feed.",
            "content": {
              "application/atom+xml": {}
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": []
      }
    },
    "/api/v1/status-pages/{slug}/feed.rss": {
      "get": {
        "operationId": "getStatusPageRssFeed",
        "summary": "RSS feed",
        "description": "Incident updates as an RSS 2.0 feed, for readers and integrations that poll rather than subscribe. Same content as the Atom feed in a different serialization.",
        "tags": [
          "Public status"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "RSS feed.",
            "content": {
              "application/rss+xml": {}
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": []
      }
    },
    "/api/v1/status-pages/{slug}/incidents": {
      "get": {
        "operationId": "listPublicIncidents",
        "summary": "List current incidents",
        "description": "Open and recently-resolved incidents with their public update timelines.",
        "tags": [
          "Public status"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Incidents."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": []
      }
    },
    "/api/v1/status-pages/{slug}/incidents/history": {
      "get": {
        "operationId": "listPublicIncidentHistory",
        "summary": "Incident history",
        "description": "Paginated historical incidents for the page.",
        "tags": [
          "Public status"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "default": 14,
              "type": "integer",
              "minimum": 1,
              "maximum": 90
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Historical incidents."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": []
      }
    },
    "/api/v1/status-pages/{slug}/summary": {
      "get": {
        "operationId": "getStatusPageSummary",
        "summary": "Status summary",
        "description": "One-line overall status plus per-component states — the cheapest public read.",
        "tags": [
          "Public status"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The summary."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": []
      }
    },
    "/api/v1/status-pages/{slug}/uptime": {
      "get": {
        "operationId": "getPublicUptime",
        "summary": "Public uptime",
        "description": "Uptime percentages per component over the requested window.",
        "tags": [
          "Public status"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "componentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Uptime figures."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": []
      }
    },
    "/audit-logs": {
      "get": {
        "operationId": "listAuditLogs",
        "summary": "List audit-log entries",
        "description": "Who did what, when, across the workspace. Session-only by design: an agent must not be able to read the log of its own activity.",
        "tags": [
          "Audit log"
        ],
        "parameters": [
          {
            "name": "action",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "resourceType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Audit-log entries, newest first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditLogPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenSessionOnly"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "audit:read"
        ]
      }
    },
    "/billing/checkout": {
      "post": {
        "operationId": "createCheckoutSession",
        "summary": "Start a plan upgrade",
        "description": "Returns a Stripe Checkout URL for the requested plan. Session-only.",
        "tags": [
          "Billing"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "plan": {
                    "type": "string",
                    "enum": [
                      "PRO",
                      "BUSINESS"
                    ]
                  },
                  "interval": {
                    "default": "monthly",
                    "type": "string",
                    "enum": [
                      "monthly",
                      "yearly"
                    ]
                  }
                },
                "required": [
                  "plan"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "A Stripe Checkout URL to redirect the user to."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenSessionOnly"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "billing:manage"
        ]
      }
    },
    "/billing/portal": {
      "post": {
        "operationId": "createBillingPortalSession",
        "summary": "Open the billing portal",
        "description": "Returns a Stripe customer-portal URL for managing payment method and cancellation.",
        "tags": [
          "Billing"
        ],
        "responses": {
          "201": {
            "description": "A Stripe billing-portal URL."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenSessionOnly"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "billing:manage"
        ]
      }
    },
    "/billing/subscription": {
      "get": {
        "operationId": "getSubscription",
        "summary": "Get the subscription",
        "description": "The workspace's plan and subscription state. Session-only.",
        "tags": [
          "Billing"
        ],
        "responses": {
          "200": {
            "description": "The subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenSessionOnly"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "billing:manage"
        ]
      }
    },
    "/billing/usage": {
      "get": {
        "operationId": "getUsage",
        "summary": "Get plan usage",
        "description": "Current usage against every plan limit — monitors, channels, status pages, members.",
        "tags": [
          "Billing"
        ],
        "responses": {
          "200": {
            "description": "Usage against limits.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Usage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenSessionOnly"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "billing:manage"
        ]
      }
    },
    "/escalation-policies": {
      "get": {
        "operationId": "listEscalationPolicies",
        "summary": "List escalation policies",
        "description": "Ordered escalation steps applied when an alert goes unacknowledged.",
        "tags": [
          "Escalation policies"
        ],
        "responses": {
          "200": {
            "description": "Policies.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EscalationPolicyList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "notifications:read"
        ]
      },
      "post": {
        "operationId": "createEscalationPolicy",
        "summary": "Create an escalation policy",
        "description": "Defines steps that fire in order, each after its own delay, until someone acknowledges. Attach the policy to a monitor to use it.",
        "tags": [
          "Escalation policies"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "steps": {
                    "minItems": 1,
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "stepOrder": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "delayMinutes": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1440
                        },
                        "notificationChannelIds": {
                          "minItems": 1,
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        }
                      },
                      "required": [
                        "stepOrder",
                        "delayMinutes",
                        "notificationChannelIds"
                      ]
                    }
                  }
                },
                "required": [
                  "name",
                  "steps"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created policy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EscalationPolicy"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "notifications:write"
        ]
      }
    },
    "/escalation-policies/{id}": {
      "get": {
        "operationId": "getEscalationPolicy",
        "summary": "Get an escalation policy",
        "description": "One escalation policy with its ordered steps — who is notified at each stage and how long the policy waits for an acknowledgment before advancing.",
        "tags": [
          "Escalation policies"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The policy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EscalationPolicy"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "notifications:read"
        ]
      },
      "put": {
        "operationId": "updateEscalationPolicy",
        "summary": "Update an escalation policy",
        "description": "Replaces the policy's name and its complete ordered step list.",
        "tags": [
          "Escalation policies"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "steps": {
                    "minItems": 1,
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "stepOrder": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "delayMinutes": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1440
                        },
                        "notificationChannelIds": {
                          "minItems": 1,
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        }
                      },
                      "required": [
                        "stepOrder",
                        "delayMinutes",
                        "notificationChannelIds"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated policy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EscalationPolicy"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "notifications:write"
        ]
      },
      "delete": {
        "operationId": "deleteEscalationPolicy",
        "summary": "Delete an escalation policy",
        "description": "Deletes the policy and detaches it from every monitor using it.",
        "tags": [
          "Escalation policies"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted."
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "notifications:delete"
        ]
      }
    },
    "/incidents": {
      "get": {
        "operationId": "listIncidents",
        "summary": "List incidents",
        "description": "Incidents across the workspace, filterable by status page and state.",
        "tags": [
          "Incidents"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "default": "all",
              "type": "string",
              "enum": [
                "active",
                "resolved",
                "all"
              ]
            }
          },
          {
            "name": "severity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "NONE",
                "MINOR",
                "MAJOR",
                "CRITICAL"
              ]
            }
          },
          {
            "name": "archived",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Incidents.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IncidentList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "incidents:read"
        ]
      },
      "post": {
        "operationId": "createIncident",
        "summary": "Open an incident",
        "description": "Opens an incident on a status page with an initial update. Glowo also opens incidents automatically when a monitor goes down; a database constraint keeps at most one open auto-incident per monitor and page, so a manual incident will not duplicate one.",
        "tags": [
          "Incidents"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "statusPageId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 5000
                  },
                  "severity": {
                    "default": "NONE",
                    "type": "string",
                    "enum": [
                      "NONE",
                      "MINOR",
                      "MAJOR",
                      "CRITICAL"
                    ]
                  },
                  "status": {
                    "default": "INVESTIGATING",
                    "type": "string",
                    "enum": [
                      "INVESTIGATING",
                      "IDENTIFIED",
                      "MONITORING",
                      "RESOLVED"
                    ]
                  },
                  "affectedComponents": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "visibility": {
                    "default": "PUBLISHED",
                    "type": "string",
                    "enum": [
                      "DRAFT",
                      "PUBLISHED",
                      "SCHEDULED"
                    ]
                  },
                  "scheduledFor": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                  }
                },
                "required": [
                  "statusPageId",
                  "title",
                  "message"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The opened incident.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Incident"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "incidents:write"
        ]
      }
    },
    "/incidents/{id}": {
      "get": {
        "operationId": "getIncident",
        "summary": "Get an incident",
        "description": "One incident with its full update timeline and any linked postmortem.",
        "tags": [
          "Incidents"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The incident.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IncidentWithUpdates"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "incidents:read"
        ]
      },
      "patch": {
        "operationId": "updateIncidentMetadata",
        "summary": "Edit incident metadata",
        "description": "Changes the title, impact or affected components. Does not post an update to the public timeline — use `addIncidentUpdate` for anything subscribers should read.",
        "tags": [
          "Incidents"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "severity": {
                    "type": "string",
                    "enum": [
                      "NONE",
                      "MINOR",
                      "MAJOR",
                      "CRITICAL"
                    ]
                  },
                  "affectedComponentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated incident.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Incident"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "incidents:write"
        ]
      },
      "delete": {
        "operationId": "deleteIncident",
        "summary": "Delete an incident",
        "description": "Permanently deletes the incident and its updates. Prefer `archiveIncident`, which hides it from the public page while keeping the record.",
        "tags": [
          "Incidents"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted."
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "incidents:delete"
        ]
      }
    },
    "/incidents/{id}/archive": {
      "patch": {
        "operationId": "archiveIncident",
        "summary": "Archive an incident",
        "description": "Hides the incident from the public page while keeping the record and its timeline.",
        "tags": [
          "Incidents"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The archived incident.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Incident"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "incidents:write"
        ]
      }
    },
    "/incidents/{id}/publish": {
      "patch": {
        "operationId": "publishIncident",
        "summary": "Publish an incident",
        "description": "Makes a draft or scheduled incident visible on the public status page.",
        "tags": [
          "Incidents"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "scheduledFor": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The published incident.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Incident"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "incidents:write"
        ]
      }
    },
    "/incidents/{id}/reopen": {
      "patch": {
        "operationId": "reopenIncident",
        "summary": "Reopen an incident",
        "description": "Reopens a resolved incident when the problem returns, rather than opening a second one.",
        "tags": [
          "Incidents"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mode": {
                    "default": "reopen",
                    "type": "string",
                    "enum": [
                      "undo",
                      "reopen"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reopened incident.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Incident"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "incidents:write"
        ]
      }
    },
    "/incidents/{id}/resolve": {
      "patch": {
        "operationId": "resolveIncident",
        "summary": "Resolve an incident",
        "description": "Closes the incident with a final update and notifies subscribers.",
        "tags": [
          "Incidents"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mode": {
                    "default": "resolve",
                    "type": "string",
                    "enum": [
                      "undo",
                      "resolve"
                    ]
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 5000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The resolved incident.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Incident"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "incidents:write"
        ]
      }
    },
    "/incidents/{id}/schedule": {
      "patch": {
        "operationId": "scheduleIncident",
        "summary": "Schedule an incident",
        "description": "Schedules the incident to appear at a future time — the shape used for announced maintenance that subscribers should hear about in advance.",
        "tags": [
          "Incidents"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "scheduledFor": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The scheduled incident.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Incident"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "incidents:write"
        ]
      }
    },
    "/incidents/{id}/unarchive": {
      "patch": {
        "operationId": "unarchiveIncident",
        "summary": "Unarchive an incident",
        "description": "Restores an archived incident to the public page.",
        "tags": [
          "Incidents"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The restored incident.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Incident"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "incidents:write"
        ]
      }
    },
    "/incidents/{id}/updates": {
      "post": {
        "operationId": "addIncidentUpdate",
        "summary": "Post an incident update",
        "description": "Appends an update to the timeline, moving the incident to the given state (investigating, identified, monitoring, resolved) and notifying subscribers.",
        "tags": [
          "Incidents"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 5000
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "INVESTIGATING",
                      "IDENTIFIED",
                      "MONITORING",
                      "RESOLVED"
                    ]
                  }
                },
                "required": [
                  "message",
                  "status"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The posted update.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IncidentUpdate"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "incidents:write"
        ]
      }
    },
    "/incidents/{id}/updates/{updateId}": {
      "patch": {
        "operationId": "editIncidentUpdate",
        "summary": "Edit an incident update",
        "description": "Corrects the body of an already-published update. The edit is recorded — the timeline shows that the text changed rather than silently rewriting history.",
        "tags": [
          "Incidents"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "updateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 5000
                  }
                },
                "required": [
                  "message"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The edited update.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IncidentUpdate"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "incidents:write"
        ]
      }
    },
    "/mcp": {
      "post": {
        "operationId": "mcpRequest",
        "summary": "MCP transport (JSON-RPC)",
        "description": "Model Context Protocol endpoint, streamable HTTP transport. The body is a JSON-RPC 2.0 message; the response is JSON, or an SSE stream when the client accepts `text/event-stream`. This is the surface most agents should use rather than calling REST directly — the tool list is narrower than the REST API and is what a user reviews when granting consent.\n\nAuthenticate with an OAuth 2.1 access token from the flow described by the discovery metadata, or with a `gl_` API key minted for the `mcp` surface. **The transport itself requires no particular scope** — it accepts any valid token, and each tool checks the scopes it needs when it is called, returning a tool error rather than an HTTP status if they are missing. Request the narrowest scope set your task needs; asking for all of them to satisfy the transport would be asking for authority you will not use.\n\nScopes are capabilities from the same vocabulary the REST API uses — see `x-glowo-capabilities` at the root of this document, and https://docs.glowo.dev/ai-agents/scopes for which tools need which.",
        "tags": [
          "MCP"
        ],
        "requestBody": {
          "required": true,
          "description": "A JSON-RPC 2.0 request or notification.",
          "content": {
            "application/json": {}
          }
        },
        "responses": {
          "201": {
            "description": "A JSON-RPC 2.0 response. A tool refused for want of a scope is reported inside this body as an error result, not as an HTTP failure.",
            "content": {
              "application/json": {},
              "text/event-stream": {}
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "apiKey": []
          }
        ]
      },
      "get": {
        "operationId": "mcpStream",
        "summary": "MCP server-sent event stream",
        "description": "Opens the transport's server-to-client SSE stream. Requires `Accept: text/event-stream`; anything else is refused with 406.\n\nGlowo runs the transport **statelessly** — a fresh server and transport per HTTP request, with no session id issued and nothing kept between requests. There is therefore no established session for this stream to attach to, and no server-initiated message will arrive on it. Drive the server over `POST /mcp`; this operation exists because the transport defines it, not because it carries traffic here.",
        "tags": [
          "MCP"
        ],
        "responses": {
          "200": {
            "description": "An SSE stream. Stateless deployment: it carries no server-initiated messages.",
            "content": {
              "text/event-stream": {}
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "406": {
            "description": "The client did not accept `text/event-stream`."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "apiKey": []
          }
        ]
      },
      "delete": {
        "operationId": "mcpCloseSession",
        "summary": "Close the MCP transport",
        "description": "The transport's session-termination verb. Accepted and answered 200, but a no-op on this deployment: the server is stateless, so there is no session to terminate. Clients that call it as part of an orderly shutdown are not doing anything wrong — they are just not releasing anything.",
        "tags": [
          "MCP"
        ],
        "responses": {
          "200": {
            "description": "Accepted. Nothing was held, so nothing was released."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "apiKey": []
          }
        ]
      }
    },
    "/mcp/grants": {
      "get": {
        "operationId": "listMcpGrants",
        "summary": "List MCP grants",
        "description": "OAuth grants the signed-in user has approved for this workspace — which client, which scopes, when it was last used.",
        "tags": [
          "MCP"
        ],
        "responses": {
          "200": {
            "description": "Grants.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpGrantList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ]
      }
    },
    "/mcp/grants/revoke-batch": {
      "post": {
        "operationId": "revokeMcpGrants",
        "summary": "Revoke MCP grants",
        "description": "Revokes several grants atomically, killing their outstanding refresh tokens too — a revocation that leaves refresh tokens alive is not one.",
        "tags": [
          "MCP"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                },
                "required": [
                  "ids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What was revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevokedMcpGrants"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ]
      }
    },
    "/monitors": {
      "get": {
        "operationId": "listMonitors",
        "summary": "List monitors",
        "description": "Every monitor in the workspace, optionally narrowed to one project. Returns the full set in a single response; for large workspaces prefer `listMonitorsPage`, which is cursor-paginated and returns a lighter payload.",
        "tags": [
          "Monitors"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The workspace's monitors.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:read"
        ]
      },
      "post": {
        "operationId": "createMonitor",
        "summary": "Create a monitor",
        "description": "Creates a check of one of seven types (HTTP, TCP, PING, DNS, DNS_DIFF, WEBSOCKET, PUSH). Required fields depend on the type: HTTP and WEBSOCKET need `url`, TCP needs `host` and `port`, PING and DNS need `host`. A PUSH monitor is issued a push token on creation and reports by calling `receivePush` rather than being checked. Refused with 402 `PLAN_LIMIT_EXCEEDED` when the workspace is at its monitor limit.",
        "tags": [
          "Monitors"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "HTTP",
                      "TCP",
                      "PING",
                      "DNS",
                      "DNS_DIFF",
                      "WEBSOCKET",
                      "PUSH"
                    ]
                  },
                  "url": {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri"
                  },
                  "host": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "port": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 65535
                  },
                  "interval": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "retries": {
                    "default": 3,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10
                  },
                  "timeout": {
                    "default": 10000,
                    "type": "integer",
                    "minimum": 1000,
                    "maximum": 60000
                  },
                  "tags": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 50
                    }
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "config": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "notificationChannelIds": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "regions": {
                    "maxItems": 32,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 10
                    }
                  },
                  "regionStrategy": {
                    "type": "string",
                    "enum": [
                      "all",
                      "round_robin",
                      "random"
                    ]
                  },
                  "confirmationsRequired": {
                    "default": 2,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 5
                  },
                  "recoveryConfirmationsRequired": {
                    "default": 2,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 5
                  },
                  "minFailureDurationMs": {
                    "default": 30000,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 300000
                  },
                  "projectIds": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  }
                },
                "required": [
                  "name",
                  "type",
                  "interval"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created monitor.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorDetail"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:write"
        ]
      }
    },
    "/monitors/{id}": {
      "get": {
        "operationId": "getMonitor",
        "summary": "Get a monitor",
        "description": "Full detail for one monitor: configuration, current status, latest heartbeat, attached notification channels and flap-protection settings.",
        "tags": [
          "Monitors"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The monitor.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorDetail"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:read"
        ]
      },
      "put": {
        "operationId": "updateMonitor",
        "summary": "Update a monitor",
        "description": "Replaces the monitor's mutable configuration. The monitor type is immutable — create a new monitor to change it. Concurrent updates are version-locked and lose with 409 `STALE_ENTITY`; re-read the monitor and re-apply.",
        "tags": [
          "Monitors"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "HTTP",
                      "TCP",
                      "PING",
                      "DNS",
                      "DNS_DIFF",
                      "WEBSOCKET",
                      "PUSH"
                    ]
                  },
                  "url": {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri"
                  },
                  "host": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "port": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 65535
                  },
                  "interval": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "retries": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10
                  },
                  "timeout": {
                    "type": "integer",
                    "minimum": 1000,
                    "maximum": 60000
                  },
                  "tags": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 50
                    }
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "config": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "notificationChannelIds": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "regions": {
                    "maxItems": 32,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 10
                    }
                  },
                  "regionStrategy": {
                    "type": "string",
                    "enum": [
                      "all",
                      "round_robin",
                      "random"
                    ]
                  },
                  "confirmationsRequired": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 5
                  },
                  "recoveryConfirmationsRequired": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 5
                  },
                  "minFailureDurationMs": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 300000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated monitor.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorDetail"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:write"
        ]
      },
      "delete": {
        "operationId": "deleteMonitor",
        "summary": "Delete a monitor",
        "description": "Permanently deletes the monitor and cascades to its heartbeats, acknowledgments and maintenance windows. Irreversible. Requires the `monitors:delete` tier — `monitors:write` is deliberately not enough.",
        "tags": [
          "Monitors"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted."
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:delete"
        ]
      }
    },
    "/monitors/{id}/acknowledge": {
      "post": {
        "operationId": "acknowledgeAlert",
        "summary": "Acknowledge an alert",
        "description": "Stops repeat notifications for the current DOWN episode without pausing the monitor or hiding the problem. The acknowledgment is scoped to the episode, so a later, separate outage alerts normally.",
        "tags": [
          "Monitors"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The acknowledgment."
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:write"
        ]
      }
    },
    "/monitors/{id}/acknowledgments": {
      "get": {
        "operationId": "listAlertAcknowledgments",
        "summary": "List acknowledgments",
        "description": "Who acknowledged this monitor's alerts, when, and with what note.",
        "tags": [
          "Monitors"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Acknowledgments, newest first."
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:read"
        ]
      }
    },
    "/monitors/{id}/check": {
      "post": {
        "operationId": "runCheckNow",
        "summary": "Run a check immediately",
        "description": "Runs an on-demand check without waiting for the next interval and returns its result. Rate limited per plan (`maxOnDemandChecksPerHour`); exceeding it returns 429.",
        "tags": [
          "Monitors"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "The check result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckResult"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:write"
        ]
      }
    },
    "/monitors/{id}/dns/acknowledge": {
      "post": {
        "operationId": "acknowledgeDnsChange",
        "summary": "Accept a DNS change as the new baseline",
        "description": "For DNS_DIFF monitors: accepts the currently-observed answer as expected, clearing the diff alert. Use after an intentional DNS change; do not use to silence an unexplained one.",
        "tags": [
          "Monitors"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The monitor with its new DNS baseline.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorDetail"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:write"
        ]
      }
    },
    "/monitors/{id}/heartbeats": {
      "delete": {
        "operationId": "resetMonitorHeartbeats",
        "summary": "Delete all heartbeats",
        "description": "Erases the monitor's entire check history and resets its status. Irreversible, and it destroys the evidence behind past incidents — requires the `monitors:delete` tier.",
        "tags": [
          "Monitors"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "History deleted."
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:delete"
        ]
      },
      "get": {
        "operationId": "listHeartbeats",
        "summary": "List heartbeats",
        "description": "Recent check results for the monitor, newest first — one row per region per check. Use this to explain *why* a monitor is down: each heartbeat carries the status, latency, error code and assertion outcomes.",
        "tags": [
          "Monitors"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 60,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "regions",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Heartbeats, newest first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HeartbeatList"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:read"
        ]
      }
    },
    "/monitors/{id}/heartbeats/{heartbeatId}": {
      "get": {
        "operationId": "getHeartbeat",
        "summary": "Get one heartbeat",
        "description": "Full detail for a single check result, including HTTP timing breakdown, response headers and per-assertion outcomes where the monitor type provides them.",
        "tags": [
          "Monitors"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "heartbeatId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The heartbeat.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Heartbeat"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:read"
        ]
      }
    },
    "/monitors/{id}/hourly-stats": {
      "get": {
        "operationId": "getMonitorHourlyStats",
        "summary": "Hourly uptime statistics",
        "description": "Pre-aggregated uptime and latency per hour over the requested window. Cheaper and more stable than deriving the same numbers from raw heartbeats.",
        "tags": [
          "Monitors"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "regions",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Hourly buckets, oldest first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HourlyStatList"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:read"
        ]
      }
    },
    "/monitors/{id}/pause": {
      "patch": {
        "operationId": "pauseMonitor",
        "summary": "Pause a monitor",
        "description": "Stops scheduling checks and suppresses alerts. Returns 409 if the monitor is already paused — pausing is a state transition, not an idempotent set.",
        "tags": [
          "Monitors"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The paused monitor.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorDetail"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:write"
        ]
      }
    },
    "/monitors/{id}/regenerate-push-token": {
      "post": {
        "operationId": "regeneratePushToken",
        "summary": "Regenerate a push token",
        "description": "Mints a new push token for a PUSH monitor and returns it **once** — it is not readable again. The previous token stops working immediately, so every pusher must be updated before the monitor's staleness window elapses or it will alert.",
        "tags": [
          "Monitors"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The new token, returned once.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PushTokenRotation"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:write"
        ]
      }
    },
    "/monitors/{id}/report": {
      "get": {
        "operationId": "getMonitorReport",
        "summary": "Download an uptime report",
        "description": "An SLA report over a date range, as JSON or CSV depending on the `format` parameter. Retention is bounded by the workspace plan (`retentionDays`).",
        "tags": [
          "Monitors"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "default": "json",
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The report. `format=json` (the default) returns JSON; `format=csv` returns CSV.",
            "content": {
              "application/json": {},
              "text/csv": {}
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:read"
        ]
      }
    },
    "/monitors/{id}/resume": {
      "patch": {
        "operationId": "resumeMonitor",
        "summary": "Resume a monitor",
        "description": "Resumes checking a paused monitor. Returns 409 if the monitor is not paused.",
        "tags": [
          "Monitors"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The resumed monitor.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorDetail"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:write"
        ]
      }
    },
    "/monitors/{monitorId}/maintenance-windows": {
      "get": {
        "operationId": "listMaintenanceWindows",
        "summary": "List maintenance windows",
        "description": "Scheduled windows during which this monitor's failures do not alert.",
        "tags": [
          "Maintenance"
        ],
        "parameters": [
          {
            "name": "monitorId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Maintenance windows.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaintenanceWindowList"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:read"
        ]
      },
      "post": {
        "operationId": "createMaintenanceWindow",
        "summary": "Schedule a maintenance window",
        "description": "Suppresses alerts for a monitor between `startsAt` and `endsAt`, optionally recurring. Windows for one monitor may not overlap — an overlapping request is refused by a database exclusion constraint, not by a best-effort check, so it is safe under concurrency.",
        "tags": [
          "Maintenance"
        ],
        "parameters": [
          {
            "name": "monitorId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "startsAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                  },
                  "endsAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                  },
                  "timezone": {
                    "default": "UTC",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "recurring": {
                    "type": "object",
                    "properties": {
                      "frequency": {
                        "type": "string",
                        "enum": [
                          "daily",
                          "weekly",
                          "monthly",
                          "cron"
                        ]
                      },
                      "dayOfWeek": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 6
                      },
                      "dayOfMonth": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 31
                      },
                      "expression": {
                        "type": "string",
                        "maxLength": 100
                      }
                    },
                    "required": [
                      "frequency"
                    ]
                  },
                  "excludeFromUptime": {
                    "default": true,
                    "type": "boolean"
                  }
                },
                "required": [
                  "title",
                  "startsAt",
                  "endsAt"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The scheduled window.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaintenanceWindow"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "maintenance:write"
        ]
      }
    },
    "/monitors/{monitorId}/maintenance-windows/{id}": {
      "put": {
        "operationId": "updateMaintenanceWindow",
        "summary": "Update a maintenance window",
        "description": "Reschedules or renames a window. `endsAt` must remain after `startsAt`.",
        "tags": [
          "Maintenance"
        ],
        "parameters": [
          {
            "name": "monitorId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "startsAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                  },
                  "endsAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                  },
                  "timezone": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "recurring": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "frequency": {
                            "type": "string",
                            "enum": [
                              "daily",
                              "weekly",
                              "monthly",
                              "cron"
                            ]
                          },
                          "dayOfWeek": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 6
                          },
                          "dayOfMonth": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 31
                          },
                          "expression": {
                            "type": "string",
                            "maxLength": 100
                          }
                        },
                        "required": [
                          "frequency"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "excludeFromUptime": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated window.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaintenanceWindow"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "maintenance:write"
        ]
      },
      "delete": {
        "operationId": "deleteMaintenanceWindow",
        "summary": "Delete a maintenance window",
        "description": "Removes the window. Alerts resume immediately if the window was active.",
        "tags": [
          "Maintenance"
        ],
        "parameters": [
          {
            "name": "monitorId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted."
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "maintenance:write"
        ]
      }
    },
    "/monitors/page": {
      "get": {
        "operationId": "listMonitorsPage",
        "summary": "List monitors (paginated)",
        "description": "Cursor-paginated monitor list. Pass the `nextCursor` from a response as `cursor` to fetch the following page; a response without `nextCursor` is the last page. This is the list an agent should page through — payload size is independent of workspace size.",
        "tags": [
          "Monitors"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "UP",
                "DOWN",
                "DEGRADED",
                "CHANGED",
                "MAINTENANCE",
                "PENDING"
              ]
            }
          },
          {
            "name": "paused",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of monitors plus the cursor for the next.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:read"
        ]
      }
    },
    "/monitors/probe": {
      "post": {
        "operationId": "probeUrl",
        "summary": "Probe a URL without creating a monitor",
        "description": "Runs a single check against a URL and returns the result, so a target can be validated before a monitor is created for it. The URL is checked against the SSRF guard: private, loopback and link-local addresses are refused even when the URL is well-formed.",
        "tags": [
          "Monitors"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri"
                  },
                  "method": {
                    "default": "GET",
                    "type": "string",
                    "enum": [
                      "GET",
                      "POST",
                      "PUT",
                      "PATCH",
                      "DELETE",
                      "HEAD",
                      "OPTIONS"
                    ]
                  },
                  "headers": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "body": {
                    "type": "string"
                  },
                  "assertions": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "source": {
                          "type": "string",
                          "enum": [
                            "status_code",
                            "json_body",
                            "text_body",
                            "headers",
                            "response_time"
                          ]
                        },
                        "comparison": {
                          "type": "string",
                          "enum": [
                            "equals",
                            "not_equals",
                            "any_of",
                            "contains",
                            "not_contains",
                            "greater_than",
                            "less_than",
                            "is_empty",
                            "is_not_empty",
                            "is_null",
                            "is_not_null",
                            "regex"
                          ]
                        },
                        "property": {
                          "type": "string",
                          "maxLength": 500
                        },
                        "target": {
                          "type": "string",
                          "maxLength": 10000
                        },
                        "severity": {
                          "default": "fail",
                          "type": "string",
                          "enum": [
                            "warn",
                            "fail"
                          ]
                        }
                      },
                      "required": [
                        "source",
                        "comparison"
                      ]
                    }
                  }
                },
                "required": [
                  "url"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The probe result."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:write"
        ]
      }
    },
    "/monitors/stats": {
      "get": {
        "operationId": "getWorkspaceMonitorStats",
        "summary": "Workspace monitor summary",
        "description": "Aggregate counts across the workspace — how many monitors are up, down, degraded and paused. The cheapest call for answering \"is anything broken right now\".",
        "tags": [
          "Monitors"
        ],
        "responses": {
          "200": {
            "description": "Counts by monitor status."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:read"
        ]
      }
    },
    "/notifications": {
      "get": {
        "operationId": "listNotificationChannels",
        "summary": "List notification channels",
        "description": "Every channel in the workspace — email, Slack, Discord, Telegram, SMS, PagerDuty and outbound webhook — with its enabled state.",
        "tags": [
          "Notifications"
        ],
        "responses": {
          "200": {
            "description": "Channels.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationChannelList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "notifications:read"
        ]
      },
      "post": {
        "operationId": "createNotificationChannel",
        "summary": "Create a notification channel",
        "description": "Creates a channel of one of the supported types. The configuration shape depends on the type: a webhook needs a URL (validated against the SSRF guard), Slack and Discord need incoming-webhook URLs, SMS needs phone numbers in E.164, PagerDuty needs an Events v2 routing key.",
        "tags": [
          "Notifications"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "config": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "EMAIL"
                          },
                          "address": {
                            "type": "string",
                            "format": "email",
                            "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                          }
                        },
                        "required": [
                          "type",
                          "address"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "SLACK"
                          },
                          "webhookUrl": {
                            "type": "string",
                            "maxLength": 2048,
                            "format": "uri"
                          }
                        },
                        "required": [
                          "type",
                          "webhookUrl"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "DISCORD"
                          },
                          "webhookUrl": {
                            "type": "string",
                            "maxLength": 2048,
                            "format": "uri"
                          }
                        },
                        "required": [
                          "type",
                          "webhookUrl"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "TELEGRAM"
                          },
                          "botToken": {
                            "type": "string",
                            "minLength": 1
                          },
                          "chatId": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "type",
                          "botToken",
                          "chatId"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "WEBHOOK"
                          },
                          "url": {
                            "type": "string",
                            "maxLength": 2048,
                            "format": "uri"
                          },
                          "secret": {
                            "type": "string",
                            "minLength": 1
                          },
                          "headers": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "type",
                          "url"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "PAGERDUTY"
                          },
                          "routingKey": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "type",
                          "routingKey"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "SMS"
                          },
                          "phoneNumbers": {
                            "minItems": 1,
                            "maxItems": 10,
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "phoneNumber": {
                            "type": "string",
                            "maxLength": 20
                          }
                        },
                        "required": [
                          "type",
                          "phoneNumbers"
                        ]
                      }
                    ]
                  },
                  "events": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "MONITOR_DOWN",
                        "MONITOR_UP",
                        "MONITOR_DEGRADED",
                        "MONITOR_CHANGED",
                        "CERTIFICATE_EXPIRING",
                        "INCIDENT_CREATED"
                      ]
                    }
                  },
                  "monitorIds": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "projectIds": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  }
                },
                "required": [
                  "name",
                  "config",
                  "events"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created channel.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationChannel"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "notifications:write"
        ]
      }
    },
    "/notifications/{id}": {
      "get": {
        "operationId": "getNotificationChannel",
        "summary": "Get a notification channel",
        "description": "One channel with its configuration. Secrets in the configuration are redacted.",
        "tags": [
          "Notifications"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The channel.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationChannel"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "notifications:read"
        ]
      },
      "put": {
        "operationId": "updateNotificationChannel",
        "summary": "Update a notification channel",
        "description": "Replaces the channel's name and configuration.",
        "tags": [
          "Notifications"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "config": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "EMAIL"
                          },
                          "address": {
                            "type": "string",
                            "format": "email",
                            "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                          }
                        },
                        "required": [
                          "type",
                          "address"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "SLACK"
                          },
                          "webhookUrl": {
                            "type": "string",
                            "maxLength": 2048,
                            "format": "uri"
                          }
                        },
                        "required": [
                          "type",
                          "webhookUrl"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "DISCORD"
                          },
                          "webhookUrl": {
                            "type": "string",
                            "maxLength": 2048,
                            "format": "uri"
                          }
                        },
                        "required": [
                          "type",
                          "webhookUrl"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "TELEGRAM"
                          },
                          "botToken": {
                            "type": "string",
                            "minLength": 1
                          },
                          "chatId": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "type",
                          "botToken",
                          "chatId"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "WEBHOOK"
                          },
                          "url": {
                            "type": "string",
                            "maxLength": 2048,
                            "format": "uri"
                          },
                          "secret": {
                            "type": "string",
                            "minLength": 1
                          },
                          "headers": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "type",
                          "url"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "PAGERDUTY"
                          },
                          "routingKey": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "type",
                          "routingKey"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "SMS"
                          },
                          "phoneNumbers": {
                            "minItems": 1,
                            "maxItems": 10,
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "phoneNumber": {
                            "type": "string",
                            "maxLength": 20
                          }
                        },
                        "required": [
                          "type",
                          "phoneNumbers"
                        ]
                      }
                    ]
                  },
                  "events": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "MONITOR_DOWN",
                        "MONITOR_UP",
                        "MONITOR_DEGRADED",
                        "MONITOR_CHANGED",
                        "CERTIFICATE_EXPIRING",
                        "INCIDENT_CREATED"
                      ]
                    }
                  },
                  "monitorIds": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "projectIds": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated channel.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationChannel"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "notifications:write"
        ]
      },
      "delete": {
        "operationId": "deleteNotificationChannel",
        "summary": "Delete a notification channel",
        "description": "Deletes the channel and detaches it from every monitor using it. Monitors left with no channel will still record failures but will page nobody — check coverage before deleting.",
        "tags": [
          "Notifications"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted."
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "notifications:delete"
        ]
      }
    },
    "/notifications/{id}/deliveries": {
      "get": {
        "operationId": "listNotificationDeliveries",
        "summary": "Delivery history for a channel",
        "description": "Whether each alert actually arrived, with attempt counts and failure reasons. This is the endpoint that answers \"we never got paged\" — a recorded delivery is not the same as a successful one.",
        "tags": [
          "Notifications"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deliveries, newest first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationDeliveryList"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "notifications:read"
        ]
      }
    },
    "/notifications/{id}/disable": {
      "patch": {
        "operationId": "disableNotificationChannel",
        "summary": "Disable a channel",
        "description": "Stops delivery through the channel without deleting it. Alerts that would have used it are simply not sent — this silences pages, so prefer a maintenance window for planned work.",
        "tags": [
          "Notifications"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The disabled channel.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationChannel"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "notifications:write"
        ]
      }
    },
    "/notifications/{id}/enable": {
      "patch": {
        "operationId": "enableNotificationChannel",
        "summary": "Enable a channel",
        "description": "Resumes delivery through a disabled channel.",
        "tags": [
          "Notifications"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The enabled channel.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationChannel"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "notifications:write"
        ]
      }
    },
    "/notifications/{id}/test": {
      "post": {
        "operationId": "testNotificationChannel",
        "summary": "Send a test notification",
        "description": "Delivers a test message through the channel and reports the outcome — the way to prove a channel actually reaches someone before relying on it.",
        "tags": [
          "Notifications"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Delivery outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "notifications:write"
        ]
      }
    },
    "/postmortems": {
      "get": {
        "operationId": "listPostmortems",
        "summary": "List postmortems",
        "description": "Postmortems in the workspace, published and draft.",
        "tags": [
          "Postmortems"
        ],
        "parameters": [
          {
            "name": "statusPageId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "incidentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "DRAFT",
                "PUBLISHED"
              ]
            }
          },
          {
            "name": "archived",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Postmortems.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostmortemList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "postmortems:read"
        ]
      },
      "post": {
        "operationId": "createPostmortem",
        "summary": "Create a postmortem",
        "description": "Creates a draft write-up. Link it to an incident with `linkPostmortem`.",
        "tags": [
          "Postmortems"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "INLINE"
                      },
                      "statusPageId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "incidentId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "title": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      },
                      "slug": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 140,
                        "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                      },
                      "body": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 50000
                      }
                    },
                    "required": [
                      "kind",
                      "statusPageId",
                      "title",
                      "body"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "EXTERNAL"
                      },
                      "statusPageId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "incidentId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "title": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      },
                      "slug": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 140,
                        "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                      },
                      "externalUrl": {
                        "type": "string",
                        "maxLength": 2048,
                        "format": "uri"
                      }
                    },
                    "required": [
                      "kind",
                      "statusPageId",
                      "title",
                      "externalUrl"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created postmortem.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Postmortem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "postmortems:write"
        ]
      }
    },
    "/postmortems/{id}": {
      "get": {
        "operationId": "getPostmortem",
        "summary": "Get a postmortem",
        "description": "One postmortem with its body and linked incident.",
        "tags": [
          "Postmortems"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The postmortem.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Postmortem"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "postmortems:read"
        ]
      },
      "patch": {
        "operationId": "updatePostmortem",
        "summary": "Update a postmortem",
        "description": "Edits the title or body. Edits to a published postmortem are visible immediately.",
        "tags": [
          "Postmortems"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 140,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50000
                  },
                  "externalUrl": {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated postmortem.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Postmortem"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "postmortems:write"
        ]
      },
      "delete": {
        "operationId": "deletePostmortem",
        "summary": "Delete a postmortem",
        "description": "Permanently deletes the write-up. Prefer `archivePostmortem`.",
        "tags": [
          "Postmortems"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted."
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "postmortems:delete"
        ]
      }
    },
    "/postmortems/{id}/archive": {
      "post": {
        "operationId": "archivePostmortem",
        "summary": "Archive a postmortem",
        "description": "Hides it from listings while keeping the record.",
        "tags": [
          "Postmortems"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The archived postmortem.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Postmortem"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "postmortems:write"
        ]
      }
    },
    "/postmortems/{id}/link": {
      "post": {
        "operationId": "linkPostmortem",
        "summary": "Link a postmortem to an incident",
        "description": "Attaches the postmortem to an incident so both appear together on the status page.",
        "tags": [
          "Postmortems"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incidentId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "incidentId"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The linked postmortem.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Postmortem"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "postmortems:write"
        ]
      }
    },
    "/postmortems/{id}/publish": {
      "post": {
        "operationId": "publishPostmortem",
        "summary": "Publish a postmortem",
        "description": "Makes the postmortem visible on the public status page alongside its incident.",
        "tags": [
          "Postmortems"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The published postmortem.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Postmortem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "postmortems:write"
        ]
      }
    },
    "/postmortems/{id}/unlink": {
      "post": {
        "operationId": "unlinkPostmortem",
        "summary": "Unlink a postmortem",
        "description": "Detaches it from its incident. Neither record is deleted.",
        "tags": [
          "Postmortems"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The unlinked postmortem.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Postmortem"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "postmortems:write"
        ]
      }
    },
    "/postmortems/{id}/unpublish": {
      "post": {
        "operationId": "unpublishPostmortem",
        "summary": "Unpublish a postmortem",
        "description": "Removes it from the public page and returns it to draft.",
        "tags": [
          "Postmortems"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The unpublished postmortem.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Postmortem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "postmortems:write"
        ]
      }
    },
    "/projects": {
      "get": {
        "operationId": "listProjects",
        "summary": "List projects",
        "description": "Projects in the workspace, each with counts of the monitors and status pages it groups.",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "Projects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ]
      },
      "post": {
        "operationId": "createProject",
        "summary": "Create a project",
        "description": "Projects group monitors and status pages for navigation and access; they are not a tenancy boundary — the workspace is.",
        "tags": [
          "Projects"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60,
                    "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "parentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "name",
                  "slug"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:write"
        ]
      }
    },
    "/projects/{id}": {
      "get": {
        "operationId": "getProject",
        "summary": "Get a project",
        "description": "One project with its monitor and status-page membership.",
        "tags": [
          "Projects"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ]
      },
      "put": {
        "operationId": "updateProject",
        "summary": "Update a project",
        "description": "Renames a project or moves it under a different parent project.",
        "tags": [
          "Projects"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60,
                    "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 1000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "parentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:write"
        ]
      },
      "delete": {
        "operationId": "deleteProject",
        "summary": "Delete a project",
        "description": "Deletes the project. Monitors and status pages it grouped are **not** deleted — they simply stop belonging to a project.",
        "tags": [
          "Projects"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted."
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:write"
        ]
      }
    },
    "/projects/{id}/monitors": {
      "post": {
        "operationId": "addProjectMonitors",
        "summary": "Add monitors to a project",
        "description": "Adds one or more existing monitors to the project. Already-member monitors are ignored.",
        "tags": [
          "Projects"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "monitorIds": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "statusPageIds": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The project with updated membership.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:write"
        ]
      }
    },
    "/projects/{id}/monitors/{resourceId}": {
      "delete": {
        "operationId": "removeProjectMonitor",
        "summary": "Remove a monitor from a project",
        "description": "Removes the membership only. The monitor itself keeps running.",
        "tags": [
          "Projects"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "resourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Removed."
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:write"
        ]
      }
    },
    "/projects/{id}/monitors/move": {
      "post": {
        "operationId": "moveProjectMonitor",
        "summary": "Move a monitor between projects",
        "description": "Moves one monitor from this project to another in a single call.",
        "tags": [
          "Projects"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "monitorId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "fromProjectId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "move",
                      "copy"
                    ]
                  }
                },
                "required": [
                  "monitorId",
                  "fromProjectId",
                  "action"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Moved."
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:write"
        ]
      }
    },
    "/projects/{id}/monitors/order": {
      "put": {
        "operationId": "reorderProjectMonitors",
        "summary": "Reorder monitors in a project",
        "description": "Sets the display order of the project's monitors. Send the complete ordered id list.",
        "tags": [
          "Projects"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "monitorIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  }
                },
                "required": [
                  "monitorIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Reordered."
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "monitors:write"
        ]
      }
    },
    "/projects/{id}/status-pages": {
      "post": {
        "operationId": "addProjectStatusPages",
        "summary": "Add status pages to a project",
        "description": "Adds one or more existing status pages to the project.",
        "tags": [
          "Projects"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "monitorIds": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "statusPageIds": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The project with updated membership.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "status_pages:write"
        ]
      }
    },
    "/projects/{id}/status-pages/{resourceId}": {
      "delete": {
        "operationId": "removeProjectStatusPage",
        "summary": "Remove a status page from a project",
        "description": "Removes the membership only. The status page stays published.",
        "tags": [
          "Projects"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "resourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Removed."
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "status_pages:write"
        ]
      }
    },
    "/public/sitemap": {
      "get": {
        "operationId": "listPublicStatusPages",
        "summary": "List published status pages",
        "description": "Every published status page with its slug, custom domain and last-modified time. Used to build sitemaps and to pre-render pages.",
        "tags": [
          "Public status"
        ],
        "responses": {
          "200": {
            "description": "Published status pages."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": []
      }
    },
    "/public/status/{slug}": {
      "get": {
        "operationId": "getPublicStatusPage",
        "summary": "Get a public status page",
        "description": "The full public snapshot for a published status page: component statuses, open and recent incidents, scheduled maintenance and uptime. No credential required. Cached briefly at the edge, so it may lag a status change by a few tens of seconds.\n\n`domain` and `id` are reserved first segments — `/public/status/domain/{domain}` and `/public/status/id/{id}` address a page by custom domain and by id, so a status page whose slug is literally `domain` or `id` is not reachable here.",
        "tags": [
          "Public status"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "preview",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The public status snapshot."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": []
      }
    },
    "/public/status/{slug}/postmortems/{postmortemSlug}": {
      "get": {
        "operationId": "getPublicPostmortem",
        "summary": "Get a published postmortem",
        "description": "The public write-up for a resolved incident.",
        "tags": [
          "Public status"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          },
          {
            "name": "postmortemSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 140
            }
          },
          {
            "name": "preview",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The postmortem."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": []
      }
    },
    "/public/status/{slug}/subscribe": {
      "post": {
        "operationId": "subscribeByEmail",
        "summary": "Subscribe by email",
        "description": "Subscribes an email address to a status page's updates. A verification email is sent; the subscription is inactive until the link is clicked. Protected by a proof-of-work challenge.",
        "tags": [
          "Subscribers"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "maxLength": 320,
                    "format": "email",
                    "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  },
                  "componentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "altcha": {
                    "type": "string"
                  }
                },
                "required": [
                  "email"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Verification email sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": []
      }
    },
    "/public/status/{slug}/subscribe/slack": {
      "post": {
        "operationId": "subscribeBySlack",
        "summary": "Subscribe a Slack channel",
        "description": "Registers a Slack incoming-webhook URL to receive status-page updates.",
        "tags": [
          "Subscribers"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "webhookUrl": {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri"
                  },
                  "componentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "altcha": {
                    "type": "string"
                  }
                },
                "required": [
                  "webhookUrl"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Slack channel subscribed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": []
      }
    },
    "/public/status/{slug}/subscribe/webhook": {
      "post": {
        "operationId": "subscribeByWebhook",
        "summary": "Subscribe a webhook",
        "description": "Registers a URL to receive status-page updates. The URL is checked against the SSRF guard, so private and loopback addresses are refused.",
        "tags": [
          "Subscribers"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri"
                  },
                  "secret": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "componentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "altcha": {
                    "type": "string"
                  }
                },
                "required": [
                  "url"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Webhook subscribed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": []
      }
    },
    "/public/status/{slug}/unsubscribe": {
      "get": {
        "operationId": "unsubscribe",
        "summary": "Unsubscribe",
        "description": "Removes a subscription using the token from any notification's unsubscribe link.",
        "tags": [
          "Subscribers"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 32,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Unsubscribed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": []
      }
    },
    "/public/status/{slug}/verify": {
      "get": {
        "operationId": "verifySubscription",
        "summary": "Verify an email subscription",
        "description": "Confirms an email subscription from the token in the verification link. Every post-token failure returns a generic 404 — a distinct error code behind an opaque token would be an existence oracle.",
        "tags": [
          "Subscribers"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 32,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Subscription verified.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": []
      }
    },
    "/public/status/domain/{domain}": {
      "get": {
        "operationId": "getPublicStatusPageByDomain",
        "summary": "Get a public status page by custom domain",
        "description": "Resolves a verified custom domain to its status page and returns the snapshot.",
        "tags": [
          "Public status"
        ],
        "parameters": [
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The public status snapshot."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": []
      }
    },
    "/public/status/id/{id}": {
      "get": {
        "operationId": "getPublicStatusPageById",
        "summary": "Get a public status page by id",
        "description": "Same snapshot as `getPublicStatusPage`, addressed by status-page id.",
        "tags": [
          "Public status"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "preview",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The public status snapshot."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": []
      }
    },
    "/push/{token}": {
      "post": {
        "operationId": "receivePush",
        "summary": "Send a heartbeat",
        "description": "Check-in endpoint for PUSH monitors — call it from a cron job, backup script or batch pipeline when the work succeeds. The monitor alerts when no heartbeat arrives inside its interval plus grace period. Report a failure with `?status=down&message=...` (`msg` is accepted as an alias). Unknown query parameters are ignored rather than rejected: a cache-buster must never turn a healthy job into an outage. Send an `Idempotency-Key` header to make retries safe. The path token authenticates the call — treat it as a secret.",
        "tags": [
          "Push"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "message",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "msg",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted. 202, not 200: the heartbeat is written to an inbox and drained by a worker, so acceptance is not proof the monitor has already been updated. Read the monitor if you need to observe the effect.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "ok"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": []
      }
    },
    "/status-pages": {
      "get": {
        "operationId": "listStatusPages",
        "summary": "List status pages",
        "description": "Status pages in the workspace, published and unpublished.",
        "tags": [
          "Status pages"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Status pages.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusPageList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "status_pages:read"
        ]
      },
      "post": {
        "operationId": "createStatusPage",
        "summary": "Create a status page",
        "description": "Creates a status page with a slug, template and component list. Created unpublished — call `publishStatusPage` to make it public.",
        "tags": [
          "Status pages"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 60,
                    "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "visibility": {
                    "default": "PUBLISHED",
                    "type": "string",
                    "enum": [
                      "PUBLISHED",
                      "UNPUBLISHED"
                    ]
                  },
                  "customDomain": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "privacyPolicyUrl": {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri"
                  },
                  "monitors": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "componentGroups": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "monitorIds": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        },
                        "sortOrder": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "monitorIds",
                        "sortOrder"
                      ]
                    }
                  },
                  "template": {
                    "type": "string",
                    "enum": [
                      "classic",
                      "minimal",
                      "dashboard"
                    ]
                  },
                  "theme": {
                    "type": "object",
                    "properties": {
                      "primaryColor": {
                        "type": "string",
                        "pattern": "^#[0-9a-fA-F]{3,8}$"
                      },
                      "bgColor": {
                        "type": "string",
                        "pattern": "^#[0-9a-fA-F]{3,8}$"
                      },
                      "textColor": {
                        "type": "string",
                        "pattern": "^#[0-9a-fA-F]{3,8}$"
                      },
                      "borderRadius": {
                        "type": "string",
                        "pattern": "^\\d+(\\.\\d+)?(px|rem|em)$"
                      },
                      "fontFamily": {
                        "type": "string",
                        "enum": [
                          "'Inter', sans-serif",
                          "'Space Grotesk', sans-serif",
                          "'JetBrains Mono', monospace",
                          "'DM Sans', sans-serif",
                          "'IBM Plex Sans', sans-serif",
                          "'Nunito', sans-serif",
                          "system-ui, sans-serif"
                        ]
                      },
                      "darkMode": {
                        "type": "boolean"
                      }
                    }
                  },
                  "autoIncident": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "slug"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created status page.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "status_pages:write"
        ]
      }
    },
    "/status-pages/{id}": {
      "get": {
        "operationId": "getStatusPage",
        "summary": "Get a status page",
        "description": "Full configuration: components and groups, branding, domain and publication state.",
        "tags": [
          "Status pages"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The status page.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusPage"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "status_pages:read"
        ]
      },
      "put": {
        "operationId": "updateStatusPage",
        "summary": "Update a status page",
        "description": "Replaces the page's configuration — components, grouping, theme and copy.",
        "tags": [
          "Status pages"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 60,
                    "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "customDomain": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "privacyPolicyUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2048,
                        "format": "uri"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "monitors": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "componentGroups": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "monitorIds": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        },
                        "sortOrder": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "monitorIds",
                        "sortOrder"
                      ]
                    }
                  },
                  "template": {
                    "type": "string",
                    "enum": [
                      "classic",
                      "minimal",
                      "dashboard"
                    ]
                  },
                  "theme": {
                    "type": "object",
                    "properties": {
                      "primaryColor": {
                        "type": "string",
                        "pattern": "^#[0-9a-fA-F]{3,8}$"
                      },
                      "bgColor": {
                        "type": "string",
                        "pattern": "^#[0-9a-fA-F]{3,8}$"
                      },
                      "textColor": {
                        "type": "string",
                        "pattern": "^#[0-9a-fA-F]{3,8}$"
                      },
                      "borderRadius": {
                        "type": "string",
                        "pattern": "^\\d+(\\.\\d+)?(px|rem|em)$"
                      },
                      "fontFamily": {
                        "type": "string",
                        "enum": [
                          "'Inter', sans-serif",
                          "'Space Grotesk', sans-serif",
                          "'JetBrains Mono', monospace",
                          "'DM Sans', sans-serif",
                          "'IBM Plex Sans', sans-serif",
                          "'Nunito', sans-serif",
                          "system-ui, sans-serif"
                        ]
                      },
                      "darkMode": {
                        "type": "boolean"
                      }
                    }
                  },
                  "autoIncident": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated status page.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "status_pages:write"
        ]
      },
      "delete": {
        "operationId": "deleteStatusPage",
        "summary": "Delete a status page",
        "description": "Permanently deletes the page, its incidents and its subscribers, and takes any custom domain offline. Irreversible, and visible to the public immediately.",
        "tags": [
          "Status pages"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted."
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "status_pages:delete"
        ]
      }
    },
    "/status-pages/{id}/favicon": {
      "post": {
        "operationId": "uploadStatusPageFavicon",
        "summary": "Upload a favicon",
        "description": "Uploads the page's favicon as `multipart/form-data`.",
        "tags": [
          "Status pages"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "contentEncoding": "binary",
                    "minLength": 1,
                    "maxLength": 1048576
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The status page with its new favicon URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusPage"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "status_pages:write"
        ]
      },
      "delete": {
        "operationId": "removeStatusPageFavicon",
        "summary": "Remove the favicon",
        "description": "Removes the favicon and reverts to the default.",
        "tags": [
          "Status pages"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The status page without a favicon.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusPage"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "status_pages:write"
        ]
      }
    },
    "/status-pages/{id}/incidents": {
      "get": {
        "operationId": "listStatusPageIncidents",
        "summary": "List a status page's incidents",
        "description": "Incidents attached to this page, newest first.",
        "tags": [
          "Status pages",
          "Incidents"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Incidents.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IncidentList"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "incidents:read"
        ]
      },
      "post": {
        "operationId": "createStatusPageIncident",
        "summary": "Open an incident on a status page",
        "description": "Opens an incident scoped to this page. Equivalent to `createIncident` with the page id supplied in the path.",
        "tags": [
          "Status pages",
          "Incidents"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 5000
                  },
                  "severity": {
                    "default": "NONE",
                    "type": "string",
                    "enum": [
                      "NONE",
                      "MINOR",
                      "MAJOR",
                      "CRITICAL"
                    ]
                  },
                  "status": {
                    "default": "INVESTIGATING",
                    "type": "string",
                    "enum": [
                      "INVESTIGATING",
                      "IDENTIFIED",
                      "MONITORING",
                      "RESOLVED"
                    ]
                  },
                  "affectedComponents": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  }
                },
                "required": [
                  "title",
                  "message"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The opened incident.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Incident"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "incidents:write"
        ]
      }
    },
    "/status-pages/{id}/incidents/{incidentId}/resolve": {
      "patch": {
        "operationId": "resolveStatusPageIncident",
        "summary": "Resolve an incident",
        "description": "Marks the incident resolved and notifies subscribers.",
        "tags": [
          "Status pages",
          "Incidents"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "incidentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The resolved incident.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Incident"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "incidents:write"
        ]
      }
    },
    "/status-pages/{id}/incidents/{incidentId}/updates": {
      "post": {
        "operationId": "addStatusPageIncidentUpdate",
        "summary": "Post an incident update",
        "description": "Appends a public update to the incident timeline and notifies subscribers.",
        "tags": [
          "Status pages",
          "Incidents"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "incidentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 5000
                  },
                  "severity": {
                    "type": "string",
                    "enum": [
                      "NONE",
                      "MINOR",
                      "MAJOR",
                      "CRITICAL"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "INVESTIGATING",
                      "IDENTIFIED",
                      "MONITORING",
                      "RESOLVED"
                    ]
                  },
                  "affectedComponents": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The posted update.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IncidentUpdate"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "incidents:write"
        ]
      }
    },
    "/status-pages/{id}/logo": {
      "post": {
        "operationId": "uploadStatusPageLogo",
        "summary": "Upload a logo",
        "description": "Uploads the page's logo as `multipart/form-data`. Accepted image types and the size ceiling are enforced server-side; the file is served from the customer asset CDN.",
        "tags": [
          "Status pages"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "contentEncoding": "binary",
                    "minLength": 1,
                    "maxLength": 1048576
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The status page with its new logo URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusPage"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "status_pages:write"
        ]
      },
      "delete": {
        "operationId": "removeStatusPageLogo",
        "summary": "Remove the logo",
        "description": "Removes the logo and reverts to the default header.",
        "tags": [
          "Status pages"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The status page without a logo.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusPage"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "status_pages:write"
        ]
      }
    },
    "/status-pages/{id}/publish": {
      "post": {
        "operationId": "publishStatusPage",
        "summary": "Publish a status page",
        "description": "Makes the page publicly reachable at its slug and any verified custom domain.",
        "tags": [
          "Status pages"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The published status page.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "status_pages:write"
        ]
      }
    },
    "/status-pages/{id}/regenerate-key": {
      "post": {
        "operationId": "regeneratePublishableKey",
        "summary": "Regenerate the publishable key",
        "description": "Issues a new publishable key for the embed API and invalidates the old one immediately — every embedded widget using it stops working until updated.",
        "tags": [
          "Status pages"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The status page with its new key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusPage"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "status_pages:write"
        ]
      }
    },
    "/status-pages/{id}/rotate-preview-token": {
      "post": {
        "operationId": "rotateStatusPagePreviewToken",
        "summary": "Rotate the preview token",
        "description": "Issues a new private preview link and revokes the old one. Use after sharing a preview with someone who should no longer have access.",
        "tags": [
          "Status pages"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The status page with its new preview token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusPage"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "status_pages:write"
        ]
      }
    },
    "/status-pages/{id}/unpublish": {
      "post": {
        "operationId": "unpublishStatusPage",
        "summary": "Unpublish a status page",
        "description": "Takes the page offline. Visitors get a 404; the configuration is kept.",
        "tags": [
          "Status pages"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The unpublished status page.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "status_pages:write"
        ]
      }
    },
    "/status-pages/{id}/verify-domain": {
      "post": {
        "operationId": "verifyStatusPageDomain",
        "summary": "Verify a custom domain",
        "description": "Checks the DNS records for the page's custom domain and, once they resolve correctly, starts certificate issuance. Safe to retry while DNS propagates.",
        "tags": [
          "Status pages"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Verification outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusPage"
                }
              }
            }
          },
          "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"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "status_pages:write"
        ]
      }
    },
    "/workspaces": {
      "get": {
        "operationId": "listMyWorkspaces",
        "summary": "List the workspaces you can act in",
        "description": "Every workspace the caller owns or belongs to, with the role held in each and which one their requests currently run in. Deliberately cross-tenant: it resolves no workspace of its own, so it keeps answering when the selected workspace is no longer available — which is how a client discovers a valid one and recovers.",
        "tags": [
          "Workspace"
        ],
        "responses": {
          "200": {
            "description": "Workspaces, by name.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workspaces": {
                      "readOnly": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "OWNER",
                              "ADMIN",
                              "MEMBER"
                            ]
                          },
                          "isActive": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "slug",
                          "role",
                          "isActive"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "workspaces"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenSessionOnly"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ]
      }
    },
    "/workspaces/active": {
      "post": {
        "operationId": "setActiveWorkspace",
        "summary": "Choose which workspace to act in",
        "description": "Points the CURRENT session at one of the caller's workspaces; other sessions are untouched, so switching on a laptop leaves a phone where it was. Membership is checked first, and re-checked on every subsequent request — the selection is a preference, never a grant. Answers 404 for a workspace the caller has no claim on, the same as for one that does not exist, so this cannot be used to discover which ids are real.",
        "tags": [
          "Workspace"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workspaceId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "workspaceId"
                ]
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Switched."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenSessionOnly"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ]
      }
    },
    "/workspaces/activity": {
      "get": {
        "operationId": "getWorkspaceActivity",
        "summary": "Recent workspace activity",
        "description": "A feed of recent status changes and incidents across the workspace.",
        "tags": [
          "Workspace"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Activity, newest first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceActivity"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ]
      }
    },
    "/workspaces/current": {
      "get": {
        "operationId": "getCurrentWorkspace",
        "summary": "Get the current workspace",
        "description": "The workspace the credential acts in, with its plan. Combined with the capability list on the credential, this is how an agent learns what it is allowed to do.",
        "tags": [
          "Workspace"
        ],
        "responses": {
          "200": {
            "description": "The workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CurrentWorkspace"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ]
      },
      "put": {
        "operationId": "updateCurrentWorkspace",
        "summary": "Update workspace settings",
        "description": "Changes the workspace name and settings. Session-only.",
        "tags": [
          "Workspace"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 60,
                    "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CurrentWorkspace"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenSessionOnly"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "workspace:manage"
        ]
      }
    },
    "/workspaces/invitations": {
      "get": {
        "operationId": "listWorkspaceInvitations",
        "summary": "List pending invitations",
        "description": "Invitations that have been sent and not yet accepted or declined.",
        "tags": [
          "Workspace"
        ],
        "responses": {
          "200": {
            "description": "Invitations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ]
      },
      "post": {
        "operationId": "createWorkspaceInvitation",
        "summary": "Invite a member",
        "description": "Emails an invitation with a join link. Session-only.",
        "tags": [
          "Workspace"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  },
                  "role": {
                    "default": "MEMBER",
                    "type": "string",
                    "enum": [
                      "ADMIN",
                      "MEMBER"
                    ]
                  }
                },
                "required": [
                  "email"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created invitation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenSessionOnly"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "members:manage"
        ]
      }
    },
    "/workspaces/invitations/{id}": {
      "delete": {
        "operationId": "cancelWorkspaceInvitation",
        "summary": "Cancel an invitation",
        "description": "Cancels a pending invitation and invalidates its link. Session-only.",
        "tags": [
          "Workspace"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cancelled."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenSessionOnly"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "members:manage"
        ]
      }
    },
    "/workspaces/invitations/{id}/resend": {
      "post": {
        "operationId": "resendWorkspaceInvitation",
        "summary": "Resend an invitation",
        "description": "Sends the invitation email again. Session-only.",
        "tags": [
          "Workspace"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The invitation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenSessionOnly"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "members:manage"
        ]
      }
    },
    "/workspaces/invitations/accept": {
      "post": {
        "operationId": "acceptWorkspaceInvitation",
        "summary": "Accept an invitation",
        "description": "Joins the workspace using an invitation token. Requires a signed-in user.",
        "tags": [
          "Workspace"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "token"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The workspace joined.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workspaceId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "workspaceId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenSessionOnly"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ]
      }
    },
    "/workspaces/invitations/decline": {
      "post": {
        "operationId": "declineWorkspaceInvitation",
        "summary": "Decline an invitation",
        "description": "Declines an invitation and invalidates its token.",
        "tags": [
          "Workspace"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "token"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Declined."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenSessionOnly"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ]
      }
    },
    "/workspaces/invitations/preview": {
      "get": {
        "operationId": "previewInvitation",
        "summary": "Describe an invitation link",
        "description": "What an invitation is for — workspace, inviter and role — readable before signing in, so accepting can be a decision rather than a side effect of opening a link. The token is the credential. Every failure past it answers a generic 404: telling a cancelled invitation apart from one that never existed would let a caller probe for valid tokens.",
        "tags": [
          "Workspace"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The invitation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workspaceName": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "ADMIN",
                        "MEMBER"
                      ]
                    },
                    "inviterName": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "email": {
                      "type": "string"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                    }
                  },
                  "required": [
                    "workspaceName",
                    "role",
                    "inviterName",
                    "email",
                    "expiresAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": []
      }
    },
    "/workspaces/members": {
      "get": {
        "operationId": "listWorkspaceMembers",
        "summary": "List members",
        "description": "Members of the workspace and their roles.",
        "tags": [
          "Workspace"
        ],
        "responses": {
          "200": {
            "description": "Members.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ]
      }
    },
    "/workspaces/members/{id}": {
      "patch": {
        "operationId": "changeMemberRole",
        "summary": "Change a member's role",
        "description": "Changes a member's role. Session-only — no API key can carry `members:manage`.",
        "tags": [
          "Workspace"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "ADMIN",
                      "MEMBER"
                    ]
                  }
                },
                "required": [
                  "role"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated membership.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenSessionOnly"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "members:manage"
        ]
      },
      "delete": {
        "operationId": "removeWorkspaceMember",
        "summary": "Remove a member",
        "description": "Removes a member from the workspace. Session-only.",
        "tags": [
          "Workspace"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Removed."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenSessionOnly"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "x-glowo-required-capabilities": [
          "members:manage"
        ]
      }
    },
    "/workspaces/members/leave": {
      "post": {
        "operationId": "leaveWorkspace",
        "summary": "Leave the workspace",
        "description": "Removes the calling user from the workspace. The last remaining owner cannot leave.",
        "tags": [
          "Workspace"
        ],
        "responses": {
          "201": {
            "description": "Left the workspace."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "sessionCookie": []
          }
        ]
      }
    }
  },
  "x-glowo-capabilities": {
    "monitors:read": "Read monitors and heartbeats",
    "monitors:write": "Create, update, pause and resume monitors; run on-demand checks",
    "monitors:delete": "Delete monitors",
    "status_pages:read": "Read status pages",
    "status_pages:write": "Create, update and publish status pages",
    "status_pages:delete": "Delete status pages",
    "incidents:read": "Read incidents",
    "incidents:write": "File, update, resolve and reopen incidents",
    "incidents:delete": "Delete incidents",
    "postmortems:read": "Read postmortems",
    "postmortems:write": "Write and publish postmortems",
    "postmortems:delete": "Delete postmortems",
    "notifications:read": "Read notification channels and delivery history",
    "notifications:write": "Manage notification channels and send tests",
    "notifications:delete": "Delete notification channels",
    "maintenance:write": "Schedule maintenance windows",
    "identity:read": "View workspace and plan"
  }
}
