{
  "swagger": "2.0",
  "info": {
    "description": "User management API with DDD architecture.",
    "title": "TT API (Public)",
    "contact": {},
    "version": "1.0"
  },
  "basePath": "/",
  "paths": {
    "/api/v1/account-invites/{token}/accept": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Accept an account invite by token. Any authenticated user can call this.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "account-invites"
        ],
        "summary": "Accept an account invite",
        "parameters": [
          {
            "type": "string",
            "description": "Invite token",
            "name": "token",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.acceptAccountInviteResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "409": {
            "description": "Conflict",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "410": {
            "description": "Gone",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Returns all accounts the authenticated user belongs to.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "accounts"
        ],
        "summary": "List accounts",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.accountResponse"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Creates a new account. The authenticated user becomes the owner.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "accounts"
        ],
        "summary": "Create an account",
        "parameters": [
          {
            "description": "Account to create",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createAccountRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.accountResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Returns account details. Caller must be a member.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "accounts"
        ],
        "summary": "Get an account",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.accountResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Rename an account. Only the owner can do this.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "accounts"
        ],
        "summary": "Update an account",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "description": "Fields to update",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.updateAccountRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.accountResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Soft-deletes the account. 30-day grace period for restoration.",
        "tags": [
          "accounts"
        ],
        "summary": "Delete an account (soft)",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/api-keys": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "List all API keys for an account. The key hash is never returned.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "account-api-keys"
        ],
        "summary": "List account API keys",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.accountAPIKeyResponse"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Generate a new account-scoped API key for Terraform or",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "account-api-keys"
        ],
        "summary": "Create an account API key",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "description": "API key details",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createAccountAPIKeyRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.createAccountAPIKeyResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/api-keys/{keyID}": {
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Revoke and delete an account API key. Requires owner or admin.",
        "tags": [
          "account-api-keys"
        ],
        "summary": "Delete an account API key",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "API Key ID",
            "name": "keyID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/comments": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Returns all top-level comments across all teams in the account.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "comments"
        ],
        "summary": "List comments across an account",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Start of time range (RFC3339)",
            "name": "from",
            "in": "query",
            "required": true
          },
          {
            "type": "string",
            "description": "End of time range (RFC3339)",
            "name": "to",
            "in": "query",
            "required": true
          },
          {
            "type": "boolean",
            "description": "Include resolved threads",
            "name": "include_resolved",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.commentResponse"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/incidents": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "incidents"
        ],
        "summary": "List account incidents",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Filter by status",
            "name": "status",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Filter by severity",
            "name": "severity",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Filter by tag",
            "name": "tag",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Start time (RFC3339)",
            "name": "from",
            "in": "query"
          },
          {
            "type": "string",
            "description": "End time (RFC3339)",
            "name": "to",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Max results (default 50)",
            "name": "limit",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Offset",
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.accountIncidentResponse"
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "incidents"
        ],
        "summary": "Create an account-level incident",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "description": "Incident",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createAccountIncidentRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.accountIncidentResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/incidents/{incidentID}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "incidents"
        ],
        "summary": "Get an account incident with details",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Incident ID",
            "name": "incidentID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.accountIncidentWithDetailsResponse"
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "incidents"
        ],
        "summary": "Update an account incident",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Incident ID",
            "name": "incidentID",
            "in": "path",
            "required": true
          },
          {
            "description": "Update",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.updateAccountIncidentRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.accountIncidentResponse"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "tags": [
          "incidents"
        ],
        "summary": "Delete an account incident",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Incident ID",
            "name": "incidentID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/incidents/{incidentID}/acknowledge": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Stops the no-ack timer at the current escalation level.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "incidents"
        ],
        "summary": "Acknowledge an incident escalation",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Incident ID",
            "name": "incidentID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/incidents/{incidentID}/monitors": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "tags": [
          "incidents"
        ],
        "summary": "Link monitors to an incident",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Incident ID",
            "name": "incidentID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/incidents/{incidentID}/monitors/{monitorID}": {
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "tags": [
          "incidents"
        ],
        "summary": "Unlink a monitor from an incident",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Incident ID",
            "name": "incidentID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/incidents/{incidentID}/status-pages": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "tags": [
          "incidents"
        ],
        "summary": "Publish an incident to status pages",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Incident ID",
            "name": "incidentID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/incidents/{incidentID}/status-pages/{pageID}": {
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "tags": [
          "incidents"
        ],
        "summary": "Unpublish an incident from a status page",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Incident ID",
            "name": "incidentID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/incidents/{incidentID}/updates": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "incidents"
        ],
        "summary": "Post an incident timeline update",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Incident ID",
            "name": "incidentID",
            "in": "path",
            "required": true
          },
          {
            "description": "Update",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.postAccountIncidentUpdateRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.accountIncidentUpdateResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/integrations/cloudflare-zone": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "List all Cloudflare zone integrations for an account. API tokens are masked.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "cf-zone-integrations"
        ],
        "summary": "List Cloudflare zone integrations",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.cfIntegrationResponse"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Create a Cloudflare zone integration for the account. Requires admin or owner role.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "cf-zone-integrations"
        ],
        "summary": "Create Cloudflare zone integration",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "description": "Integration config",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createCFIntegrationRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.cfIntegrationResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "409": {
            "description": "Conflict",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/integrations/cloudflare-zone/{integrationID}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a Cloudflare zone integration by ID. API token is masked.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "cf-zone-integrations"
        ],
        "summary": "Get Cloudflare zone integration",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Integration ID",
            "name": "integrationID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.cfIntegrationResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Update a Cloudflare zone integration. Requires admin or owner role.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "cf-zone-integrations"
        ],
        "summary": "Update Cloudflare zone integration",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Integration ID",
            "name": "integrationID",
            "in": "path",
            "required": true
          },
          {
            "description": "Fields to update",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.updateCFIntegrationRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.cfIntegrationResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Delete a Cloudflare zone integration. Requires admin or owner role.",
        "tags": [
          "cf-zone-integrations"
        ],
        "summary": "Delete Cloudflare zone integration",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Integration ID",
            "name": "integrationID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/integrations/pagerduty": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get the PagerDuty integration for an account. API key is masked.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "pagerduty-integrations"
        ],
        "summary": "Get PagerDuty integration",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.pdIntegrationResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Update the PagerDuty integration for an account. Requires admin or owner role.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "pagerduty-integrations"
        ],
        "summary": "Update PagerDuty integration",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "description": "Fields to update",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.updatePDIntegrationRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.pdIntegrationResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Create a PagerDuty integration for the account. Requires admin or owner role.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "pagerduty-integrations"
        ],
        "summary": "Create PagerDuty integration",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "description": "Integration config",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createPDIntegrationRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.pdIntegrationResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "409": {
            "description": "Conflict",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Delete the PagerDuty integration for an account. Requires admin or owner role.",
        "tags": [
          "pagerduty-integrations"
        ],
        "summary": "Delete PagerDuty integration",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/integrations/pagerduty/sync": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Trigger an immediate sync of PagerDuty incidents for the account. Requires admin or owner role.",
        "tags": [
          "pagerduty-integrations"
        ],
        "summary": "Force PagerDuty sync",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/integrations/slack-app": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "integrations"
        ],
        "summary": "Get Slack app installation",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.slackAppInstallResponse"
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "integrations"
        ],
        "summary": "Update Slack app installation",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "description": "Updated fields",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.slackAppInstallRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.slackAppInstallResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "integrations"
        ],
        "summary": "Connect Slack app",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "description": "Installation",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.slackAppInstallRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.slackAppInstallResponse"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "tags": [
          "integrations"
        ],
        "summary": "Disconnect Slack app",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/invites": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Returns all invites (pending, accepted, expired) for the account. Caller must be owner or admin.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "account-invites"
        ],
        "summary": "List account invites",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.accountInviteResponse"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Sends an email invite to join the account. Caller must be owner or admin.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "account-invites"
        ],
        "summary": "Create an account invite",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "description": "Invite details",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createAccountInviteRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.accountInviteResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/invites/{inviteID}": {
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Revoke a pending invite. Caller must be owner or admin.",
        "tags": [
          "account-invites"
        ],
        "summary": "Revoke an account invite",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Invite ID",
            "name": "inviteID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/members": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Returns all members of an account. Caller must be a member.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "accounts"
        ],
        "summary": "List account members",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.accountMemberResponse"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/members/{userID}": {
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Removes a user from the account and all its teams. Owner/admin can remove others.",
        "tags": [
          "accounts"
        ],
        "summary": "Remove a member from the account",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "User ID",
            "name": "userID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/members/{userID}/role": {
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Only the owner can change roles. Use transfer endpoint for ownership.",
        "consumes": [
          "application/json"
        ],
        "tags": [
          "accounts"
        ],
        "summary": "Change a member's account role",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "User ID",
            "name": "userID",
            "in": "path",
            "required": true
          },
          {
            "description": "New role",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.setAccountMemberRoleRequest"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/restore": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Restores a soft-deleted account within the 30-day grace period.",
        "tags": [
          "accounts"
        ],
        "summary": "Restore a deleted account",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "410": {
            "description": "Gone",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/services": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "services"
        ],
        "summary": "List services",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.serviceResponse"
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "services"
        ],
        "summary": "Create a service",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "description": "Service",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createServiceRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.serviceResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/services/{serviceID}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "services"
        ],
        "summary": "Get a service",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Service ID",
            "name": "serviceID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.serviceResponse"
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "services"
        ],
        "summary": "Update a service",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Service ID",
            "name": "serviceID",
            "in": "path",
            "required": true
          },
          {
            "description": "Update",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.updateServiceRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.serviceResponse"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "tags": [
          "services"
        ],
        "summary": "Delete a service",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Service ID",
            "name": "serviceID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/services/{serviceID}/analytics": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "services"
        ],
        "summary": "Get per-service incident analytics",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Service ID",
            "name": "serviceID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Start date (RFC3339)",
            "name": "from",
            "in": "query"
          },
          {
            "type": "string",
            "description": "End date (RFC3339)",
            "name": "to",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/service.IncidentAnalytics"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/services/{serviceID}/components": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "tags": [
          "services"
        ],
        "summary": "Link status page components to a service",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Service ID",
            "name": "serviceID",
            "in": "path",
            "required": true
          },
          {
            "description": "Component IDs",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.serviceLinkComponentsRequest"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/services/{serviceID}/components/{componentID}": {
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "tags": [
          "services"
        ],
        "summary": "Unlink a status page component from a service",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Service ID",
            "name": "serviceID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Component ID",
            "name": "componentID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/services/{serviceID}/dependencies": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Returns dependencies (services this one depends on) and dependents (services that depend on this one)",
        "produces": [
          "application/json"
        ],
        "tags": [
          "services"
        ],
        "summary": "Get service dependency graph",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Service ID",
            "name": "serviceID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "tags": [
          "services"
        ],
        "summary": "Add a service dependency",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Service ID",
            "name": "serviceID",
            "in": "path",
            "required": true
          },
          {
            "description": "Dependency",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.addDependencyRequest"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/services/{serviceID}/dependencies/{dependsOnID}": {
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "tags": [
          "services"
        ],
        "summary": "Remove a service dependency",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Service ID",
            "name": "serviceID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Depends-on Service ID",
            "name": "dependsOnID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/services/{serviceID}/impact": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Returns all services potentially affected if this service has an incident (recursive upstream dependents)",
        "produces": [
          "application/json"
        ],
        "tags": [
          "services"
        ],
        "summary": "Get impact analysis for a service",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Service ID",
            "name": "serviceID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/services/{serviceID}/incidents": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "tags": [
          "services"
        ],
        "summary": "Link incidents to a service",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Service ID",
            "name": "serviceID",
            "in": "path",
            "required": true
          },
          {
            "description": "Incident IDs",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.serviceLinkIncidentsRequest"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/services/{serviceID}/incidents/{incidentID}": {
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "tags": [
          "services"
        ],
        "summary": "Unlink an incident from a service",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Service ID",
            "name": "serviceID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Incident ID",
            "name": "incidentID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/services/{serviceID}/monitors": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "tags": [
          "services"
        ],
        "summary": "Link monitors to a service",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Service ID",
            "name": "serviceID",
            "in": "path",
            "required": true
          },
          {
            "description": "Monitor IDs",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.serviceLinkMonitorsRequest"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/services/{serviceID}/monitors/{monitorID}": {
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "tags": [
          "services"
        ],
        "summary": "Unlink a monitor from a service",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Service ID",
            "name": "serviceID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/services/{serviceID}/triggers": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "services"
        ],
        "summary": "List service triggers",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Service ID",
            "name": "serviceID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.triggerResponse"
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "services"
        ],
        "summary": "Create a service trigger",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Service ID",
            "name": "serviceID",
            "in": "path",
            "required": true
          },
          {
            "description": "Trigger",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createTriggerRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.triggerResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/services/{serviceID}/triggers/{triggerID}": {
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "tags": [
          "services"
        ],
        "summary": "Delete a service trigger",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Service ID",
            "name": "serviceID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Trigger ID",
            "name": "triggerID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/status-pages": {
      "get": {
        "description": "List all status pages for an account. Requires owner or admin role.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-pages"
        ],
        "summary": "List status pages",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.statusPageResponse"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Create a new status page for the account. Requires owner or admin role.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-pages"
        ],
        "summary": "Create a status page",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "description": "Status page to create",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createStatusPageRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.statusPageResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "409": {
            "description": "Conflict",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/status-pages/{pageID}": {
      "get": {
        "description": "Get status page details. Requires owner or admin role.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-pages"
        ],
        "summary": "Get a status page",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.statusPageResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "put": {
        "description": "Update status page settings. Slug cannot be changed. Requires owner or admin role.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-pages"
        ],
        "summary": "Update a status page",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "description": "Fields to update",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.updateStatusPageRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.statusPageResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "delete": {
        "description": "Delete a status page and all its components, groups, incidents, etc. Requires owner or admin role.",
        "tags": [
          "status-pages"
        ],
        "summary": "Delete a status page",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/status-pages/{pageID}/component-groups": {
      "get": {
        "description": "List all component groups on a status page. Requires owner or admin role.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-page-component-groups"
        ],
        "summary": "List component groups",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.componentGroupResponse"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Create a new component group on a status page. Requires owner or admin role.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-page-component-groups"
        ],
        "summary": "Create a component group",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "description": "Group to create",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createComponentGroupRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.componentGroupResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/status-pages/{pageID}/component-groups/{groupID}": {
      "put": {
        "description": "Update a component group's name, description, position, or collapsed state.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-page-component-groups"
        ],
        "summary": "Update a component group",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Group ID",
            "name": "groupID",
            "in": "path",
            "required": true
          },
          {
            "description": "Fields to update",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.updateComponentGroupRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.componentGroupResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "delete": {
        "description": "Delete a component group. Components in the group become ungrouped.",
        "tags": [
          "status-page-component-groups"
        ],
        "summary": "Delete a component group",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Group ID",
            "name": "groupID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/status-pages/{pageID}/components": {
      "get": {
        "description": "List all components on a status page. Requires owner or admin role.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-page-components"
        ],
        "summary": "List components",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.componentResponse"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Create a new component on a status page. Requires owner or admin role.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-page-components"
        ],
        "summary": "Create a component",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "description": "Component to create",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createComponentRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.componentResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/status-pages/{pageID}/components/{compID}": {
      "put": {
        "description": "Update a component's name, description, group, status, position, or uptime display setting.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-page-components"
        ],
        "summary": "Update a component",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Component ID",
            "name": "compID",
            "in": "path",
            "required": true
          },
          {
            "description": "Fields to update",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.updateComponentRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.componentResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "delete": {
        "description": "Delete a component from a status page.",
        "tags": [
          "status-page-components"
        ],
        "summary": "Delete a component",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Component ID",
            "name": "compID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/status-pages/{pageID}/components/{compID}/triggers": {
      "get": {
        "description": "List all triggers linked to a component. Requires owner or admin role.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-page-triggers"
        ],
        "summary": "List triggers for a component",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Component ID",
            "name": "compID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.triggerResponse"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Link a monitor to a component for auto-incident creation. Requires owner or admin role.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-page-triggers"
        ],
        "summary": "Create a trigger",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Component ID",
            "name": "compID",
            "in": "path",
            "required": true
          },
          {
            "description": "Trigger to create",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.spCreateTriggerRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.spTriggerResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/status-pages/{pageID}/components/{compID}/triggers/{triggerID}": {
      "put": {
        "description": "Update trigger severity, auto_create, auto_resolve, or notify_subscribers.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-page-triggers"
        ],
        "summary": "Update a trigger",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Component ID",
            "name": "compID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Trigger ID",
            "name": "triggerID",
            "in": "path",
            "required": true
          },
          {
            "description": "Fields to update",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.spUpdateTriggerRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.spTriggerResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "delete": {
        "description": "Remove a trigger link between a monitor and a component.",
        "tags": [
          "status-page-triggers"
        ],
        "summary": "Delete a trigger",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Component ID",
            "name": "compID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Trigger ID",
            "name": "triggerID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/status-pages/{pageID}/incident-templates": {
      "get": {
        "description": "List all incident templates for a status page.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-page-incident-templates"
        ],
        "summary": "List incident templates",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.incidentTemplateResponse"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Create a pre-filled incident template for quick incident creation.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-page-incident-templates"
        ],
        "summary": "Create an incident template",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "description": "Template to create",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createIncidentTemplateRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.incidentTemplateResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/status-pages/{pageID}/incident-templates/{templateID}": {
      "put": {
        "description": "Update an incident template's fields.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-page-incident-templates"
        ],
        "summary": "Update an incident template",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Template ID",
            "name": "templateID",
            "in": "path",
            "required": true
          },
          {
            "description": "Fields to update",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.updateIncidentTemplateRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.incidentTemplateResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "delete": {
        "description": "Remove an incident template from a status page.",
        "tags": [
          "status-page-incident-templates"
        ],
        "summary": "Delete an incident template",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Template ID",
            "name": "templateID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/status-pages/{pageID}/incidents": {
      "get": {
        "description": "List incidents for a status page, optionally filtered by status. Requires owner or admin role.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-page-incidents"
        ],
        "summary": "List incidents",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Filter by status",
            "name": "status",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Max results (default 50)",
            "name": "limit",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Offset for pagination",
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.incidentResponse"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Create a new incident on a status page. Auto-sets component status based on severity. Requires owner or admin role.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-page-incidents"
        ],
        "summary": "Create an incident",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "description": "Incident to create",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createIncidentRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.incidentResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/status-pages/{pageID}/incidents/{incidentID}": {
      "get": {
        "description": "Get incident details including timeline updates. Requires owner or admin role.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-page-incidents"
        ],
        "summary": "Get an incident with updates",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Incident ID",
            "name": "incidentID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.incidentWithUpdatesResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "put": {
        "description": "Update incident name, status, severity, or message. Status can only move forward.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-page-incidents"
        ],
        "summary": "Update an incident",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Incident ID",
            "name": "incidentID",
            "in": "path",
            "required": true
          },
          {
            "description": "Fields to update",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.updateIncidentRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.incidentResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "delete": {
        "description": "Delete an incident and all its updates.",
        "tags": [
          "status-page-incidents"
        ],
        "summary": "Delete an incident",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Incident ID",
            "name": "incidentID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/status-pages/{pageID}/incidents/{incidentID}/my/notifications": {
      "get": {
        "description": "Returns the resolved notification channels for incident reminders (override or defaults).",
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-page-incidents"
        ],
        "summary": "Get incident reminder notification settings",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Incident ID",
            "name": "incidentID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.myNotificationsResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "put": {
        "description": "Create or replace a per-incident notification override for reminders.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-page-incidents"
        ],
        "summary": "Set incident reminder notification override",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Incident ID",
            "name": "incidentID",
            "in": "path",
            "required": true
          },
          {
            "description": "Channel IDs",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.setNotificationsRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.myNotificationsResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "delete": {
        "description": "Delete the per-incident override, reverting to account defaults.",
        "tags": [
          "status-page-incidents"
        ],
        "summary": "Remove incident reminder notification override",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Incident ID",
            "name": "incidentID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/status-pages/{pageID}/incidents/{incidentID}/updates": {
      "post": {
        "description": "Post a timeline update to an incident. Transitions the incident status forward.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-page-incidents"
        ],
        "summary": "Post an incident update",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Incident ID",
            "name": "incidentID",
            "in": "path",
            "required": true
          },
          {
            "description": "Update to post",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.postIncidentUpdateRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.incidentUpdateResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/status-pages/{pageID}/maintenances": {
      "get": {
        "description": "List maintenances for a status page. Requires owner or admin role.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-page-maintenances"
        ],
        "summary": "List maintenances",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "Max results (default 50)",
            "name": "limit",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Offset for pagination",
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.maintenanceResponse"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Create a new maintenance window on a status page. Requires owner or admin role.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-page-maintenances"
        ],
        "summary": "Create a scheduled maintenance",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "description": "Maintenance to create",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createMaintenanceRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.maintenanceResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/status-pages/{pageID}/maintenances/{maintID}": {
      "get": {
        "description": "Get maintenance details including timeline updates. Requires owner or admin role.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-page-maintenances"
        ],
        "summary": "Get a maintenance with updates",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Maintenance ID",
            "name": "maintID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.maintenanceWithUpdatesResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "put": {
        "description": "Update maintenance fields. Can extend duration on in-progress maintenances. Requires owner or admin role.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-page-maintenances"
        ],
        "summary": "Update a maintenance",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Maintenance ID",
            "name": "maintID",
            "in": "path",
            "required": true
          },
          {
            "description": "Fields to update",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.updateMaintenanceRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.maintenanceResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "delete": {
        "description": "Delete a maintenance and all its updates.",
        "tags": [
          "status-page-maintenances"
        ],
        "summary": "Delete a maintenance",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Maintenance ID",
            "name": "maintID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/status-pages/{pageID}/maintenances/{maintID}/updates": {
      "post": {
        "description": "Post a timeline update to a maintenance. Can transition status forward.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-page-maintenances"
        ],
        "summary": "Post a maintenance update",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Maintenance ID",
            "name": "maintID",
            "in": "path",
            "required": true
          },
          {
            "description": "Update to post",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.postMaintenanceUpdateRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.maintenanceUpdateResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/status-pages/{pageID}/subscribers": {
      "get": {
        "description": "List all subscribers for a status page. Requires owner or admin role.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "status-page-subscribers"
        ],
        "summary": "List subscribers",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "Max results (default 50)",
            "name": "limit",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Offset for pagination",
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.subscriberResponse"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/status-pages/{pageID}/subscribers/{subscriberID}": {
      "delete": {
        "description": "Remove a subscriber from a status page. Requires owner or admin role.",
        "tags": [
          "status-page-subscribers"
        ],
        "summary": "Remove a subscriber",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status Page ID",
            "name": "pageID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Subscriber ID",
            "name": "subscriberID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/subscription": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Returns the account's current plan, status, and founding member info. Owner or billing_admin only.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "accounts"
        ],
        "summary": "Get subscription details",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.subscriptionResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Changes the account's plan. Owner or billing_admin only. In Phase 3, plan changes are immediate (no payment provider).",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "accounts"
        ],
        "summary": "Change subscription plan",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "description": "New plan",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.updateSubscriptionRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.subscriptionResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/teams": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Returns all teams under the account. Caller must be a member.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "accounts"
        ],
        "summary": "List teams in the account",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.teamResponse"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Creates a new team under the account. Caller must be an account member.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "accounts"
        ],
        "summary": "Create a team under the account",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "description": "Team to create",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createTeamRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.teamResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountID}/transfer": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Atomically transfers ownership to another account member. Current owner becomes admin.",
        "consumes": [
          "application/json"
        ],
        "tags": [
          "accounts"
        ],
        "summary": "Transfer account ownership",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "description": "New owner",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.transferOwnershipRequest"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/alert-channels/verify": {
      "get": {
        "description": "Public endpoint called when the recipient clicks the email verification link.",
        "tags": [
          "alert-channels"
        ],
        "summary": "Verify an alert channel via email link",
        "parameters": [
          {
            "type": "string",
            "description": "Verification token",
            "name": "token",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/geo/regions": {
      "get": {
        "description": "Returns countries and macro-regions that have at least one online checker visible to the calling user.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "geo"
        ],
        "summary": "List geo regions",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.geoRegionsResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/integrations/events/{integrationKey}": {
      "post": {
        "description": "Create or resolve incidents via integration key. Compatible with PagerDuty Events API v2 pattern.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "integrations"
        ],
        "summary": "Ingest external alert event",
        "parameters": [
          {
            "type": "string",
            "description": "Service integration key",
            "name": "integrationKey",
            "in": "path",
            "required": true
          },
          {
            "description": "Event",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.integrationEventRequest"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "schema": {
              "$ref": "#/definitions/handler.integrationEventResponse"
            }
          }
        }
      }
    },
    "/api/v1/invites/{token}/accept": {
      "post": {
        "description": "Accept an invite by token. Any authenticated user can call this. The user is added as a member.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "invites"
        ],
        "summary": "Accept a team invite",
        "parameters": [
          {
            "type": "string",
            "description": "Invite token",
            "name": "token",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.acceptInviteResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "409": {
            "description": "Conflict",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "410": {
            "description": "Gone",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/me": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Returns the profile of the user identified by the Bearer token",
        "produces": [
          "application/json"
        ],
        "tags": [
          "me"
        ],
        "summary": "Get current user",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.userResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/me/accounts/{accountID}/notification-defaults": {
      "get": {
        "description": "Get the caller's default notification channel IDs for an account.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "notification-defaults"
        ],
        "summary": "Get notification defaults",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.notificationDefaultsResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "put": {
        "description": "Replace the caller's default notification channels for an account.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "notification-defaults"
        ],
        "summary": "Set notification defaults",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "accountID",
            "in": "path",
            "required": true
          },
          {
            "description": "Channel IDs",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.setNotificationDefaultsRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.notificationDefaultsResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/me/alert-channels": {
      "get": {
        "description": "List the calling user's account-level personal channels.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "account-personal-alert-channels"
        ],
        "summary": "List account-level personal alert channels",
        "parameters": [
          {
            "type": "string",
            "description": "Account ID",
            "name": "account_id",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.alertChannelResponse"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Create a personal alert channel scoped to an account (for status page subscriptions).",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "account-personal-alert-channels"
        ],
        "summary": "Create an account-level personal alert channel",
        "parameters": [
          {
            "description": "Channel to create",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createAccountPersonalChannelRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.alertChannelResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/me/alert-channels/copy": {
      "post": {
        "description": "Clone the caller's personal alert channels from one account to another.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "account-personal-alert-channels"
        ],
        "summary": "Copy personal channels between accounts",
        "parameters": [
          {
            "description": "Source and target account IDs",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.copyChannelsRequest"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/me/alert-channels/{channelID}": {
      "put": {
        "description": "Update an account-level personal channel owned by the calling user.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "account-personal-alert-channels"
        ],
        "summary": "Update an account-level personal alert channel",
        "parameters": [
          {
            "type": "string",
            "description": "Channel ID",
            "name": "channelID",
            "in": "path",
            "required": true
          },
          {
            "description": "Fields to update",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.updateAlertChannelRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.alertChannelResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "delete": {
        "description": "Delete an account-level personal channel owned by the calling user.",
        "tags": [
          "account-personal-alert-channels"
        ],
        "summary": "Delete an account-level personal alert channel",
        "parameters": [
          {
            "type": "string",
            "description": "Channel ID",
            "name": "channelID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/me/alert-channels/{channelID}/test": {
      "post": {
        "description": "Send a test notification pair to verify an account-level personal channel. When status_page_name is provided, the notification is formatted as a status page incident instead of a monitor alert.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "account-personal-alert-channels"
        ],
        "summary": "Send a test notification to an account-level personal channel",
        "parameters": [
          {
            "type": "string",
            "description": "Channel ID",
            "name": "channelID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Status page name (switches to incident-style formatting)",
            "name": "status_page_name",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.testAlertResultResponse"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/me/alert-channels/{channelID}/verify": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Submit a 6-digit OTP code to verify an SMS or WhatsApp channel. Requires authentication.",
        "tags": [
          "alert-channels"
        ],
        "summary": "Verify an alert channel via OTP code",
        "parameters": [
          {
            "type": "string",
            "description": "Channel ID",
            "name": "channelID",
            "in": "path",
            "required": true
          },
          {
            "description": "OTP code",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.verifyChannelOTPRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.alertChannelResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/me/alert-channels/{channelID}/verify/resend": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Resend the verification message for an unverified channel. Rate limits: email 5/24h, SMS 3/h.",
        "tags": [
          "alert-channels"
        ],
        "summary": "Resend channel verification",
        "parameters": [
          {
            "type": "string",
            "description": "Channel ID",
            "name": "channelID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/me/devices": {
      "get": {
        "description": "Returns all push device tokens for the authenticated user.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "push-notifications"
        ],
        "summary": "List registered push devices",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.pushDeviceResponse"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Registers an Expo push token for the authenticated user. Upserts if token exists.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "push-notifications"
        ],
        "summary": "Register a push device token",
        "parameters": [
          {
            "description": "Device to register",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.registerDeviceRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.pushDeviceResponse"
            }
          },
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.pushDeviceResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/me/devices/{token}": {
      "delete": {
        "description": "Removes a push device token for the authenticated user.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "push-notifications"
        ],
        "summary": "Unregister a push device token",
        "parameters": [
          {
            "type": "string",
            "description": "Push token (URL-encoded)",
            "name": "token",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/me/email": {
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Sets the user's email address and triggers verification. Resets email_verified to false.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "me"
        ],
        "summary": "Set or change email",
        "parameters": [
          {
            "description": "New email",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.setEmailRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.setEmailResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "409": {
            "description": "Conflict",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/me/email/verify": {
      "get": {
        "description": "Verifies the user's email using the token from the verification email. Redirects to the SPA.",
        "tags": [
          "me"
        ],
        "summary": "Verify email via token",
        "parameters": [
          {
            "type": "string",
            "description": "Verification token",
            "name": "token",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "302": {
            "description": "Redirect to SPA"
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/me/email/verify/resend": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Resends the email verification link. Rate limited to 5 per 24 hours.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "me"
        ],
        "summary": "Resend verification email",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/me/notification-preferences": {
      "get": {
        "description": "Returns the notification preferences for the authenticated user.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "push-notifications"
        ],
        "summary": "Get notification preferences",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.notificationPreferencesResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "put": {
        "description": "Creates or updates notification preferences for the authenticated user.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "push-notifications"
        ],
        "summary": "Update notification preferences",
        "parameters": [
          {
            "description": "Preferences",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.updateNotificationPreferencesRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.notificationPreferencesResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/me/status-page-subscriptions": {
      "get": {
        "description": "List all status page subscriptions for the authenticated user.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "my-status-page-subscriptions"
        ],
        "summary": "List my status page subscriptions",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.subscriberResponse"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Subscribe to status page updates. Notifications delivered via personal alert channels.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "my-status-page-subscriptions"
        ],
        "summary": "Subscribe to a status page (authenticated)",
        "parameters": [
          {
            "description": "Subscription details",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.authSubscribeRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.subscriberResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "409": {
            "description": "Conflict",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/me/status-page-subscriptions/{subID}": {
      "put": {
        "description": "Update the scope and targeting for a subscription.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "my-status-page-subscriptions"
        ],
        "summary": "Update a status page subscription",
        "parameters": [
          {
            "type": "string",
            "description": "Subscription ID",
            "name": "subID",
            "in": "path",
            "required": true
          },
          {
            "description": "Updated scope",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.updateAuthSubscriptionRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.subscriberResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "delete": {
        "description": "Remove a status page subscription for the authenticated user.",
        "tags": [
          "my-status-page-subscriptions"
        ],
        "summary": "Unsubscribe from a status page",
        "parameters": [
          {
            "type": "string",
            "description": "Subscription ID",
            "name": "subID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/me/status-page-subscriptions/{subID}/test": {
      "post": {
        "description": "Send a test notification to all channels linked to a status page subscription. Only the subscription owner may call this.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "my-status-page-subscriptions"
        ],
        "summary": "Send test notifications for a subscription",
        "parameters": [
          {
            "type": "string",
            "description": "Subscription ID",
            "name": "subID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.testSubscriptionResultResponse"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/me/subscriptions/{subID}/notifications": {
      "get": {
        "description": "Returns the resolved notification channels for a subscription (override or defaults).",
        "produces": [
          "application/json"
        ],
        "tags": [
          "my-status-page-subscriptions"
        ],
        "summary": "Get subscription notification settings",
        "parameters": [
          {
            "type": "string",
            "description": "Subscription ID",
            "name": "subID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.myNotificationsResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "put": {
        "description": "Create or replace a per-subscription notification override.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "my-status-page-subscriptions"
        ],
        "summary": "Set subscription notification override",
        "parameters": [
          {
            "type": "string",
            "description": "Subscription ID",
            "name": "subID",
            "in": "path",
            "required": true
          },
          {
            "description": "Channel IDs",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.setNotificationsRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.myNotificationsResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "delete": {
        "description": "Delete the per-subscription override, reverting to account defaults.",
        "tags": [
          "my-status-page-subscriptions"
        ],
        "summary": "Remove subscription notification override",
        "parameters": [
          {
            "type": "string",
            "description": "Subscription ID",
            "name": "subID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/me/telegram-link": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Creates a short-lived deep-link for connecting Telegram as an\naccount-level personal alert channel (used by status page subscriptions).",
        "produces": [
          "application/json"
        ],
        "tags": [
          "account-personal-alert-channels"
        ],
        "summary": "Generate an account-level Telegram deep-link",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.createLinkResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/me/telegram-link/{code}/status": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Polls the status of a previously created account-level deep-link code.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "account-personal-alert-channels"
        ],
        "summary": "Check account-level Telegram deep-link status",
        "parameters": [
          {
            "type": "string",
            "description": "Deep-link code",
            "name": "code",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.linkStatusResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/public/status-pages/unsubscribe": {
      "get": {
        "description": "Unsubscribe from status page updates via the unsubscribe token in notification emails.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "public-status-pages"
        ],
        "summary": "Unsubscribe via token",
        "parameters": [
          {
            "type": "string",
            "description": "Unsubscribe token",
            "name": "token",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Unsubscribed",
            "schema": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/public/status-pages/verify": {
      "get": {
        "description": "Verify an email subscription via the token sent in the verification email.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "public-status-pages"
        ],
        "summary": "Verify email subscription",
        "parameters": [
          {
            "type": "string",
            "description": "Verification token",
            "name": "token",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Subscription verified",
            "schema": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/public/status-pages/{slug}": {
      "get": {
        "description": "Get a status page by slug. Returns public-facing data only.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "public-status-pages"
        ],
        "summary": "Get public status page",
        "parameters": [
          {
            "type": "string",
            "description": "Status page slug",
            "name": "slug",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.publicStatusPageResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/public/status-pages/{slug}/auth": {
      "post": {
        "description": "Verify password for a password-protected status page. Returns 200 on success.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "public-status-pages"
        ],
        "summary": "Authenticate with status page password",
        "parameters": [
          {
            "type": "string",
            "description": "Status page slug",
            "name": "slug",
            "in": "path",
            "required": true
          },
          {
            "description": "Password",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.statusPageAuthRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Authenticated",
            "schema": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/public/status-pages/{slug}/component-groups": {
      "get": {
        "description": "List all component groups on a status page by slug.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "public-status-pages"
        ],
        "summary": "List public component groups",
        "parameters": [
          {
            "type": "string",
            "description": "Status page slug",
            "name": "slug",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.componentGroupResponse"
              }
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/public/status-pages/{slug}/components": {
      "get": {
        "description": "List all components on a status page by slug. Returns current status.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "public-status-pages"
        ],
        "summary": "List public components",
        "parameters": [
          {
            "type": "string",
            "description": "Status page slug",
            "name": "slug",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.componentResponse"
              }
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/public/status-pages/{slug}/components/{compID}/uptime": {
      "get": {
        "description": "Get daily uptime percentages for a component over the last N days. No auth required.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "public-status-pages"
        ],
        "summary": "Get component uptime history",
        "parameters": [
          {
            "type": "string",
            "description": "Status page slug",
            "name": "slug",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Component ID",
            "name": "compID",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "Number of days (default 90, max 365)",
            "name": "days",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/service.DailyUptime"
              }
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/public/status-pages/{slug}/incidents": {
      "get": {
        "description": "List incidents for a status page by slug. No auth required.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "public-status-pages"
        ],
        "summary": "List public incidents",
        "parameters": [
          {
            "type": "string",
            "description": "Status page slug",
            "name": "slug",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Filter by status",
            "name": "status",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Max results (default 50)",
            "name": "limit",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Offset for pagination",
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.incidentResponse"
              }
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/public/status-pages/{slug}/incidents/{incidentID}": {
      "get": {
        "description": "Get incident details with timeline updates by slug. No auth required.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "public-status-pages"
        ],
        "summary": "Get public incident with updates",
        "parameters": [
          {
            "type": "string",
            "description": "Status page slug",
            "name": "slug",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Incident ID",
            "name": "incidentID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.incidentWithUpdatesResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/public/status-pages/{slug}/maintenances": {
      "get": {
        "description": "List maintenances for a status page by slug. No auth required.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "public-status-pages"
        ],
        "summary": "List public maintenances",
        "parameters": [
          {
            "type": "string",
            "description": "Status page slug",
            "name": "slug",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "Max results (default 50)",
            "name": "limit",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Offset for pagination",
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.maintenanceResponse"
              }
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/public/status-pages/{slug}/rss": {
      "get": {
        "description": "Get an Atom feed of incidents and maintenances for a status page. No auth required.",
        "produces": [
          "application/atom+xml"
        ],
        "tags": [
          "public-status-pages"
        ],
        "summary": "RSS/Atom feed",
        "parameters": [
          {
            "type": "string",
            "description": "Status page slug",
            "name": "slug",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Atom XML feed",
            "schema": {
              "type": "string"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/public/status-pages/{slug}/subscribers": {
      "post": {
        "description": "Subscribe to status page updates via email. Sends a verification email.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "public-status-pages"
        ],
        "summary": "Subscribe via email",
        "parameters": [
          {
            "type": "string",
            "description": "Status page slug",
            "name": "slug",
            "in": "path",
            "required": true
          },
          {
            "description": "Subscription details",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.emailSubscribeRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Already subscribed",
            "schema": {
              "$ref": "#/definitions/handler.subscriberResponse"
            }
          },
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.subscriberResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/shares/{token}": {
      "get": {
        "description": "Returns metadata for a shared probe link. Public shares require no auth.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "shares"
        ],
        "summary": "Get share metadata",
        "parameters": [
          {
            "type": "string",
            "description": "Share token",
            "name": "token",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.shareMetadataResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "410": {
            "description": "Gone",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/shares/{token}/comments": {
      "get": {
        "description": "Returns comments within the share's time range. Only available if include_comments is enabled.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "shares"
        ],
        "summary": "List comments on a shared link",
        "parameters": [
          {
            "type": "string",
            "description": "Share token",
            "name": "token",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.commentResponse"
              }
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "410": {
            "description": "Gone",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/shares/{token}/probes": {
      "get": {
        "description": "Returns probes visible through the share link, with redacted fields stripped.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "shares"
        ],
        "summary": "List shared probes",
        "parameters": [
          {
            "type": "string",
            "description": "Share token",
            "name": "token",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "Page size (max 100)",
            "name": "limit",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Descending cursor (ISO 8601)",
            "name": "before",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Ascending cursor (ISO 8601)",
            "name": "after",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Filter by HTTP status code",
            "name": "status",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.probeListResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "410": {
            "description": "Gone",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/shares/{token}/probes/aggregate": {
      "get": {
        "description": "Returns time-series aggregated probe metrics for the shared data range.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "shares"
        ],
        "summary": "Aggregate shared probes",
        "parameters": [
          {
            "type": "string",
            "description": "Share token",
            "name": "token",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "Start (Unix epoch seconds)",
            "name": "from",
            "in": "query",
            "required": true
          },
          {
            "type": "integer",
            "description": "End (Unix epoch seconds)",
            "name": "to",
            "in": "query",
            "required": true
          },
          {
            "type": "string",
            "description": "Bucket duration",
            "name": "step",
            "in": "query",
            "required": true
          },
          {
            "type": "string",
            "description": "Aggregation function",
            "name": "agg",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.probeAggregationResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "410": {
            "description": "Gone",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/shares/{token}/probes/{probeID}/cf-log": {
      "get": {
        "description": "Returns the Cloudflare log entry linked to a probe within the share's time range.\nSensitive fields (client IP, origin IP, security rules) are redacted by default.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "shares"
        ],
        "summary": "Get CF log entry for a shared probe",
        "parameters": [
          {
            "type": "string",
            "description": "Share token",
            "name": "token",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Probe ID",
            "name": "probeID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.cfLogEntryResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "410": {
            "description": "Gone",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/shares/{token}/probes/{probeID}/details": {
      "get": {
        "description": "Returns the probe enriched with checker GEO, target GEO, CDN GEO, and CF log.\nRedaction groups are applied. Checker IP is masked when checker_ip is redacted.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "shares"
        ],
        "summary": "Get shared probe details with GEO context",
        "parameters": [
          {
            "type": "string",
            "description": "Share token",
            "name": "token",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Probe ID",
            "name": "probeID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.sharedProbeDetailsResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "410": {
            "description": "Gone",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/slack/commands": {
      "post": {
        "consumes": [
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "slack"
        ],
        "summary": "Handle Slack slash command",
        "responses": {}
      }
    },
    "/api/v1/slack/events": {
      "post": {
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "slack"
        ],
        "summary": "Handle Slack event",
        "responses": {}
      }
    },
    "/api/v1/slack/interactions": {
      "post": {
        "consumes": [
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "slack"
        ],
        "summary": "Handle Slack interaction",
        "responses": {}
      }
    },
    "/api/v1/teams": {
      "get": {
        "description": "Get teams the authenticated user belongs to",
        "produces": [
          "application/json"
        ],
        "tags": [
          "teams"
        ],
        "summary": "List teams for current user",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.teamResponse"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Creates a new team. The authenticated user becomes the owner.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "teams"
        ],
        "summary": "Create a team",
        "parameters": [
          {
            "description": "Team to create",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createTeamRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.teamResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{id}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a team by ID",
        "produces": [
          "application/json"
        ],
        "tags": [
          "teams"
        ],
        "summary": "Get a team",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.teamResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Update team name",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "teams"
        ],
        "summary": "Update a team",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "Fields to update",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.updateTeamRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.teamResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Delete a team by ID",
        "tags": [
          "teams"
        ],
        "summary": "Delete a team",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{id}/invites": {
      "get": {
        "description": "Returns all pending (not accepted, not revoked, not expired) invites. Caller must be owner or admin.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "invites"
        ],
        "summary": "List pending team invites",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.inviteResponse"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Generate a single-use invite link for the team. Caller must be owner or admin.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "invites"
        ],
        "summary": "Create a team invite",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.inviteResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{id}/invites/{inviteID}": {
      "delete": {
        "description": "Revoke a pending invite. Caller must be owner or admin.",
        "tags": [
          "invites"
        ],
        "summary": "Revoke a team invite",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Invite ID",
            "name": "inviteID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{id}/members": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Returns all members of a team with their roles, ordered owner \u2192 admins \u2192 members.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "teams"
        ],
        "summary": "List team members",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.teamMemberResponse"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Add a user to the team. Owner may add admins or members; admin may only add members.",
        "consumes": [
          "application/json"
        ],
        "tags": [
          "teams"
        ],
        "summary": "Add a team member",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "User and optional role (default: member)",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.addMemberRequest"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{id}/members/{userID}": {
      "delete": {
        "description": "Remove a user from the team. Owner may remove admins/members; admin may remove members only.",
        "tags": [
          "teams"
        ],
        "summary": "Remove a team member",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "User ID",
            "name": "userID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{id}/members/{userID}/role": {
      "put": {
        "description": "Change the role of a team member. Only the owner may call this.\nSetting role to \"owner\" transfers ownership; the current owner becomes admin.",
        "consumes": [
          "application/json"
        ],
        "tags": [
          "teams"
        ],
        "summary": "Set a member's role",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "User ID",
            "name": "userID",
            "in": "path",
            "required": true
          },
          {
            "description": "Role to assign: owner, admin, or member",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.setRoleRequest"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{id}/move": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Moves a team to a different account. Caller must be the team owner and a member of the target account.",
        "consumes": [
          "application/json"
        ],
        "tags": [
          "teams"
        ],
        "summary": "Move a team to another account",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "Target account",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.moveTeamRequest"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/alert-channels": {
      "get": {
        "description": "List all alert channels for a team. Any team member may call this.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "alert-channels"
        ],
        "summary": "List alert channels",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.alertChannelResponse"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Create a new alert channel for the team. Requires admin or owner role.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "alert-channels"
        ],
        "summary": "Create an alert channel",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "description": "Alert channel to create",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createAlertChannelRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.alertChannelResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/alert-channels/{channelID}": {
      "put": {
        "description": "Update an alert channel's type, name, config, or enabled status. Requires admin or owner role.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "alert-channels"
        ],
        "summary": "Update an alert channel",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Channel ID",
            "name": "channelID",
            "in": "path",
            "required": true
          },
          {
            "description": "Fields to update",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.updateAlertChannelRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.alertChannelResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "delete": {
        "description": "Delete an alert channel by ID. Requires admin or owner role.",
        "tags": [
          "alert-channels"
        ],
        "summary": "Delete an alert channel",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Channel ID",
            "name": "channelID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/alert-channels/{channelID}/test": {
      "post": {
        "description": "Send a test down + recovery notification pair to verify a team-scoped alert channel is configured correctly. Requires admin or owner role.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "alert-channels"
        ],
        "summary": "Send a test notification to a team channel",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Channel ID",
            "name": "channelID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.testAlertResultResponse"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/api-keys": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "List all API keys for a team. The key hash is never returned.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "team-api-keys"
        ],
        "summary": "List team API keys",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.apiKeyResponse"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Generate a new API key for CI/CD pipeline access. The",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "team-api-keys"
        ],
        "summary": "Create a team API key",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "description": "API key details",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createAPIKeyRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.createAPIKeyResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/api-keys/{keyID}": {
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Revoke and delete an API key. Requires team owner/admin.",
        "tags": [
          "team-api-keys"
        ],
        "summary": "Delete a team API key",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "API Key ID",
            "name": "keyID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/comments": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Returns all top-level comments across all monitors in the team.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "comments"
        ],
        "summary": "List comments across a team",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Start of time range (RFC3339)",
            "name": "from",
            "in": "query",
            "required": true
          },
          {
            "type": "string",
            "description": "End of time range (RFC3339)",
            "name": "to",
            "in": "query",
            "required": true
          },
          {
            "type": "boolean",
            "description": "Include resolved threads",
            "name": "include_resolved",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.commentResponse"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/env": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "List all environment variables for a team. Secret values are",
        "produces": [
          "application/json"
        ],
        "tags": [
          "team-env-vars"
        ],
        "summary": "List team environment variables",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.envVarResponse"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Create a new environment variable or secret for a team.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "team-env-vars"
        ],
        "summary": "Create a team environment variable",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "description": "Env var details",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createEnvVarRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.envVarResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/env/{key}": {
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Update the value of an existing environment variable identified",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "team-env-vars"
        ],
        "summary": "Update a team environment variable",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Variable key",
            "name": "key",
            "in": "path",
            "required": true
          },
          {
            "description": "New value",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.updateEnvVarRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.envVarResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Delete an environment variable or secret by key.",
        "tags": [
          "team-env-vars"
        ],
        "summary": "Delete a team environment variable",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Variable key",
            "name": "key",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/events": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "List chart events for a team within a time range. Optionally filter by monitor, kind, and source.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "chart-events"
        ],
        "summary": "List chart events",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Start of time range (RFC3339)",
            "name": "from",
            "in": "query",
            "required": true
          },
          {
            "type": "string",
            "description": "End of time range (RFC3339)",
            "name": "to",
            "in": "query",
            "required": true
          },
          {
            "type": "string",
            "description": "Filter to a specific monitor (includes team-wide events)",
            "name": "monitor_id",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Comma-separated kinds (deploy,incident,...)",
            "name": "kind",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Comma-separated sources (manual,pagerduty,...)",
            "name": "source",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.chartEventResponse"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Create a manual chart event for a team, optionally scoped to a monitor.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "chart-events"
        ],
        "summary": "Create a chart event",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "description": "Chart event",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createChartEventRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.chartEventResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/events/ingest": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Create a chart event using API key authentication.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "chart-events"
        ],
        "summary": "Ingest a chart event from CI/CD",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "description": "Event",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.ingestEventRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.chartEventResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/events/{eventID}": {
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Update an existing chart event. Only the author or a team admin/owner can update.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "chart-events"
        ],
        "summary": "Update a chart event",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Event ID",
            "name": "eventID",
            "in": "path",
            "required": true
          },
          {
            "description": "Fields to update",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.updateChartEventRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.chartEventResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Delete a chart event. Only the author or a team admin/owner can delete.",
        "tags": [
          "chart-events"
        ],
        "summary": "Delete a chart event",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Event ID",
            "name": "eventID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/external-links": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "List all external links for a team. Any team member may read.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "external-links"
        ],
        "summary": "List external links",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.externalLinkResponse"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Create an external link template for a team. Requires admin or owner role.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "external-links"
        ],
        "summary": "Create an external link",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "description": "External link",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createExternalLinkRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.createExternalLinkResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/external-links/{linkID}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get an external link by ID. Any team member may read.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "external-links"
        ],
        "summary": "Get an external link",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "External Link ID",
            "name": "linkID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.externalLinkResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Update an external link. Requires admin or owner role.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "external-links"
        ],
        "summary": "Update an external link",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "External Link ID",
            "name": "linkID",
            "in": "path",
            "required": true
          },
          {
            "description": "Fields to update",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.updateExternalLinkRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.externalLinkResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Delete an external link. Requires admin or owner role.",
        "tags": [
          "external-links"
        ],
        "summary": "Delete an external link",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "External Link ID",
            "name": "linkID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors": {
      "get": {
        "description": "List all monitors for a team. Any team member may call this.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "monitors"
        ],
        "summary": "List monitors",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.monitorResponse"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Create a new monitor for the team. Requires admin or owner role.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "monitors"
        ],
        "summary": "Create a monitor",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "description": "Monitor to create",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createMonitorRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.monitorResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/bulk": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Returns all monitors as a JSON array suitable for bulk import. Any team member can export.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "monitors-bulk"
        ],
        "summary": "Export all monitors for a team",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.bulkExportResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Import monitors with dry-run preview or atomic apply. Team owner only.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "monitors-bulk"
        ],
        "summary": "Bulk import monitors",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "description": "Import payload",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.bulkImportRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.bulkImportResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "402": {
            "description": "Payment Required",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/bulk/snapshots": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Returns recent snapshots for the team. Team owner only.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "monitors-bulk"
        ],
        "summary": "List bulk import snapshots",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.snapshotListResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/bulk/snapshots/{snapshotID}/restore": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Restores a snapshot with dry-run support. Team owner only. Creates a new snapshot before applying.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "monitors-bulk"
        ],
        "summary": "Restore a bulk import snapshot",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Snapshot ID",
            "name": "snapshotID",
            "in": "path",
            "required": true
          },
          {
            "description": "Restore options",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.restoreRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.bulkImportResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "410": {
            "description": "Gone",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}": {
      "get": {
        "description": "Get a monitor by ID. Any team member may call this.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "monitors"
        ],
        "summary": "Get a monitor",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.monitorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "put": {
        "description": "Update a monitor's URL and/or timeout. Requires admin or owner role.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "monitors"
        ],
        "summary": "Update a monitor",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "description": "Fields to update",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.updateMonitorRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.monitorResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "delete": {
        "description": "Delete a monitor by ID. Requires admin or owner role.",
        "tags": [
          "monitors"
        ],
        "summary": "Delete a monitor",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/alert-channels": {
      "get": {
        "description": "List the channel IDs linked to a monitor. Any team member may call this.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "monitor-alert-channels"
        ],
        "summary": "List monitor alert channels",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.monitorChannelResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "put": {
        "description": "Replace all channel links for a monitor. Admins/owners can link team channels; any member can link their own personal channels.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "monitor-alert-channels"
        ],
        "summary": "Set monitor alert channels",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "description": "Channel IDs to link",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.setMonitorChannelsRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.monitorChannelResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/alert-channels/{channelID}": {
      "post": {
        "description": "Link a single alert channel to a monitor.",
        "tags": [
          "monitor-alert-channels"
        ],
        "summary": "Link a channel to a monitor",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Channel ID",
            "name": "channelID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "delete": {
        "description": "Unlink a single alert channel from a monitor.",
        "tags": [
          "monitor-alert-channels"
        ],
        "summary": "Unlink a channel from a monitor",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Channel ID",
            "name": "channelID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/alerts": {
      "get": {
        "description": "List alert events (notifications) for a monitor. Any team member may call this.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "alert-channels"
        ],
        "summary": "List alert events for a monitor",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "Max results (default 50)",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.alertEventResponse"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/browser-probes": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "List browser probes for a monitor with time range and pagination.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "browser-probes"
        ],
        "summary": "List browser probes",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Start time (RFC3339)",
            "name": "from",
            "in": "query"
          },
          {
            "type": "string",
            "description": "End time (RFC3339)",
            "name": "to",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Max results (default 50)",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.browserProbeListResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/browser-probes/aggregate": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Time-series aggregation of browser probe metrics.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "browser-probes"
        ],
        "summary": "Aggregate browser metrics",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Start time (RFC3339)",
            "name": "from",
            "in": "query",
            "required": true
          },
          {
            "type": "string",
            "description": "End time (RFC3339)",
            "name": "to",
            "in": "query",
            "required": true
          },
          {
            "type": "string",
            "description": "Bucket size (e.g. 5m, 1h, 1d)",
            "name": "step",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object",
              "additionalProperties": true
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/browser-probes/{probeID}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a single browser probe with full console messages and HAR URL.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "browser-probes"
        ],
        "summary": "Get browser probe detail",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Probe ID",
            "name": "probeID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.browserProbeResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/cf-logs": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Returns Cloudflare log entries for a monitor within a time range.\nAny team member may read.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "cf-logs"
        ],
        "summary": "List CF log entries for a monitor",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "Start of time range (Unix epoch seconds, UTC)",
            "name": "from",
            "in": "query",
            "required": true
          },
          {
            "type": "integer",
            "description": "End of time range (Unix epoch seconds, UTC)",
            "name": "to",
            "in": "query",
            "required": true
          },
          {
            "type": "integer",
            "description": "Max entries to return (default 100, max 1000)",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.cfLogEntryResponse"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/comments": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Returns top-level comments within a time range. Use include_resolved=true to include resolved threads.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "comments"
        ],
        "summary": "List comments for a monitor",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Start of time range (RFC3339)",
            "name": "from",
            "in": "query",
            "required": true
          },
          {
            "type": "string",
            "description": "End of time range (RFC3339)",
            "name": "to",
            "in": "query",
            "required": true
          },
          {
            "type": "boolean",
            "description": "Include resolved threads",
            "name": "include_resolved",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.commentResponse"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Create a top-level comment anchored to a point or time range on the monitor's chart.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "comments"
        ],
        "summary": "Create a comment",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "description": "Comment",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createCommentRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.commentResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/comments/{commentID}": {
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Update the body of a comment or reply. Only the author can edit. Previous body is saved in edit history.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "comments"
        ],
        "summary": "Edit a comment",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Comment ID",
            "name": "commentID",
            "in": "path",
            "required": true
          },
          {
            "description": "New body",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.editCommentRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.commentResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Soft-delete a comment or reply. Author or account/team owner can delete. Body is replaced with [deleted].",
        "tags": [
          "comments"
        ],
        "summary": "Delete a comment",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Comment ID",
            "name": "commentID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/comments/{commentID}/edits": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Returns the edit history for a comment or reply.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "comments"
        ],
        "summary": "View edit history",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Comment ID",
            "name": "commentID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.commentEditResponse"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/comments/{commentID}/reopen": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Reopen a previously resolved comment thread.",
        "tags": [
          "comments"
        ],
        "summary": "Reopen a resolved comment thread",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Comment ID",
            "name": "commentID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/comments/{commentID}/replies": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Returns all replies in a comment thread, including deleted placeholders.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "comments"
        ],
        "summary": "List replies for a comment",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Comment ID",
            "name": "commentID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.commentResponse"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Add a reply to an existing comment thread.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "comments"
        ],
        "summary": "Reply to a comment",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Parent comment ID",
            "name": "commentID",
            "in": "path",
            "required": true
          },
          {
            "description": "Reply",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createReplyRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.commentResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/comments/{commentID}/resolve": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Mark a top-level comment as resolved. Resolved threads collapse on the chart.",
        "tags": [
          "comments"
        ],
        "summary": "Resolve a comment thread",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Comment ID",
            "name": "commentID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/duplicate": {
      "post": {
        "description": "Create a copy of an existing monitor with fresh health state. Any team member may call this. Notification channel links are copied based on the caller's role: admin/owner get all channels, members get only their own personal channels.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "monitors"
        ],
        "summary": "Duplicate a monitor",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.monitorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/expiration": {
      "get": {
        "description": "Returns SSL certificate and domain registration expiration info for the monitor's domain. Any team member may call this.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "monitors"
        ],
        "summary": "Get expiration data for a monitor",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.expirationResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/external-links": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "List external links assigned to a monitor. Any team member may read.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "external-links"
        ],
        "summary": "List external links for a monitor",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.externalLinkResponse"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Assign an external link to a monitor. Requires admin or owner role.",
        "consumes": [
          "application/json"
        ],
        "tags": [
          "external-links"
        ],
        "summary": "Assign an external link to a monitor",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "description": "Link to assign",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.assignExternalLinkRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/external-links/{linkID}": {
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Remove an external link from a monitor. Requires admin or owner role.",
        "tags": [
          "external-links"
        ],
        "summary": "Unassign an external link from a monitor",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "External Link ID",
            "name": "linkID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/metrics": {
      "get": {
        "description": "Returns uptime%, MTBF, and MTTR metrics for fixed time windows (7d, 30d, 90d, 365d). Paused and blocked periods are excluded from calculations. Any team member may call this.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "monitors"
        ],
        "summary": "Get monitor performance metrics",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.monitorMetricsResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/move": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Moves a monitor to a different team. Caller must be admin or owner in both the source and target teams.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "monitors"
        ],
        "summary": "Move a monitor to another team",
        "parameters": [
          {
            "type": "string",
            "description": "Current Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "description": "Target team",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.moveMonitorRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.monitorResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/my/notifications": {
      "get": {
        "description": "Get the caller's notification channels for a monitor (override or defaults).",
        "produces": [
          "application/json"
        ],
        "tags": [
          "my-monitor-notifications"
        ],
        "summary": "Get my monitor notifications",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.myMonitorNotificationsResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "put": {
        "description": "Create or replace a per-monitor notification override.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "my-monitor-notifications"
        ],
        "summary": "Set my monitor notifications",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "description": "Channel IDs",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.setMyMonitorNotificationsRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.myMonitorNotificationsResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "delete": {
        "description": "Delete the per-monitor override, reverting to account defaults.",
        "tags": [
          "my-monitor-notifications"
        ],
        "summary": "Remove my monitor notification override",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/pause": {
      "post": {
        "description": "Set a monitor's status to paused. Requires admin or owner role.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "monitors"
        ],
        "summary": "Pause a monitor",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.monitorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/probes": {
      "get": {
        "description": "List probes for a monitor. Any team member may read.\nAll query parameters are optional.\nfields: comma-separated list of fields to include (e.g. \"id,status,total_ms\").\nAllowed fields: id, monitor_id, status, dns_ms, connect_ms, tls_ms, send_ms,\nwait_ms, receive_ms, total_ms, error, checked_at, created_at, updated_at.\nPagination: when `limit` is provided, the response is a paginated envelope\nwith `probes`, `next_cursor`, and `has_more` fields.\nUse `before` for descending (newest-first) pagination, or `after` for\nascending (oldest-first) pagination. `before` and `after` are mutually\nexclusive. When `limit` is omitted, the response is a flat array\n(backward compatible, newest first).",
        "produces": [
          "application/json"
        ],
        "tags": [
          "probes"
        ],
        "summary": "List probes",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "Start of time range (Unix epoch seconds, UTC)",
            "name": "from",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "End of time range (Unix epoch seconds, UTC)",
            "name": "to",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Filter by HTTP status code (e.g. 200, 500)",
            "name": "status",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Page size. When provided, enables paginated envelope response.",
            "name": "limit",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Descending cursor (ISO 8601). Probes with checked_at < before.",
            "name": "before",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Ascending cursor (ISO 8601). Probes with checked_at > after.",
            "name": "after",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Comma-separated list of fields to return",
            "name": "fields",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.probeListResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/probes/aggregate": {
      "get": {
        "description": "Return time-series aggregated probe metrics for the monitor.\nProbes are grouped into fixed-duration buckets and a statistical\nfunction is applied to each latency field. Any team member may read.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "probes"
        ],
        "summary": "Aggregate probes",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "Start of time range (Unix epoch seconds, UTC)",
            "name": "from",
            "in": "query",
            "required": true
          },
          {
            "type": "integer",
            "description": "End of time range (Unix epoch seconds, UTC)",
            "name": "to",
            "in": "query",
            "required": true
          },
          {
            "type": "string",
            "description": "Bucket duration (1m, 5m, 15m, 30m, 1h, 3h, 6h, 12h, 1d)",
            "name": "step",
            "in": "query",
            "required": true
          },
          {
            "type": "string",
            "description": "Aggregation function (avg, median, min, max, p50, p75, p90, p95, p99)",
            "name": "agg",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.probeAggregationResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/probes/{probeID}": {
      "get": {
        "description": "Get a probe by ID. Any team member may read it.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "probes"
        ],
        "summary": "Get a probe",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Probe ID",
            "name": "probeID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.probeResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/probes/{probeID}/cf-log": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Returns the Cloudflare log entry linked to a specific probe.\nAny team member may read.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "cf-logs"
        ],
        "summary": "Get CF log entry for a probe",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Probe ID",
            "name": "probeID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.cfLogEntryResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/probes/{probeID}/details": {
      "get": {
        "description": "Returns the probe enriched with checker GEO, target GEO (from trace last hop),\nand the most recent preceding trace from the same checker to the same target.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "probes"
        ],
        "summary": "Get probe details with GEO and trace context",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Probe ID",
            "name": "probeID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.probeDetailsResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/probes/{probeID}/pcap": {
      "get": {
        "description": "Download the raw pcap capture file for a probe. Any team member may read.",
        "produces": [
          "application/vnd.tcpdump.pcap"
        ],
        "tags": [
          "probes"
        ],
        "summary": "Download probe pcap",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Probe ID",
            "name": "probeID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "file"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/shares": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Returns all active (non-expired, non-revoked) shares. Any team member can list.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "shares"
        ],
        "summary": "List active shares for a monitor",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.shareResponse"
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Creates a read-only permalink for probe data within a time range. Any team member can create.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "shares"
        ],
        "summary": "Create a probe share link",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "description": "Share options",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.createShareRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/handler.shareResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "429": {
            "description": "Too Many Requests",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/shares/{shareID}": {
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Revokes a share. Creator or team owner/admin can revoke.",
        "tags": [
          "shares"
        ],
        "summary": "Revoke a probe share",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Share ID",
            "name": "shareID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/suite": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Upload a tar.gz of a Playwright project directory. The server",
        "consumes": [
          "multipart/form-data"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "monitors"
        ],
        "summary": "Upload a Playwright test suite",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "file",
            "description": "Suite tarball (tar.gz)",
            "name": "suite",
            "in": "formData",
            "required": true
          },
          {
            "type": "string",
            "description": "Playwright project filter",
            "name": "pw_project",
            "in": "formData"
          },
          {
            "type": "string",
            "description": "Test name grep filter",
            "name": "pw_grep",
            "in": "formData"
          },
          {
            "type": "string",
            "description": "Tag filter (@tag)",
            "name": "pw_tag",
            "in": "formData"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.suiteUploadResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/test-alert": {
      "post": {
        "description": "Send a test notification to all enabled channels linked to a monitor. Requires monitor creator or admin/owner role.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "monitor-alert-channels"
        ],
        "summary": "Send a test alert for a monitor",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/handler.testAlertResultResponse"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/test-script": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Validate and push a one-off browser check to an available checker.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "monitors"
        ],
        "summary": "Submit a Playwright script test",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "description": "Script to test",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handler.testScriptRequest"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "schema": {
              "$ref": "#/definitions/handler.testScriptSubmitResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "502": {
            "description": "Bad Gateway",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/test-script/{testID}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Check the status of a previously submitted test run. Returns",
        "produces": [
          "application/json"
        ],
        "tags": [
          "monitors"
        ],
        "summary": "Poll for test script result",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Test ID (from submit)",
            "name": "testID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.testScriptPollResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/timeline": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Returns a merged timeline of comments, alert events, and\nchart events for a monitor within a time range.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "timeline"
        ],
        "summary": "Get unified timeline",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Start (RFC3339 or Unix timestamp)",
            "name": "from",
            "in": "query",
            "required": true
          },
          {
            "type": "string",
            "description": "End (RFC3339 or Unix timestamp)",
            "name": "to",
            "in": "query",
            "required": true
          },
          {
            "type": "boolean",
            "description": "Include comments (default true)",
            "name": "include_comments",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "Include alert events (default true)",
            "name": "include_alerts",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "Include chart events (default true)",
            "name": "include_events",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Comma-separated chart event kinds",
            "name": "kinds",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.timelineListResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/traces": {
      "get": {
        "description": "Returns traceroute results for the monitor. Any team member may read.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "traces"
        ],
        "summary": "List traces for a monitor",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Filter by checker ID",
            "name": "checkerID",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Max number of traces to return (default 10)",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.traceListResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Sends a trace command to the checker(s) assigned to this monitor.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "traces"
        ],
        "summary": "Request an on-demand trace",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "schema": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/monitors/{monitorID}/unpause": {
      "post": {
        "description": "Set a monitor's status back to active. Requires admin or owner role.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "monitors"
        ],
        "summary": "Unpause a monitor",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Monitor ID",
            "name": "monitorID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.monitorResponse"
            }
          },
          "403": {
            "description": "Forbidden",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/telegram-link": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Creates a short-lived deep-link that the user clicks to connect their\nTelegram account as a personal alert channel.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "telegram"
        ],
        "summary": "Generate a Telegram deep-link",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.createLinkResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/api/v1/teams/{teamID}/telegram-link/{code}/status": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Polls the status of a previously created deep-link code.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "telegram"
        ],
        "summary": "Check Telegram deep-link status",
        "parameters": [
          {
            "type": "string",
            "description": "Team ID",
            "name": "teamID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Deep-link code",
            "name": "code",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.linkStatusResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "description": "Returns server health status",
        "produces": [
          "application/json"
        ],
        "tags": [
          "health"
        ],
        "summary": "Health check",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.healthResponse"
            }
          }
        }
      }
    },
    "/healthz": {
      "get": {
        "description": "Pings PostgreSQL and returns Server-Timing header with db and total latencies",
        "produces": [
          "application/json"
        ],
        "tags": [
          "health"
        ],
        "summary": "Health check with DB ping",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/handler.healthDBResponse"
            }
          },
          "503": {
            "description": "Service Unavailable",
            "schema": {
              "$ref": "#/definitions/handler.errorResponse"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "entity.BrowserConfig": {
      "type": "object",
      "properties": {
        "console_error_threshold": {
          "type": "integer"
        },
        "deps_url": {
          "description": "URL to cached node_modules.tar.gz",
          "type": "string"
        },
        "extra_wait_ms": {
          "type": "integer"
        },
        "mode": {
          "description": "Phase 5: multi-step and scripted modes.",
          "type": "string"
        },
        "pw_grep": {
          "description": "--grep filter",
          "type": "string"
        },
        "pw_project": {
          "description": "--project filter",
          "type": "string"
        },
        "pw_tag": {
          "description": "--grep @tag filter",
          "type": "string"
        },
        "resource_error_threshold": {
          "type": "integer"
        },
        "screenshot_enabled": {
          "type": "boolean"
        },
        "screenshot_full_page": {
          "type": "boolean"
        },
        "script": {
          "description": "Playwright script (mode=script)",
          "type": "string"
        },
        "script_env": {
          "description": "Env vars for script/test_suite mode",
          "type": "array",
          "items": {
            "$ref": "#/definitions/entity.ScriptEnvVar"
          }
        },
        "steps": {
          "description": "Step-based DSL (mode=steps)",
          "type": "array",
          "items": {
            "$ref": "#/definitions/entity.BrowserStep"
          }
        },
        "suite_deploy_cmd": {
          "description": "CLI command used to deploy",
          "type": "string"
        },
        "suite_deployed_by": {
          "description": "user display name",
          "type": "string"
        },
        "suite_deployed_by_id": {
          "description": "user ID who deployed",
          "type": "string"
        },
        "suite_deployed_by_img": {
          "description": "user avatar URL",
          "type": "string"
        },
        "suite_git_branch": {
          "description": "git branch at deploy time",
          "type": "string"
        },
        "suite_git_sha": {
          "description": "git commit SHA at deploy time",
          "type": "string"
        },
        "suite_uploaded_at": {
          "description": "ISO timestamp of last deploy",
          "type": "string"
        },
        "suite_url": {
          "description": "Test suite mode (mode=test_suite): user's Playwright project directory.",
          "type": "string"
        },
        "user_agent": {
          "type": "string"
        },
        "viewport_height": {
          "type": "integer"
        },
        "viewport_width": {
          "type": "integer"
        },
        "wait_until": {
          "type": "string"
        }
      }
    },
    "entity.BrowserStep": {
      "type": "object",
      "properties": {
        "action": {
          "type": "string"
        },
        "attribute": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "selector": {
          "type": "string"
        },
        "timeout_ms": {
          "type": "integer"
        },
        "url": {
          "type": "string"
        },
        "value": {
          "type": "string"
        },
        "variable_name": {
          "type": "string"
        },
        "wait_ms": {
          "type": "integer"
        }
      }
    },
    "entity.ConsoleMessage": {
      "type": "object",
      "properties": {
        "column": {
          "type": "integer"
        },
        "line": {
          "type": "integer"
        },
        "text": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      }
    },
    "entity.FractionPercentiles": {
      "type": "object",
      "properties": {
        "percentile_1d": {
          "type": "number"
        },
        "percentile_30d": {
          "type": "number"
        },
        "percentile_7d": {
          "type": "number"
        },
        "percentile_90d": {
          "type": "number"
        },
        "value": {
          "type": "integer"
        }
      }
    },
    "entity.ProbePerformance": {
      "type": "object",
      "properties": {
        "connect_ms": {
          "$ref": "#/definitions/entity.FractionPercentiles"
        },
        "dns_ms": {
          "$ref": "#/definitions/entity.FractionPercentiles"
        },
        "receive_ms": {
          "$ref": "#/definitions/entity.FractionPercentiles"
        },
        "send_ms": {
          "$ref": "#/definitions/entity.FractionPercentiles"
        },
        "tls_ms": {
          "$ref": "#/definitions/entity.FractionPercentiles"
        },
        "total_ms": {
          "$ref": "#/definitions/entity.FractionPercentiles"
        },
        "wait_ms": {
          "$ref": "#/definitions/entity.FractionPercentiles"
        }
      }
    },
    "entity.ScriptEnvVar": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string"
        },
        "secret": {
          "type": "boolean"
        },
        "value": {
          "type": "string"
        }
      }
    },
    "entity.StepResult": {
      "type": "object",
      "properties": {
        "action": {
          "type": "string"
        },
        "duration_ms": {
          "type": "integer"
        },
        "error": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "screenshot_url": {
          "type": "string"
        },
        "status": {
          "description": "\"passed\" or \"failed\"",
          "type": "string"
        }
      }
    },
    "handler.acceptAccountInviteResponse": {
      "type": "object",
      "properties": {
        "account_id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "account_name": {
          "type": "string",
          "example": "Acme Corp"
        },
        "role": {
          "type": "string",
          "example": "member"
        }
      }
    },
    "handler.acceptInviteResponse": {
      "type": "object",
      "properties": {
        "role": {
          "type": "string",
          "example": "member"
        },
        "team_id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "team_name": {
          "type": "string",
          "example": "Platform"
        }
      }
    },
    "handler.accountAPIKeyResponse": {
      "type": "object",
      "properties": {
        "account_id": {
          "type": "string",
          "example": "770e8400-e29b-41d4-a716-446655440002"
        },
        "created_at": {
          "type": "string",
          "example": "2026-03-10T14:29:00Z"
        },
        "created_by": {
          "type": "string",
          "example": "880e8400-e29b-41d4-a716-446655440003"
        },
        "expires_at": {
          "type": "string",
          "example": "2027-01-01T00:00:00Z"
        },
        "id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "key_prefix": {
          "type": "string",
          "example": "oack_acc_a1b"
        },
        "name": {
          "type": "string",
          "example": "Terraform"
        }
      }
    },
    "handler.accountIncidentResponse": {
      "type": "object",
      "properties": {
        "account_id": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "created_by": {
          "type": "string"
        },
        "declared_at": {
          "type": "string"
        },
        "duration_seconds": {
          "type": "integer"
        },
        "escalation_policy_id": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "is_private": {
          "type": "boolean"
        },
        "monitor_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "name": {
          "type": "string"
        },
        "owner_id": {
          "type": "string"
        },
        "resolved_at": {
          "type": "string"
        },
        "service_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "severity": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "status_page_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "summary": {
          "type": "string"
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "updated_at": {
          "type": "string"
        }
      }
    },
    "handler.accountIncidentUpdateResponse": {
      "type": "object",
      "properties": {
        "created_at": {
          "type": "string"
        },
        "created_by": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "incident_id": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "notify_subscribers": {
          "type": "boolean"
        },
        "status": {
          "type": "string"
        }
      }
    },
    "handler.accountIncidentWithDetailsResponse": {
      "type": "object",
      "properties": {
        "account_id": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "created_by": {
          "type": "string"
        },
        "declared_at": {
          "type": "string"
        },
        "duration_seconds": {
          "type": "integer"
        },
        "escalation_events": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/handler.escalationEventResponse"
          }
        },
        "escalation_policy_id": {
          "type": "string"
        },
        "escalation_state": {
          "$ref": "#/definitions/handler.escalationStateResponse"
        },
        "id": {
          "type": "string"
        },
        "is_private": {
          "type": "boolean"
        },
        "monitor_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "name": {
          "type": "string"
        },
        "owner_id": {
          "type": "string"
        },
        "resolved_at": {
          "type": "string"
        },
        "service_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "severity": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "status_page_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "summary": {
          "type": "string"
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "updated_at": {
          "type": "string"
        },
        "updates": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/handler.accountIncidentUpdateResponse"
          }
        }
      }
    },
    "handler.accountInviteResponse": {
      "type": "object",
      "properties": {
        "accepted_at": {
          "type": "string"
        },
        "account_id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "created_at": {
          "type": "string",
          "example": "2026-03-07T12:00:00Z"
        },
        "email": {
          "type": "string",
          "example": "bob@example.com"
        },
        "expires_at": {
          "type": "string",
          "example": "2026-03-14T12:00:00Z"
        },
        "id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "invite_url": {
          "type": "string",
          "example": "https://app.example.com/account-invites/a1b2c3d4..."
        },
        "invited_by": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "revoked_at": {
          "type": "string"
        },
        "role": {
          "type": "string",
          "example": "member"
        },
        "token": {
          "type": "string",
          "example": "a1b2c3d4..."
        }
      }
    },
    "handler.accountMemberResponse": {
      "type": "object",
      "properties": {
        "avatar_url": {
          "type": "string",
          "example": "https://avatars.githubusercontent.com/u/12345"
        },
        "email": {
          "type": "string",
          "example": "alice@example.com"
        },
        "joined_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        },
        "name": {
          "type": "string",
          "example": "Alice"
        },
        "role": {
          "type": "string",
          "example": "owner"
        },
        "user_id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        }
      }
    },
    "handler.accountResponse": {
      "type": "object",
      "properties": {
        "created_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        },
        "default_escalation_policy_id": {
          "type": "string"
        },
        "deleted_at": {
          "type": "string"
        },
        "founding_member": {
          "type": "boolean",
          "example": false
        },
        "id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "name": {
          "type": "string",
          "example": "Acme Corp"
        },
        "plan": {
          "type": "string",
          "example": "free"
        },
        "subscription_status": {
          "type": "string",
          "example": "active"
        },
        "updated_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        }
      }
    },
    "handler.addDependencyRequest": {
      "type": "object",
      "properties": {
        "depends_on_id": {
          "type": "string"
        }
      }
    },
    "handler.addMemberRequest": {
      "type": "object",
      "properties": {
        "role": {
          "description": "\"admin\" or \"member\"; defaults to \"member\"",
          "type": "string",
          "example": "member"
        },
        "user_id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        }
      }
    },
    "handler.adminAccountListResponse": {
      "type": "object",
      "properties": {
        "accounts": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/handler.adminAccountResponse"
          }
        },
        "limit": {
          "type": "integer"
        },
        "offset": {
          "type": "integer"
        },
        "total": {
          "type": "integer"
        }
      }
    },
    "handler.adminAccountResponse": {
      "type": "object",
      "properties": {
        "created_at": {
          "type": "string"
        },
        "deleted_at": {
          "type": "string"
        },
        "external_customer_id": {
          "type": "string"
        },
        "external_subscription_id": {
          "type": "string"
        },
        "founding_member": {
          "type": "boolean"
        },
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "payment_provider": {
          "type": "string"
        },
        "plan": {
          "type": "string"
        },
        "subscription_status": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      }
    },
    "handler.adminSetFoundingMemberRequest": {
      "type": "object",
      "properties": {
        "founding_days": {
          "type": "integer",
          "example": 365
        },
        "founding_discount_pct": {
          "type": "integer",
          "example": 30
        },
        "founding_member": {
          "type": "boolean",
          "example": true
        }
      }
    },
    "handler.adminSetPlanRequest": {
      "type": "object",
      "properties": {
        "plan": {
          "type": "string",
          "example": "pro"
        }
      }
    },
    "handler.adminSetStatusRequest": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "example": "active"
        }
      }
    },
    "handler.adminTestEmailRequest": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "example": "admin@example.com"
        }
      }
    },
    "handler.alertChannelResponse": {
      "type": "object",
      "properties": {
        "account_id": {
          "type": "string",
          "example": ""
        },
        "config": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "created_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        },
        "enabled": {
          "type": "boolean",
          "example": true
        },
        "id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "name": {
          "type": "string",
          "example": "Production Alerts"
        },
        "scope": {
          "type": "string",
          "example": "team"
        },
        "team_id": {
          "type": "string",
          "example": "660e8400-e29b-41d4-a716-446655440001"
        },
        "type": {
          "type": "string",
          "enum": [
            "slack",
            "webhook",
            "email",
            "telegram",
            "discord",
            "pagerduty",
            "push",
            "sms"
          ],
          "example": "slack"
        },
        "updated_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        },
        "user_id": {
          "type": "string",
          "example": ""
        },
        "verified": {
          "type": "boolean",
          "example": true
        }
      }
    },
    "handler.alertEventResponse": {
      "type": "object",
      "properties": {
        "channel_id": {
          "type": "string",
          "example": "770e8400-e29b-41d4-a716-446655440002"
        },
        "created_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        },
        "delivered": {
          "type": "boolean",
          "example": true
        },
        "error": {
          "type": "string",
          "example": ""
        },
        "id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "message": {
          "type": "string",
          "example": ""
        },
        "monitor_id": {
          "type": "string",
          "example": "660e8400-e29b-41d4-a716-446655440001"
        },
        "type": {
          "type": "string",
          "example": "down"
        }
      }
    },
    "handler.apiKeyResponse": {
      "type": "object",
      "properties": {
        "created_at": {
          "type": "string",
          "example": "2026-03-10T14:29:00Z"
        },
        "created_by": {
          "type": "string",
          "example": "880e8400-e29b-41d4-a716-446655440003"
        },
        "expires_at": {
          "type": "string",
          "example": "2027-01-01T00:00:00Z"
        },
        "id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "key_prefix": {
          "type": "string",
          "example": "oack_a1b"
        },
        "name": {
          "type": "string",
          "example": "CI/CD Pipeline"
        },
        "team_id": {
          "type": "string",
          "example": "770e8400-e29b-41d4-a716-446655440002"
        }
      }
    },
    "handler.assignExternalLinkRequest": {
      "type": "object",
      "properties": {
        "external_link_id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        }
      }
    },
    "handler.assignmentResponse": {
      "type": "object",
      "properties": {
        "check_interval_ms": {
          "type": "integer",
          "example": 60000
        },
        "correlation_id": {
          "type": "string"
        },
        "deps_url": {
          "type": "string"
        },
        "extra_wait_ms": {
          "type": "integer"
        },
        "follow_redirects": {
          "type": "boolean",
          "example": true
        },
        "headers": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "http_method": {
          "type": "string",
          "example": "GET"
        },
        "http_version": {
          "type": "string",
          "example": ""
        },
        "is_debug_enabled": {
          "type": "boolean",
          "example": false
        },
        "mode": {
          "type": "string"
        },
        "monitor_id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "name": {
          "type": "string",
          "example": "Production API"
        },
        "pw_grep": {
          "type": "string"
        },
        "pw_project": {
          "type": "string"
        },
        "resolve_override_ip": {
          "type": "string",
          "example": ""
        },
        "screenshot": {
          "type": "boolean"
        },
        "script": {
          "type": "string"
        },
        "script_env": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/entity.ScriptEnvVar"
          }
        },
        "suite_url": {
          "type": "string"
        },
        "timeout_ms": {
          "type": "integer",
          "example": 10000
        },
        "trace_interval_ms": {
          "type": "integer",
          "example": 300000
        },
        "url": {
          "type": "string",
          "example": "https://example.com"
        },
        "viewport_height": {
          "type": "integer"
        },
        "viewport_width": {
          "type": "integer"
        },
        "wait_until": {
          "type": "string"
        }
      }
    },
    "handler.auditLogEntryResponse": {
      "type": "object",
      "properties": {
        "account_id": {
          "type": "string"
        },
        "action": {
          "type": "string"
        },
        "actor_id": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "details": {
          "type": "object",
          "additionalProperties": {}
        },
        "id": {
          "type": "string"
        }
      }
    },
    "handler.authResponse": {
      "type": "object",
      "properties": {
        "token": {
          "type": "string"
        },
        "user": {
          "$ref": "#/definitions/handler.userResponse"
        }
      }
    },
    "handler.authSubscribeRequest": {
      "type": "object",
      "properties": {
        "channel_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "component_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "group_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "scope": {
          "type": "string",
          "enum": [
            "all",
            "components",
            "groups"
          ],
          "example": "all"
        },
        "status_page_id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        }
      }
    },
    "handler.billingEventResponse": {
      "type": "object",
      "properties": {
        "amount": {
          "type": "number",
          "example": 29
        },
        "created_at": {
          "type": "string",
          "example": "2026-03-21T12:00:00Z"
        },
        "currency": {
          "type": "string",
          "example": "USD"
        },
        "event_type": {
          "type": "string",
          "example": "payment"
        },
        "external_id": {
          "type": "string",
          "example": "5745480045"
        },
        "id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "pay_currency": {
          "type": "string",
          "example": "usdttrc20"
        },
        "plan": {
          "type": "string",
          "example": "pro"
        },
        "provider": {
          "type": "string",
          "example": "nowpayments"
        },
        "status": {
          "type": "string",
          "example": "succeeded"
        }
      }
    },
    "handler.browserProbeListResponse": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/handler.browserProbeResponse"
          }
        }
      }
    },
    "handler.browserProbeResponse": {
      "type": "object",
      "properties": {
        "checked_at": {
          "type": "string"
        },
        "checker_id": {
          "type": "string"
        },
        "checker_public_ip": {
          "type": "string"
        },
        "cls": {
          "type": "number"
        },
        "console_error_count": {
          "type": "integer"
        },
        "console_messages": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/entity.ConsoleMessage"
          }
        },
        "console_warning_count": {
          "type": "integer"
        },
        "dom_content_loaded_ms": {
          "type": "integer"
        },
        "dom_interactive_ms": {
          "type": "integer"
        },
        "error": {
          "type": "string"
        },
        "fail_count": {
          "type": "integer"
        },
        "fcp_ms": {
          "type": "number"
        },
        "har_url": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "lcp_ms": {
          "type": "number"
        },
        "load_event_ms": {
          "type": "integer"
        },
        "pass_count": {
          "type": "integer"
        },
        "report_url": {
          "type": "string"
        },
        "resource_count": {
          "type": "integer"
        },
        "resource_error_count": {
          "type": "integer"
        },
        "resource_status_1xx": {
          "type": "integer"
        },
        "resource_status_2xx": {
          "type": "integer"
        },
        "resource_status_3xx": {
          "type": "integer"
        },
        "resource_status_4xx": {
          "type": "integer"
        },
        "resource_status_5xx": {
          "type": "integer"
        },
        "resource_total_bytes": {
          "type": "integer"
        },
        "screenshot_url": {
          "type": "string"
        },
        "skip_count": {
          "type": "integer"
        },
        "status": {
          "type": "integer"
        },
        "step_results": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/entity.StepResult"
          }
        },
        "test_count": {
          "type": "integer"
        },
        "total_ms": {
          "type": "integer"
        },
        "ttfb_ms": {
          "type": "number"
        },
        "user_agent": {
          "type": "string"
        }
      }
    },
    "handler.bucketResponse": {
      "type": "object",
      "properties": {
        "connect_ms": {
          "type": "integer",
          "example": 12
        },
        "dns_ms": {
          "type": "integer",
          "example": 35
        },
        "error_count": {
          "type": "integer",
          "example": 1
        },
        "probe_count": {
          "type": "integer",
          "example": 15
        },
        "receive_ms": {
          "type": "integer",
          "example": 6
        },
        "send_ms": {
          "type": "integer",
          "example": 1
        },
        "timestamp": {
          "type": "integer",
          "example": 1710000000
        },
        "tls_ms": {
          "type": "integer",
          "example": 45
        },
        "total_ms": {
          "type": "integer",
          "example": 234
        },
        "wait_ms": {
          "type": "integer",
          "example": 170
        }
      }
    },
    "handler.bulkExportResponse": {
      "type": "object",
      "properties": {
        "count": {
          "type": "integer"
        },
        "monitors": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/service.BulkMonitorItem"
          }
        }
      }
    },
    "handler.bulkImportRequest": {
      "type": "object",
      "properties": {
        "delete_missing": {
          "type": "boolean"
        },
        "dry_run": {
          "type": "boolean"
        },
        "monitors": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/service.BulkMonitorItem"
          }
        }
      }
    },
    "handler.bulkImportResponse": {
      "type": "object",
      "properties": {
        "changes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/service.BulkChange"
          }
        },
        "dry_run": {
          "type": "boolean"
        },
        "errors": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/service.BulkChange"
          }
        },
        "snapshot_id": {
          "type": "string"
        },
        "summary": {
          "$ref": "#/definitions/handler.bulkSummaryResponse"
        }
      }
    },
    "handler.bulkSummaryResponse": {
      "type": "object",
      "properties": {
        "created": {
          "type": "integer"
        },
        "deleted": {
          "type": "integer"
        },
        "errors": {
          "type": "integer"
        },
        "unchanged": {
          "type": "integer"
        },
        "updated": {
          "type": "integer"
        }
      }
    },
    "handler.cdnGeoResult": {
      "type": "object",
      "properties": {
        "city": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "latitude": {
          "type": "number"
        },
        "longitude": {
          "type": "number"
        },
        "pop_code": {
          "type": "string"
        },
        "provider": {
          "type": "string"
        },
        "region": {
          "type": "string"
        }
      }
    },
    "handler.cfIntegrationResponse": {
      "type": "object",
      "properties": {
        "account_id": {
          "type": "string",
          "example": "660e8400-..."
        },
        "api_token": {
          "type": "string",
          "example": "****abcd"
        },
        "created_at": {
          "type": "string",
          "example": "2026-03-10T14:00:00Z"
        },
        "created_by": {
          "type": "string",
          "example": "880e8400-..."
        },
        "enabled": {
          "type": "boolean",
          "example": true
        },
        "id": {
          "type": "string",
          "example": "550e8400-..."
        },
        "last_connected_at": {
          "type": "string",
          "example": "2026-03-10T14:00:00Z"
        },
        "session_error": {
          "type": "string",
          "example": ""
        },
        "updated_at": {
          "type": "string",
          "example": "2026-03-10T14:00:00Z"
        },
        "zone_id": {
          "type": "string",
          "example": "0x4e..."
        },
        "zone_name": {
          "type": "string",
          "example": "example.com"
        }
      }
    },
    "handler.cfLogEntryResponse": {
      "type": "object",
      "properties": {
        "correlation_id": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "id": {
          "description": "Fields added by http-api (not from Cloudflare).",
          "type": "string"
        },
        "monitor_id": {
          "type": "string"
        },
        "probe_id": {
          "type": "string"
        },
        "raw_log": {
          "description": "Original Cloudflare log entry, exactly as received from Instant Logs.",
          "type": "object"
        }
      }
    },
    "handler.chartEventResponse": {
      "type": "object",
      "properties": {
        "created_at": {
          "type": "string",
          "example": "2026-03-10T14:29:00Z"
        },
        "created_by": {
          "type": "string",
          "example": "880e8400-e29b-41d4-a716-446655440003"
        },
        "description": {
          "type": "string",
          "example": "Deployed from main branch"
        },
        "ended_at": {
          "type": "string",
          "example": "2026-03-10T14:35:00Z"
        },
        "external_id": {
          "type": "string",
          "example": ""
        },
        "id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "kind": {
          "type": "string",
          "example": "deploy"
        },
        "metadata": {
          "type": "object",
          "additionalProperties": {}
        },
        "monitor_id": {
          "type": "string",
          "example": "660e8400-e29b-41d4-a716-446655440001"
        },
        "severity": {
          "type": "string",
          "example": "info"
        },
        "source": {
          "type": "string",
          "example": "manual"
        },
        "started_at": {
          "type": "string",
          "example": "2026-03-10T14:29:00Z"
        },
        "team_id": {
          "type": "string",
          "example": "770e8400-e29b-41d4-a716-446655440002"
        },
        "title": {
          "type": "string",
          "example": "v2.4.1 deployed to production"
        },
        "updated_at": {
          "type": "string",
          "example": "2026-03-10T14:29:00Z"
        },
        "url": {
          "type": "string",
          "example": "https://github.com/org/repo/actions/runs/123"
        }
      }
    },
    "handler.checkerResponse": {
      "type": "object",
      "properties": {
        "asn": {
          "type": "integer",
          "example": 15169
        },
        "asn_org": {
          "type": "string",
          "example": "Google LLC"
        },
        "capabilities": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "commit_sha": {
          "type": "string",
          "example": "abc1234"
        },
        "country": {
          "type": "string",
          "example": "US"
        },
        "created_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        },
        "geo_override": {
          "type": "boolean",
          "example": false
        },
        "id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "is_online": {
          "type": "boolean",
          "example": true
        },
        "last_seen_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        },
        "latitude": {
          "type": "number",
          "example": 37.7749
        },
        "longitude": {
          "type": "number",
          "example": -122.4194
        },
        "mode": {
          "type": "string",
          "example": "dedicated"
        },
        "name": {
          "type": "string",
          "example": "us-east-1"
        },
        "public_ip": {
          "type": "string",
          "example": "203.0.113.1"
        },
        "region": {
          "type": "string",
          "example": "us-east"
        },
        "team_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "updated_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        },
        "user_id": {
          "type": "string",
          "example": "770e8400-e29b-41d4-a716-446655440002"
        },
        "version": {
          "type": "string",
          "example": "1.0.0"
        }
      }
    },
    "handler.checkoutRequest": {
      "type": "object",
      "properties": {
        "plan": {
          "type": "string",
          "example": "pro"
        },
        "provider": {
          "type": "string",
          "example": "nowpayments"
        }
      }
    },
    "handler.checkoutResponse": {
      "type": "object",
      "properties": {
        "currency": {
          "type": "string",
          "example": "USD"
        },
        "founding_member_activated": {
          "type": "boolean",
          "example": false
        },
        "invoice_url": {
          "type": "string",
          "example": "https://nowpayments.io/payment/?iid=123"
        },
        "plan": {
          "type": "string",
          "example": "pro"
        },
        "plan_id": {
          "type": "string",
          "example": "111394288"
        },
        "price": {
          "type": "number",
          "example": 29
        }
      }
    },
    "handler.commentEditResponse": {
      "type": "object",
      "properties": {
        "edited_at": {
          "type": "string"
        },
        "edited_by": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "previous_body": {
          "type": "string"
        }
      }
    },
    "handler.commentResponse": {
      "type": "object",
      "properties": {
        "anchor_from": {
          "type": "string",
          "example": "2026-03-01T12:00:00Z"
        },
        "anchor_to": {
          "type": "string",
          "example": "2026-03-01T13:00:00Z"
        },
        "author_id": {
          "type": "string",
          "example": "770e8400-e29b-41d4-a716-446655440002"
        },
        "body": {
          "type": "string",
          "example": "Deployed v2.3.1 here"
        },
        "created_at": {
          "type": "string",
          "example": "2026-03-01T12:00:00Z"
        },
        "edited_at": {
          "type": "string"
        },
        "id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "is_deleted": {
          "type": "boolean"
        },
        "is_resolved": {
          "type": "boolean"
        },
        "monitor_id": {
          "type": "string",
          "example": "660e8400-e29b-41d4-a716-446655440001"
        },
        "parent_id": {
          "type": "string",
          "example": "880e8400-e29b-41d4-a716-446655440003"
        },
        "resolved_at": {
          "type": "string"
        },
        "resolved_by": {
          "type": "string"
        }
      }
    },
    "handler.componentGroupResponse": {
      "type": "object",
      "properties": {
        "collapsed": {
          "type": "boolean"
        },
        "created_at": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "position": {
          "type": "integer"
        },
        "status_page_id": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      }
    },
    "handler.componentResponse": {
      "type": "object",
      "properties": {
        "created_at": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "display_uptime": {
          "type": "boolean"
        },
        "group_id": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "position": {
          "type": "integer"
        },
        "status": {
          "type": "string"
        },
        "status_page_id": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      }
    },
    "handler.copyChannelsRequest": {
      "type": "object",
      "properties": {
        "from_account_id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "to_account_id": {
          "type": "string",
          "example": "660e8400-e29b-41d4-a716-446655440001"
        }
      }
    },
    "handler.createAPIKeyRequest": {
      "type": "object",
      "properties": {
        "expires_at": {
          "type": "string",
          "example": "2027-01-01T00:00:00Z"
        },
        "name": {
          "type": "string",
          "example": "CI/CD Pipeline"
        }
      }
    },
    "handler.createAPIKeyResponse": {
      "type": "object",
      "properties": {
        "api_key": {
          "$ref": "#/definitions/handler.apiKeyResponse"
        },
        "key": {
          "type": "string",
          "example": "oack_a1b2c3d4e5f6..."
        }
      }
    },
    "handler.createAccountAPIKeyRequest": {
      "type": "object",
      "properties": {
        "expires_at": {
          "type": "string",
          "example": "2027-01-01T00:00:00Z"
        },
        "name": {
          "type": "string",
          "example": "Terraform"
        }
      }
    },
    "handler.createAccountAPIKeyResponse": {
      "type": "object",
      "properties": {
        "api_key": {
          "$ref": "#/definitions/handler.accountAPIKeyResponse"
        },
        "key": {
          "type": "string",
          "example": "oack_acc_a1b2c3d4e5f6..."
        }
      }
    },
    "handler.createAccountIncidentRequest": {
      "type": "object",
      "properties": {
        "escalation_policy_id": {
          "description": "deprecated: use primary_escalation_policy_id",
          "type": "string"
        },
        "is_private": {
          "type": "boolean",
          "example": false
        },
        "monitor_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "name": {
          "type": "string",
          "example": "API latency spike"
        },
        "no_escalation": {
          "type": "boolean"
        },
        "primary_escalation_policy_id": {
          "type": "string"
        },
        "service_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "severity": {
          "type": "string",
          "example": "major"
        },
        "status_page_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "summary": {
          "type": "string",
          "example": "Investigating increased error rates"
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "example": [
            "database",
            "deploy"
          ]
        }
      }
    },
    "handler.createAccountInviteRequest": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "example": "bob@example.com"
        },
        "role": {
          "type": "string",
          "example": "member"
        }
      }
    },
    "handler.createAccountPersonalChannelRequest": {
      "type": "object",
      "properties": {
        "account_id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "config": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "name": {
          "type": "string",
          "example": "My Email"
        },
        "type": {
          "type": "string",
          "enum": [
            "slack",
            "webhook",
            "email",
            "telegram",
            "discord",
            "pagerduty",
            "push",
            "sms"
          ],
          "example": "email"
        }
      }
    },
    "handler.createAccountRequest": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "example": "Acme Corp"
        }
      }
    },
    "handler.createAlertChannelRequest": {
      "type": "object",
      "properties": {
        "config": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "name": {
          "type": "string",
          "example": "Production Alerts"
        },
        "type": {
          "type": "string",
          "enum": [
            "slack",
            "webhook",
            "email",
            "telegram",
            "discord",
            "pagerduty",
            "push",
            "sms"
          ],
          "example": "slack"
        }
      }
    },
    "handler.createCFIntegrationRequest": {
      "type": "object",
      "properties": {
        "api_token": {
          "type": "string",
          "example": "v1.0-abcdef1234567890"
        },
        "zone_id": {
          "type": "string",
          "example": "0x4e..."
        },
        "zone_name": {
          "type": "string",
          "example": "example.com"
        }
      }
    },
    "handler.createChartEventRequest": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string",
          "example": "Deployed from main branch"
        },
        "ended_at": {
          "type": "string",
          "example": "2026-03-10T14:35:00Z"
        },
        "kind": {
          "type": "string",
          "example": "deploy"
        },
        "metadata": {
          "type": "object",
          "additionalProperties": {}
        },
        "monitor_id": {
          "type": "string",
          "example": "660e8400-e29b-41d4-a716-446655440001"
        },
        "severity": {
          "type": "string",
          "example": "info"
        },
        "started_at": {
          "type": "string",
          "example": "2026-03-10T14:29:00Z"
        },
        "title": {
          "type": "string",
          "example": "v2.4.1 deployed to production"
        },
        "url": {
          "type": "string",
          "example": "https://github.com/org/repo/actions/runs/123"
        }
      }
    },
    "handler.createCommentRequest": {
      "type": "object",
      "properties": {
        "anchor_at": {
          "type": "string",
          "example": "2026-03-01T12:00:00Z"
        },
        "anchor_from": {
          "type": "string",
          "example": "2026-03-01T12:00:00Z"
        },
        "anchor_to": {
          "type": "string",
          "example": "2026-03-01T13:00:00Z"
        },
        "body": {
          "type": "string",
          "example": "Deployed v2.3.1 here"
        }
      }
    },
    "handler.createComponentGroupRequest": {
      "type": "object",
      "properties": {
        "collapsed": {
          "type": "boolean",
          "example": false
        },
        "description": {
          "type": "string",
          "example": "Core services"
        },
        "name": {
          "type": "string",
          "example": "Core Platform"
        },
        "position": {
          "type": "integer",
          "example": 0
        }
      }
    },
    "handler.createComponentRequest": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string",
          "example": "REST API endpoint"
        },
        "display_uptime": {
          "type": "boolean",
          "example": true
        },
        "group_id": {
          "type": "string",
          "example": ""
        },
        "name": {
          "type": "string",
          "example": "HTTP API"
        },
        "position": {
          "type": "integer",
          "example": 0
        }
      }
    },
    "handler.createEnvVarRequest": {
      "type": "object",
      "properties": {
        "is_secret": {
          "type": "boolean",
          "example": true
        },
        "key": {
          "type": "string",
          "example": "STAGING_PASSWORD"
        },
        "value": {
          "type": "string",
          "example": "s3cret"
        }
      }
    },
    "handler.createExternalLinkRequest": {
      "type": "object",
      "properties": {
        "icon_url": {
          "type": "string",
          "example": "https://grafana.example.com/favicon.ico"
        },
        "name": {
          "type": "string",
          "example": "Loki Ingress Logs"
        },
        "time_window_minutes": {
          "type": "integer",
          "example": 5
        },
        "url_template": {
          "type": "string",
          "example": "https://grafana.example.com/explore?from={{probe.checked_at_from_ms}}"
        }
      }
    },
    "handler.createExternalLinkResponse": {
      "type": "object",
      "properties": {
        "auto_assigned_monitors": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "created_at": {
          "type": "string",
          "example": "2026-03-11T10:00:00Z"
        },
        "icon_url": {
          "type": "string",
          "example": "https://grafana.example.com/favicon.ico"
        },
        "id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "name": {
          "type": "string",
          "example": "Loki Ingress Logs"
        },
        "team_id": {
          "type": "string",
          "example": "770e8400-e29b-41d4-a716-446655440002"
        },
        "time_window_minutes": {
          "type": "integer",
          "example": 5
        },
        "updated_at": {
          "type": "string",
          "example": "2026-03-11T10:00:00Z"
        },
        "url_template": {
          "type": "string",
          "example": "https://grafana.example.com/explore?from={{probe.checked_at_from_ms}}"
        }
      }
    },
    "handler.createIncidentRequest": {
      "type": "object",
      "properties": {
        "component_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "message": {
          "type": "string",
          "example": "We are investigating increased error rates"
        },
        "name": {
          "type": "string",
          "example": "API degradation"
        },
        "notify_subscribers": {
          "type": "boolean",
          "example": true
        },
        "reminder_interval_minutes": {
          "type": "integer",
          "example": 30
        },
        "severity": {
          "type": "string",
          "enum": [
            "minor",
            "medium",
            "major",
            "critical"
          ],
          "example": "major"
        }
      }
    },
    "handler.createIncidentTemplateRequest": {
      "type": "object",
      "properties": {
        "component_ids": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "example": [
            "[]"
          ]
        },
        "message": {
          "type": "string",
          "example": "We are investigating the issue."
        },
        "name": {
          "type": "string",
          "example": "API Down - Critical"
        },
        "notify_subscribers": {
          "type": "boolean",
          "example": true
        },
        "severity": {
          "type": "string",
          "example": "major"
        },
        "title": {
          "type": "string",
          "example": "{monitor_name} is experiencing issues"
        }
      }
    },
    "handler.createLinkResponse": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "example": "abc123"
        },
        "expires_in": {
          "type": "integer",
          "example": 300
        },
        "link": {
          "type": "string",
          "example": "https://t.me/MyBot?start=abc123"
        }
      }
    },
    "handler.createMaintenanceRequest": {
      "type": "object",
      "properties": {
        "auto_status_change": {
          "type": "boolean",
          "example": true
        },
        "component_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "message": {
          "type": "string",
          "example": "Upgrading PostgreSQL to v16"
        },
        "name": {
          "type": "string",
          "example": "Database upgrade"
        },
        "notify_subscribers": {
          "type": "boolean",
          "example": true
        },
        "scheduled_duration_minutes": {
          "type": "integer",
          "example": 120
        },
        "scheduled_start": {
          "type": "string",
          "example": "2026-03-20T02:00:00Z"
        }
      }
    },
    "handler.createMonitorRequest": {
      "type": "object",
      "properties": {
        "aggregate_failure_count": {
          "type": "integer",
          "example": 2
        },
        "aggregate_failure_mode": {
          "type": "string",
          "example": "at_least_n"
        },
        "allowed_status_codes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "example": [
            "2xx",
            "3xx"
          ]
        },
        "browser_config": {
          "$ref": "#/definitions/entity.BrowserConfig"
        },
        "cf_zone_integration_id": {
          "type": "string",
          "example": ""
        },
        "check_interval_ms": {
          "type": "integer",
          "example": 60000
        },
        "checker_country": {
          "type": "string",
          "example": "DE"
        },
        "checker_id": {
          "type": "string",
          "example": ""
        },
        "checker_region": {
          "type": "string",
          "example": "us-west"
        },
        "domain_expiry_enabled": {
          "type": "boolean",
          "example": true
        },
        "domain_expiry_thresholds": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "failure_threshold": {
          "type": "integer",
          "example": 3
        },
        "follow_redirects": {
          "type": "boolean",
          "example": false
        },
        "headers": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "http_method": {
          "type": "string",
          "example": "GET"
        },
        "http_version": {
          "type": "string",
          "example": ""
        },
        "is_debug_enabled": {
          "type": "boolean",
          "example": false
        },
        "latency_threshold_ms": {
          "type": "integer",
          "example": 10000
        },
        "locations": {
          "description": "Multi-location fields.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/handler.locationRequest"
          }
        },
        "name": {
          "type": "string",
          "example": "Production API"
        },
        "resolve_override_ip": {
          "type": "string",
          "example": ""
        },
        "ssl_expiry_enabled": {
          "type": "boolean",
          "example": true
        },
        "ssl_expiry_thresholds": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "timeout_ms": {
          "type": "integer",
          "example": 10000
        },
        "type": {
          "description": "Monitor type and browser config.",
          "type": "string",
          "example": "browser"
        },
        "uptime_threshold_critical": {
          "type": "number",
          "example": 95
        },
        "uptime_threshold_degraded": {
          "type": "number",
          "example": 99
        },
        "uptime_threshold_good": {
          "type": "number",
          "example": 99.9
        },
        "url": {
          "type": "string",
          "example": "https://example.com"
        }
      }
    },
    "handler.createPDIntegrationRequest": {
      "type": "object",
      "properties": {
        "api_key": {
          "type": "string",
          "example": "u+abcdefg1234567"
        },
        "region": {
          "type": "string",
          "example": "us"
        },
        "service_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "handler.createProbeRequest": {
      "type": "object",
      "properties": {
        "checked_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        },
        "connect_ms": {
          "type": "integer",
          "example": 5
        },
        "dns_ms": {
          "type": "integer",
          "example": 35
        },
        "error": {
          "type": "string",
          "example": ""
        },
        "receive_ms": {
          "type": "integer",
          "example": 2
        },
        "send_ms": {
          "type": "integer",
          "example": 1
        },
        "status": {
          "type": "integer",
          "example": 200
        },
        "tls_ms": {
          "type": "integer",
          "example": 12
        },
        "total_ms": {
          "type": "integer",
          "example": 103
        },
        "wait_ms": {
          "type": "integer",
          "example": 48
        }
      }
    },
    "handler.createReplyRequest": {
      "type": "object",
      "properties": {
        "body": {
          "type": "string",
          "example": "Looks like the CDN issue."
        }
      }
    },
    "handler.createServiceRequest": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string",
          "example": "Handles all payment processing"
        },
        "escalation_policy_id": {
          "type": "string"
        },
        "monitor_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "name": {
          "type": "string",
          "example": "Payment API"
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "handler.createShareRequest": {
      "type": "object",
      "properties": {
        "access_mode": {
          "type": "string",
          "example": "public"
        },
        "expires_in": {
          "type": "string",
          "example": "7d"
        },
        "from": {
          "type": "string",
          "example": "2026-03-01T00:00:00Z"
        },
        "include_comments": {
          "type": "boolean"
        },
        "include_groups": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "redacted_groups": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "example": [
            "checker_ip",
            "source_asn"
          ]
        },
        "to": {
          "type": "string",
          "example": "2026-03-02T00:00:00Z"
        }
      }
    },
    "handler.createStatusPageRequest": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string",
          "example": "Real-time status of Acme services"
        },
        "name": {
          "type": "string",
          "example": "Acme Platform Status"
        },
        "slug": {
          "type": "string",
          "example": "acme-platform"
        }
      }
    },
    "handler.createTeamRequest": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "example": "Platform"
        }
      }
    },
    "handler.createTriggerRequest": {
      "type": "object",
      "properties": {
        "component_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "condition": {
          "type": "string",
          "example": "major_outage"
        },
        "enabled": {
          "type": "boolean",
          "example": true
        },
        "severity": {
          "type": "string",
          "example": "major"
        },
        "template": {
          "type": "string",
          "example": "{{service.name}} is experiencing issues"
        }
      }
    },
    "handler.createUserRequest": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "example": "alice@example.com"
        },
        "name": {
          "type": "string",
          "example": "Alice"
        }
      }
    },
    "handler.deviceApproveRequest": {
      "type": "object",
      "properties": {
        "user_code": {
          "type": "string",
          "example": "ABCD-1234"
        }
      }
    },
    "handler.deviceCodeResponse": {
      "type": "object",
      "properties": {
        "device_code": {
          "type": "string",
          "example": "a3f9c1..."
        },
        "expires_in": {
          "type": "integer",
          "example": 900
        },
        "interval": {
          "type": "integer",
          "example": 5
        },
        "user_code": {
          "type": "string",
          "example": "ABCD-1234"
        },
        "verification_uri": {
          "type": "string",
          "example": "https://app.oack.io/device"
        },
        "verification_uri_complete": {
          "type": "string",
          "example": "https://app.oack.io/device?user_code=ABCD-1234"
        }
      }
    },
    "handler.deviceTokenResponse": {
      "type": "object",
      "properties": {
        "access_token": {
          "type": "string"
        },
        "expires_in": {
          "type": "integer",
          "example": 86400
        },
        "token_type": {
          "type": "string",
          "example": "bearer"
        }
      }
    },
    "handler.editCommentRequest": {
      "type": "object",
      "properties": {
        "body": {
          "type": "string",
          "example": "Updated comment text"
        }
      }
    },
    "handler.emailSubscribeRequest": {
      "type": "object",
      "properties": {
        "component_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "email": {
          "type": "string",
          "example": "alice@example.com"
        },
        "group_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "scope": {
          "type": "string",
          "enum": [
            "all",
            "components",
            "groups"
          ],
          "example": "all"
        }
      }
    },
    "handler.envVarResponse": {
      "type": "object",
      "properties": {
        "created_at": {
          "type": "string",
          "example": "2026-03-27T14:29:00Z"
        },
        "id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "is_secret": {
          "type": "boolean",
          "example": true
        },
        "key": {
          "type": "string",
          "example": "STAGING_PASSWORD"
        },
        "team_id": {
          "type": "string",
          "example": "770e8400-e29b-41d4-a716-446655440002"
        },
        "updated_at": {
          "type": "string",
          "example": "2026-03-27T14:29:00Z"
        },
        "value": {
          "type": "string",
          "example": "********"
        }
      }
    },
    "handler.errorResponse": {
      "type": "object",
      "properties": {
        "error": {
          "type": "string",
          "example": "error message"
        }
      }
    },
    "handler.escalationEventResponse": {
      "type": "object",
      "properties": {
        "created_at": {
          "type": "string"
        },
        "level": {
          "type": "integer"
        },
        "schedule_id": {
          "type": "string"
        },
        "trigger": {
          "type": "string"
        },
        "user_id": {
          "type": "string"
        }
      }
    },
    "handler.escalationStateResponse": {
      "type": "object",
      "properties": {
        "acknowledged_at": {
          "type": "string"
        },
        "acknowledged_by": {
          "type": "string"
        },
        "current_level": {
          "type": "integer"
        },
        "status": {
          "type": "string"
        }
      }
    },
    "handler.expirationDomainResponse": {
      "type": "object",
      "properties": {
        "days_remaining": {
          "type": "integer",
          "example": 304
        },
        "error": {
          "type": "string"
        },
        "expires_at": {
          "type": "string",
          "example": "2027-01-01T00:00:00Z"
        },
        "registrar": {
          "type": "string",
          "example": "Cloudflare, Inc."
        }
      }
    },
    "handler.expirationResponse": {
      "type": "object",
      "properties": {
        "domain": {
          "type": "string",
          "example": "example.com"
        },
        "domain_registration": {
          "$ref": "#/definitions/handler.expirationDomainResponse"
        },
        "last_checked_at": {
          "type": "string",
          "example": "2026-03-03T04:00:00Z"
        },
        "settings": {
          "$ref": "#/definitions/handler.expirationSettingsResponse"
        },
        "ssl": {
          "$ref": "#/definitions/handler.expirationSSLResponse"
        }
      }
    },
    "handler.expirationSSLResponse": {
      "type": "object",
      "properties": {
        "days_remaining": {
          "type": "integer",
          "example": 104
        },
        "error": {
          "type": "string"
        },
        "expires_at": {
          "type": "string",
          "example": "2026-06-15T00:00:00Z"
        },
        "issuer": {
          "type": "string",
          "example": "Let's Encrypt"
        }
      }
    },
    "handler.expirationSettingsResponse": {
      "type": "object",
      "properties": {
        "domain_expiry_enabled": {
          "type": "boolean",
          "example": true
        },
        "domain_expiry_thresholds": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "ssl_expiry_enabled": {
          "type": "boolean",
          "example": true
        },
        "ssl_expiry_thresholds": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        }
      }
    },
    "handler.externalLinkResponse": {
      "type": "object",
      "properties": {
        "created_at": {
          "type": "string",
          "example": "2026-03-11T10:00:00Z"
        },
        "icon_url": {
          "type": "string",
          "example": "https://grafana.example.com/favicon.ico"
        },
        "id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "name": {
          "type": "string",
          "example": "Loki Ingress Logs"
        },
        "team_id": {
          "type": "string",
          "example": "770e8400-e29b-41d4-a716-446655440002"
        },
        "time_window_minutes": {
          "type": "integer",
          "example": 5
        },
        "updated_at": {
          "type": "string",
          "example": "2026-03-11T10:00:00Z"
        },
        "url_template": {
          "type": "string",
          "example": "https://grafana.example.com/explore?from={{probe.checked_at_from_ms}}"
        }
      }
    },
    "handler.geoCountryItem": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "example": "US"
        },
        "name": {
          "type": "string",
          "example": "United States"
        },
        "regions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/handler.geoRegionItem"
          }
        }
      }
    },
    "handler.geoRegionItem": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "example": "us-west"
        },
        "name": {
          "type": "string",
          "example": "US West"
        }
      }
    },
    "handler.geoRegionsResponse": {
      "type": "object",
      "properties": {
        "countries": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/handler.geoCountryItem"
          }
        }
      }
    },
    "handler.geoResponse": {
      "type": "object",
      "properties": {
        "asn": {
          "type": "integer"
        },
        "asn_org": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "latitude": {
          "type": "number"
        },
        "longitude": {
          "type": "number"
        },
        "region": {
          "type": "string"
        },
        "source": {
          "type": "string"
        }
      }
    },
    "handler.healthDBResponse": {
      "type": "object",
      "properties": {
        "db_ms": {
          "type": "number",
          "example": 1.23
        },
        "status": {
          "type": "string",
          "example": "ok"
        }
      }
    },
    "handler.healthResponse": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "example": "ok"
        }
      }
    },
    "handler.incidentResponse": {
      "type": "object",
      "properties": {
        "component_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "created_at": {
          "type": "string"
        },
        "created_by": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "notify_subscribers": {
          "type": "boolean"
        },
        "reminder_interval_minutes": {
          "type": "integer"
        },
        "resolved_at": {
          "type": "string"
        },
        "severity": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "status_page_id": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      }
    },
    "handler.incidentTemplateResponse": {
      "type": "object",
      "properties": {
        "component_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "created_at": {
          "type": "string"
        },
        "created_by": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "notify_subscribers": {
          "type": "boolean"
        },
        "severity": {
          "type": "string"
        },
        "status_page_id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      }
    },
    "handler.incidentUpdateResponse": {
      "type": "object",
      "properties": {
        "created_at": {
          "type": "string"
        },
        "created_by": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "incident_id": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "notify_subscribers": {
          "type": "boolean"
        },
        "status": {
          "type": "string"
        }
      }
    },
    "handler.incidentWithUpdatesResponse": {
      "type": "object",
      "properties": {
        "component_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "created_at": {
          "type": "string"
        },
        "created_by": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "notify_subscribers": {
          "type": "boolean"
        },
        "reminder_interval_minutes": {
          "type": "integer"
        },
        "resolved_at": {
          "type": "string"
        },
        "severity": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "status_page_id": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        },
        "updates": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/handler.incidentUpdateResponse"
          }
        }
      }
    },
    "handler.ingestEventRequest": {
      "type": "object",
      "properties": {
        "ended_at": {
          "type": "string"
        },
        "kind": {
          "type": "string"
        },
        "metadata": {
          "type": "object",
          "additionalProperties": {}
        },
        "monitor_id": {
          "type": "string"
        },
        "severity": {
          "type": "string"
        },
        "started_at": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      }
    },
    "handler.integrationEventRequest": {
      "type": "object"
    },
    "handler.integrationEventResponse": {
      "type": "object",
      "properties": {
        "incident_id": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "status": {
          "type": "string"
        }
      }
    },
    "handler.interpolatedLinkResponse": {
      "type": "object",
      "properties": {
        "icon_url": {
          "type": "string",
          "example": "https://grafana.example.com/favicon.ico"
        },
        "id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "name": {
          "type": "string",
          "example": "Loki Ingress Logs"
        },
        "url": {
          "type": "string",
          "example": "https://grafana.example.com/explore?from=1710000000"
        }
      }
    },
    "handler.inviteResponse": {
      "type": "object",
      "properties": {
        "created_at": {
          "type": "string",
          "example": "2026-02-26T12:00:00Z"
        },
        "created_by": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "expires_at": {
          "type": "string",
          "example": "2026-02-27T12:00:00Z"
        },
        "id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "invite_url": {
          "type": "string",
          "example": "https://app.example.com/invites/a1b2c3d4..."
        },
        "team_id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "token": {
          "type": "string",
          "example": "a1b2c3d4..."
        }
      }
    },
    "handler.invoiceListResponse": {
      "type": "object",
      "properties": {
        "invoices": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/handler.billingEventResponse"
          }
        },
        "total": {
          "type": "integer",
          "example": 5
        }
      }
    },
    "handler.linkStatusResponse": {
      "type": "object",
      "properties": {
        "channel_id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "status": {
          "type": "string",
          "example": "pending"
        }
      }
    },
    "handler.locationRequest": {
      "type": "object",
      "properties": {
        "checker_id": {
          "type": "string"
        },
        "checker_region": {
          "type": "string",
          "example": "North America"
        },
        "label": {
          "type": "string",
          "example": "Dallas"
        }
      }
    },
    "handler.locationResponse": {
      "type": "object",
      "properties": {
        "assigned_checker_id": {
          "type": "string"
        },
        "checker_id": {
          "type": "string"
        },
        "checker_region": {
          "type": "string"
        },
        "health_changed_at": {
          "type": "string"
        },
        "health_down_reason": {
          "type": "string"
        },
        "health_status": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "label": {
          "type": "string"
        }
      }
    },
    "handler.maintenanceResponse": {
      "type": "object",
      "properties": {
        "auto_status_change": {
          "type": "boolean"
        },
        "completed_at": {
          "type": "string"
        },
        "component_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "created_at": {
          "type": "string"
        },
        "created_by": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "notify_subscribers": {
          "type": "boolean"
        },
        "scheduled_duration_minutes": {
          "type": "integer"
        },
        "scheduled_end": {
          "type": "string"
        },
        "scheduled_start": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "status_page_id": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      }
    },
    "handler.maintenanceUpdateResponse": {
      "type": "object",
      "properties": {
        "created_at": {
          "type": "string"
        },
        "created_by": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "maintenance_id": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "notify_subscribers": {
          "type": "boolean"
        },
        "status": {
          "type": "string"
        }
      }
    },
    "handler.maintenanceWithUpdatesResponse": {
      "type": "object",
      "properties": {
        "auto_status_change": {
          "type": "boolean"
        },
        "completed_at": {
          "type": "string"
        },
        "component_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "created_at": {
          "type": "string"
        },
        "created_by": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "notify_subscribers": {
          "type": "boolean"
        },
        "scheduled_duration_minutes": {
          "type": "integer"
        },
        "scheduled_end": {
          "type": "string"
        },
        "scheduled_start": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "status_page_id": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        },
        "updates": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/handler.maintenanceUpdateResponse"
          }
        }
      }
    },
    "handler.monitorChannelResponse": {
      "type": "object",
      "properties": {
        "channel_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "handler.monitorMetricsResponse": {
      "type": "object",
      "properties": {
        "current_health": {
          "type": "string",
          "example": "up"
        },
        "monitor_id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "uptime_threshold_critical": {
          "type": "number",
          "example": 95
        },
        "uptime_threshold_degraded": {
          "type": "number",
          "example": 99
        },
        "uptime_threshold_good": {
          "type": "number",
          "example": 99.9
        },
        "windows": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/handler.windowMetricsResponse"
          }
        }
      }
    },
    "handler.monitorResponse": {
      "type": "object",
      "properties": {
        "aggregate_failure_count": {
          "type": "integer"
        },
        "aggregate_failure_mode": {
          "description": "Multi-location fields (omitted for single-location monitors).",
          "type": "string"
        },
        "allowed_status_codes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "browser_config": {
          "$ref": "#/definitions/entity.BrowserConfig"
        },
        "cf_zone_integration_id": {
          "type": "string",
          "example": ""
        },
        "check_interval_ms": {
          "type": "integer",
          "example": 60000
        },
        "checker_country": {
          "type": "string",
          "example": "DE"
        },
        "checker_id": {
          "type": "string",
          "example": ""
        },
        "checker_region": {
          "type": "string",
          "example": "us-west"
        },
        "consecutive_failures": {
          "type": "integer",
          "example": 0
        },
        "consecutive_successes": {
          "type": "integer",
          "example": 0
        },
        "created_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        },
        "created_by": {
          "type": "string",
          "example": ""
        },
        "debug_expires_at": {
          "type": "string",
          "example": "2025-01-01T00:15:00Z"
        },
        "domain_expiry_enabled": {
          "type": "boolean",
          "example": true
        },
        "domain_expiry_status": {
          "type": "string",
          "example": "ok"
        },
        "domain_expiry_thresholds": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "failure_threshold": {
          "type": "integer",
          "example": 3
        },
        "follow_redirects": {
          "type": "boolean",
          "example": false
        },
        "headers": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "health_changed_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        },
        "health_down_reason": {
          "type": "string",
          "example": ""
        },
        "health_status": {
          "type": "string",
          "example": "up"
        },
        "http_method": {
          "type": "string",
          "example": "GET"
        },
        "http_version": {
          "type": "string",
          "example": ""
        },
        "id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "is_debug_enabled": {
          "type": "boolean",
          "example": false
        },
        "latency_threshold_ms": {
          "type": "integer",
          "example": 10000
        },
        "locations": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/handler.locationResponse"
          }
        },
        "name": {
          "type": "string",
          "example": "Production API"
        },
        "resolve_override_ip": {
          "type": "string",
          "example": ""
        },
        "ssl_expiry_enabled": {
          "type": "boolean",
          "example": true
        },
        "ssl_expiry_status": {
          "type": "string",
          "example": "ok"
        },
        "ssl_expiry_thresholds": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "status": {
          "type": "string",
          "example": "active"
        },
        "team_id": {
          "type": "string",
          "example": "660e8400-e29b-41d4-a716-446655440001"
        },
        "timeout_ms": {
          "type": "integer",
          "example": 10000
        },
        "type": {
          "description": "Monitor type and browser config.",
          "type": "string",
          "example": "http"
        },
        "updated_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        },
        "uptime_threshold_critical": {
          "type": "number",
          "example": 95
        },
        "uptime_threshold_degraded": {
          "type": "number",
          "example": 99
        },
        "uptime_threshold_good": {
          "type": "number",
          "example": 99.9
        },
        "url": {
          "type": "string",
          "example": "https://example.com"
        }
      }
    },
    "handler.moveMonitorRequest": {
      "type": "object",
      "properties": {
        "target_team_id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        }
      }
    },
    "handler.moveTeamRequest": {
      "type": "object",
      "properties": {
        "target_account_id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        }
      }
    },
    "handler.myMonitorNotificationsResponse": {
      "type": "object",
      "properties": {
        "channel_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "is_override": {
          "type": "boolean",
          "example": false
        }
      }
    },
    "handler.myNotificationsResponse": {
      "type": "object",
      "properties": {
        "channel_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "is_override": {
          "type": "boolean",
          "example": false
        }
      }
    },
    "handler.notificationDefaultsResponse": {
      "type": "object",
      "properties": {
        "channel_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "handler.notificationPreferencesResponse": {
      "type": "object",
      "properties": {
        "muted_monitors": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "quiet_hours": {
          "$ref": "#/definitions/handler.quietHoursResponse"
        },
        "updated_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        }
      }
    },
    "handler.patchCheckerRequest": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "example": "us-west-2"
        }
      }
    },
    "handler.pdIntegrationResponse": {
      "type": "object",
      "properties": {
        "account_id": {
          "type": "string",
          "example": "660e8400-..."
        },
        "api_key": {
          "type": "string",
          "example": "****abcd"
        },
        "created_at": {
          "type": "string",
          "example": "2026-03-10T14:00:00Z"
        },
        "created_by": {
          "type": "string",
          "example": "880e8400-..."
        },
        "id": {
          "type": "string",
          "example": "550e8400-..."
        },
        "last_synced_at": {
          "type": "string",
          "example": "2026-03-10T14:00:00Z"
        },
        "region": {
          "type": "string",
          "example": "us"
        },
        "service_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "sync_enabled": {
          "type": "boolean",
          "example": true
        },
        "sync_error": {
          "type": "string",
          "example": ""
        },
        "updated_at": {
          "type": "string",
          "example": "2026-03-10T14:00:00Z"
        }
      }
    },
    "handler.postAccountIncidentUpdateRequest": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "example": "Root cause identified"
        },
        "notify_subscribers": {
          "type": "boolean",
          "example": true
        },
        "status": {
          "type": "string",
          "example": "identified"
        }
      }
    },
    "handler.postIncidentUpdateRequest": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "example": "Root cause identified, working on a fix"
        },
        "notify_subscribers": {
          "type": "boolean",
          "example": true
        },
        "status": {
          "type": "string",
          "enum": [
            "investigating",
            "identified",
            "monitoring",
            "resolved"
          ],
          "example": "identified"
        }
      }
    },
    "handler.postMaintenanceUpdateRequest": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "example": "Maintenance has started"
        },
        "notify_subscribers": {
          "type": "boolean",
          "example": true
        },
        "status": {
          "type": "string",
          "example": "in_progress"
        }
      }
    },
    "handler.probeAggregationResponse": {
      "type": "object",
      "properties": {
        "agg": {
          "type": "string",
          "example": "avg"
        },
        "buckets": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/handler.bucketResponse"
          }
        },
        "from": {
          "type": "integer",
          "example": 1710000000
        },
        "monitor_id": {
          "type": "string",
          "example": "660e8400-e29b-41d4-a716-446655440001"
        },
        "step": {
          "type": "string",
          "example": "15m"
        },
        "to": {
          "type": "integer",
          "example": 1710086400
        }
      }
    },
    "handler.probeDetailsResponse": {
      "type": "object",
      "properties": {
        "cdn_geo": {
          "$ref": "#/definitions/handler.cdnGeoResult"
        },
        "cf_log": {
          "$ref": "#/definitions/handler.cfLogEntryResponse"
        },
        "checker_geo": {
          "$ref": "#/definitions/handler.geoResponse"
        },
        "external_links": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/handler.interpolatedLinkResponse"
          }
        },
        "performance": {
          "$ref": "#/definitions/entity.ProbePerformance"
        },
        "probe": {
          "$ref": "#/definitions/handler.probeResponse"
        },
        "target_geo": {
          "$ref": "#/definitions/handler.geoResponse"
        },
        "trace": {
          "$ref": "#/definitions/handler.traceResponse"
        }
      }
    },
    "handler.probeListResponse": {
      "type": "object",
      "properties": {
        "has_more": {
          "type": "boolean",
          "example": true
        },
        "next_cursor": {
          "description": "checked_at of the last probe in the page. Pass as `before` (descending)\nor `after` (ascending) for the next page. Null if no more probes.",
          "type": "string",
          "example": "2026-03-01T12:34:56Z"
        },
        "probes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/handler.probeResponse"
          }
        }
      }
    },
    "handler.probeResponse": {
      "type": "object",
      "properties": {
        "cdn_request_id": {
          "type": "string",
          "example": ""
        },
        "cf_ray": {
          "type": "string",
          "example": ""
        },
        "checked_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        },
        "checker_commit_sha": {
          "type": "string",
          "example": "abc1234"
        },
        "checker_id": {
          "type": "string",
          "example": "770e8400-e29b-41d4-a716-446655440003"
        },
        "checker_public_ip": {
          "type": "string",
          "example": "203.0.113.1"
        },
        "checker_version": {
          "type": "string",
          "example": "1.0.0"
        },
        "connect_ms": {
          "type": "integer",
          "example": 5
        },
        "correlation_id": {
          "type": "string",
          "example": ""
        },
        "created_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        },
        "destination_asn": {
          "type": "integer",
          "example": 15133
        },
        "destination_asn_org": {
          "type": "string",
          "example": "Edgecast Inc."
        },
        "dns_ms": {
          "type": "integer",
          "example": 35
        },
        "enrichment": {
          "type": "object",
          "additionalProperties": {
            "type": "boolean"
          }
        },
        "error": {
          "type": "string",
          "example": ""
        },
        "has_pcap": {
          "type": "boolean",
          "example": false
        },
        "id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "monitor_id": {
          "type": "string",
          "example": "660e8400-e29b-41d4-a716-446655440001"
        },
        "pcap_retransmits": {
          "type": "integer",
          "example": 0
        },
        "receive_ms": {
          "type": "integer",
          "example": 2
        },
        "request": {
          "type": "string",
          "example": ""
        },
        "request_id": {
          "type": "string",
          "example": ""
        },
        "resolved_target_ip": {
          "type": "string",
          "example": "93.184.216.34"
        },
        "response": {
          "type": "string",
          "example": ""
        },
        "send_ms": {
          "type": "integer",
          "example": 1
        },
        "source_asn": {
          "type": "integer",
          "example": 15169
        },
        "source_asn_org": {
          "type": "string",
          "example": "Google LLC"
        },
        "status": {
          "type": "integer",
          "example": 200
        },
        "tcp_info": {
          "type": "object"
        },
        "tls_ms": {
          "type": "integer",
          "example": 12
        },
        "total_ms": {
          "type": "integer",
          "example": 103
        },
        "updated_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        },
        "wait_ms": {
          "type": "integer",
          "example": 48
        }
      }
    },
    "handler.publicStatusPageResponse": {
      "type": "object",
      "properties": {
        "branding_favicon_url": {
          "type": "string"
        },
        "branding_logo_url": {
          "type": "string"
        },
        "branding_primary_color": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "has_password": {
          "type": "boolean"
        },
        "name": {
          "type": "string"
        },
        "show_historical_uptime": {
          "type": "boolean"
        },
        "slug": {
          "type": "string"
        }
      }
    },
    "handler.pushDeviceResponse": {
      "type": "object",
      "properties": {
        "created_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        },
        "id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "platform": {
          "type": "string",
          "example": "ios"
        },
        "token": {
          "type": "string",
          "example": "ExponentPushToken[xxxxxx]"
        }
      }
    },
    "handler.quietHoursInput": {
      "type": "object",
      "properties": {
        "end": {
          "type": "string",
          "example": "07:00"
        },
        "start": {
          "type": "string",
          "example": "22:00"
        },
        "timezone": {
          "type": "string",
          "example": "America/New_York"
        }
      }
    },
    "handler.quietHoursResponse": {
      "type": "object",
      "properties": {
        "end": {
          "type": "string",
          "example": "07:00"
        },
        "start": {
          "type": "string",
          "example": "22:00"
        },
        "timezone": {
          "type": "string",
          "example": "America/New_York"
        }
      }
    },
    "handler.refreshResponse": {
      "type": "object",
      "properties": {
        "expires_in": {
          "type": "integer"
        },
        "token": {
          "type": "string"
        }
      }
    },
    "handler.registerCheckerRequest": {
      "type": "object",
      "properties": {
        "capabilities": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "example": [
            "http"
          ]
        },
        "checker_id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "commit_sha": {
          "type": "string",
          "example": "abc1234"
        },
        "mode": {
          "type": "string",
          "example": "dedicated"
        },
        "name": {
          "type": "string",
          "example": "us-east-1"
        },
        "version": {
          "type": "string",
          "example": "1.0.0"
        }
      }
    },
    "handler.registerDeviceRequest": {
      "type": "object",
      "properties": {
        "platform": {
          "type": "string",
          "example": "ios"
        },
        "token": {
          "type": "string",
          "example": "ExponentPushToken[xxxxxx]"
        }
      }
    },
    "handler.restoreRequest": {
      "type": "object",
      "properties": {
        "dry_run": {
          "type": "boolean"
        }
      }
    },
    "handler.serviceLinkComponentsRequest": {
      "type": "object",
      "properties": {
        "component_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "handler.serviceLinkIncidentsRequest": {
      "type": "object",
      "properties": {
        "incident_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "handler.serviceLinkMonitorsRequest": {
      "type": "object",
      "properties": {
        "monitor_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "handler.serviceResponse": {
      "type": "object",
      "properties": {
        "account_id": {
          "type": "string"
        },
        "component_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "created_at": {
          "type": "string"
        },
        "dependency_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "dependent_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "description": {
          "type": "string"
        },
        "escalation_policy_id": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "integration_key": {
          "type": "string"
        },
        "monitor_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "name": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "updated_at": {
          "type": "string"
        }
      }
    },
    "handler.setAccountMemberRoleRequest": {
      "type": "object",
      "properties": {
        "role": {
          "type": "string",
          "example": "admin"
        }
      }
    },
    "handler.setCheckerTeamsRequest": {
      "type": "object",
      "properties": {
        "team_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "handler.setEmailRequest": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "example": "user@example.com"
        }
      }
    },
    "handler.setEmailResponse": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "example": "user@example.com"
        },
        "email_verified": {
          "type": "boolean",
          "example": false
        },
        "verification_sent": {
          "type": "boolean",
          "example": true
        }
      }
    },
    "handler.setGeoOverrideRequest": {
      "type": "object",
      "properties": {
        "asn": {
          "type": "integer",
          "example": 13335
        },
        "asn_org": {
          "type": "string",
          "example": "Cloudflare, Inc."
        },
        "country": {
          "type": "string",
          "example": "SG"
        },
        "latitude": {
          "type": "number",
          "example": 1.3521
        },
        "longitude": {
          "type": "number",
          "example": 103.8198
        },
        "region": {
          "type": "string",
          "example": "sg-south"
        }
      }
    },
    "handler.setMonitorChannelsRequest": {
      "type": "object",
      "properties": {
        "channel_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "handler.setMyMonitorNotificationsRequest": {
      "type": "object",
      "properties": {
        "channel_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "handler.setNotificationDefaultsRequest": {
      "type": "object",
      "properties": {
        "channel_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "handler.setNotificationsRequest": {
      "type": "object",
      "properties": {
        "channel_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "handler.setRoleRequest": {
      "type": "object",
      "properties": {
        "role": {
          "description": "\"owner\", \"admin\", or \"member\"",
          "type": "string",
          "example": "admin"
        }
      }
    },
    "handler.shareMetadataResponse": {
      "type": "object",
      "properties": {
        "access_mode": {
          "type": "string",
          "example": "public"
        },
        "created_at": {
          "type": "string",
          "example": "2026-03-01T12:00:00Z"
        },
        "from": {
          "type": "string",
          "example": "2026-03-01T00:00:00Z"
        },
        "monitor_name": {
          "type": "string",
          "example": "My API Monitor"
        },
        "monitor_type": {
          "type": "string",
          "example": "http"
        },
        "redacted_groups": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "to": {
          "type": "string",
          "example": "2026-03-02T00:00:00Z"
        }
      }
    },
    "handler.shareResponse": {
      "type": "object",
      "properties": {
        "access_mode": {
          "type": "string",
          "example": "public"
        },
        "created_at": {
          "type": "string",
          "example": "2026-03-01T12:00:00Z"
        },
        "expires_at": {
          "type": "string",
          "example": "2026-03-08T00:00:00Z"
        },
        "from": {
          "type": "string",
          "example": "2026-03-01T00:00:00Z"
        },
        "id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "include_comments": {
          "type": "boolean"
        },
        "monitor_id": {
          "type": "string",
          "example": "660e8400-e29b-41d4-a716-446655440001"
        },
        "redacted_groups": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "share_url": {
          "type": "string",
          "example": "https://app.oack.io/monitor-snapshot/a1b2c3d4..."
        },
        "to": {
          "type": "string",
          "example": "2026-03-02T00:00:00Z"
        },
        "token": {
          "type": "string",
          "example": "a1b2c3d4..."
        },
        "view_count": {
          "type": "integer",
          "example": 0
        }
      }
    },
    "handler.sharedProbeDetailsResponse": {
      "type": "object",
      "properties": {
        "cdn_geo": {
          "$ref": "#/definitions/handler.cdnGeoResult"
        },
        "cf_log": {
          "$ref": "#/definitions/handler.cfLogEntryResponse"
        },
        "checker_geo": {
          "$ref": "#/definitions/handler.geoResponse"
        },
        "probe": {
          "$ref": "#/definitions/handler.probeResponse"
        },
        "target_geo": {
          "$ref": "#/definitions/handler.geoResponse"
        }
      }
    },
    "handler.slackAppInstallRequest": {
      "type": "object",
      "properties": {
        "bot_token": {
          "type": "string",
          "example": "xoxb-..."
        },
        "bot_user_id": {
          "type": "string",
          "example": "U01234567"
        },
        "default_channel_id": {
          "type": "string",
          "example": "C01234567"
        },
        "incident_channel_mode": {
          "type": "string",
          "example": "thread"
        },
        "reminder_interval_min": {
          "type": "integer",
          "example": 20
        },
        "signing_secret": {
          "type": "string",
          "example": "abc123..."
        },
        "slack_team_id": {
          "type": "string",
          "example": "T01234567"
        },
        "slack_team_name": {
          "type": "string",
          "example": "My Workspace"
        }
      }
    },
    "handler.slackAppInstallResponse": {
      "type": "object",
      "properties": {
        "account_id": {
          "type": "string"
        },
        "bot_user_id": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "default_channel_id": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "incident_channel_mode": {
          "type": "string"
        },
        "reminder_interval_min": {
          "type": "integer"
        },
        "slack_team_id": {
          "type": "string"
        },
        "slack_team_name": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      }
    },
    "handler.snapshotListResponse": {
      "type": "object",
      "properties": {
        "snapshots": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/handler.snapshotResponse"
          }
        }
      }
    },
    "handler.snapshotResponse": {
      "type": "object",
      "properties": {
        "created_at": {
          "type": "string"
        },
        "created_by": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "monitor_count": {
          "type": "integer"
        },
        "summary": {
          "$ref": "#/definitions/handler.bulkSummaryResponse"
        }
      }
    },
    "handler.spCreateTriggerRequest": {
      "type": "object",
      "properties": {
        "auto_create": {
          "type": "boolean",
          "example": true
        },
        "auto_resolve": {
          "type": "boolean",
          "example": true
        },
        "monitor_id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "notify_subscribers": {
          "type": "boolean",
          "example": true
        },
        "severity": {
          "type": "string",
          "enum": [
            "minor",
            "medium",
            "major",
            "critical"
          ],
          "example": "major"
        },
        "template_id": {
          "type": "string",
          "example": ""
        }
      }
    },
    "handler.spTriggerResponse": {
      "type": "object",
      "properties": {
        "auto_create": {
          "type": "boolean"
        },
        "auto_resolve": {
          "type": "boolean"
        },
        "component_id": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "created_by": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "monitor_id": {
          "type": "string"
        },
        "notify_subscribers": {
          "type": "boolean"
        },
        "severity": {
          "type": "string"
        },
        "template_id": {
          "type": "string"
        }
      }
    },
    "handler.spUpdateTriggerRequest": {
      "type": "object",
      "properties": {
        "auto_create": {
          "type": "boolean"
        },
        "auto_resolve": {
          "type": "boolean"
        },
        "notify_subscribers": {
          "type": "boolean"
        },
        "severity": {
          "type": "string"
        },
        "template_id": {
          "type": "string"
        }
      }
    },
    "handler.statusPageAuthRequest": {
      "type": "object",
      "properties": {
        "password": {
          "type": "string",
          "example": "s3cret"
        }
      }
    },
    "handler.statusPageResponse": {
      "type": "object",
      "properties": {
        "account_id": {
          "type": "string"
        },
        "allow_iframe": {
          "type": "boolean"
        },
        "branding_favicon_url": {
          "type": "string"
        },
        "branding_logo_url": {
          "type": "string"
        },
        "branding_primary_color": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "created_by": {
          "type": "string"
        },
        "custom_domain": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "has_password": {
          "type": "boolean"
        },
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "show_historical_uptime": {
          "type": "boolean"
        },
        "slug": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      }
    },
    "handler.subscriberResponse": {
      "type": "object",
      "properties": {
        "channel_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "confirmed_at": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "email_verified": {
          "type": "boolean"
        },
        "id": {
          "type": "string"
        },
        "scope": {
          "type": "string"
        },
        "status_page_id": {
          "type": "string"
        },
        "user_id": {
          "type": "string"
        }
      }
    },
    "handler.subscriptionResponse": {
      "type": "object",
      "properties": {
        "founding_discount_pct": {
          "type": "integer"
        },
        "founding_member": {
          "type": "boolean",
          "example": false
        },
        "founding_member_until": {
          "type": "string"
        },
        "payment_provider": {
          "type": "string",
          "example": "nowpayments"
        },
        "plan": {
          "type": "string",
          "example": "pro"
        },
        "popup_message": {
          "type": "string",
          "example": "Your plan has been upgraded to pro."
        },
        "subscription_expires_at": {
          "type": "string"
        },
        "subscription_status": {
          "type": "string",
          "example": "active"
        }
      }
    },
    "handler.suiteUploadResponse": {
      "type": "object",
      "properties": {
        "deps_url": {
          "type": "string"
        },
        "size_bytes": {
          "type": "integer"
        },
        "suite_url": {
          "type": "string"
        },
        "test_files": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "handler.teamMemberResponse": {
      "type": "object",
      "properties": {
        "avatar_url": {
          "type": "string",
          "example": "https://avatars.githubusercontent.com/u/12345"
        },
        "email": {
          "type": "string",
          "example": "alice@example.com"
        },
        "joined_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        },
        "name": {
          "type": "string",
          "example": "Alice"
        },
        "role": {
          "type": "string",
          "example": "admin"
        },
        "user_id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        }
      }
    },
    "handler.teamResponse": {
      "type": "object",
      "properties": {
        "created_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        },
        "id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "name": {
          "type": "string",
          "example": "Platform"
        },
        "updated_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        }
      }
    },
    "handler.testAlertResultResponse": {
      "type": "object",
      "properties": {
        "channel_id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "delivered": {
          "type": "boolean",
          "example": true
        },
        "error": {
          "type": "string",
          "example": ""
        },
        "type": {
          "type": "string",
          "example": "down"
        }
      }
    },
    "handler.testScriptPollResponse": {
      "type": "object",
      "properties": {
        "result": {
          "$ref": "#/definitions/handler.testScriptResponse"
        },
        "status": {
          "description": "\"running\" or \"done\"",
          "type": "string"
        }
      }
    },
    "handler.testScriptRequest": {
      "type": "object",
      "properties": {
        "env_overrides": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "pw_grep": {
          "type": "string"
        },
        "pw_project": {
          "type": "string"
        },
        "script": {
          "type": "string"
        },
        "suite": {
          "description": "base64 tar.gz for test_suite mode",
          "type": "string"
        }
      }
    },
    "handler.testScriptResponse": {
      "type": "object",
      "properties": {
        "console_messages": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/entity.ConsoleMessage"
          }
        },
        "error": {
          "type": "string"
        },
        "fail_count": {
          "type": "integer"
        },
        "pass_count": {
          "type": "integer"
        },
        "passed": {
          "type": "boolean"
        },
        "report_url": {
          "type": "string"
        },
        "screenshot_url": {
          "type": "string"
        },
        "skip_count": {
          "type": "integer"
        },
        "status": {
          "type": "integer"
        },
        "steps": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/entity.StepResult"
          }
        },
        "test_count": {
          "type": "integer"
        },
        "total_ms": {
          "type": "integer"
        },
        "web_vitals": {
          "$ref": "#/definitions/handler.webVitalsResponse"
        }
      }
    },
    "handler.testScriptSubmitResponse": {
      "type": "object",
      "properties": {
        "test_id": {
          "type": "string"
        }
      }
    },
    "handler.testSubscriptionResultResponse": {
      "type": "object",
      "properties": {
        "channel_id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "delivered": {
          "type": "boolean",
          "example": true
        },
        "error": {
          "type": "string",
          "example": ""
        },
        "type": {
          "type": "string",
          "example": "down"
        }
      }
    },
    "handler.timelineAuthorResponse": {
      "type": "object",
      "properties": {
        "avatar_url": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "handler.timelineEventResponse": {
      "type": "object",
      "properties": {
        "author": {
          "$ref": "#/definitions/handler.timelineAuthorResponse"
        },
        "ended_at": {
          "type": "string"
        },
        "external_id": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "kind": {
          "type": "string"
        },
        "metadata": {
          "type": "object",
          "additionalProperties": {}
        },
        "severity": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "started_at": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      }
    },
    "handler.timelineListResponse": {
      "type": "object",
      "properties": {
        "events": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/handler.timelineEventResponse"
          }
        }
      }
    },
    "handler.traceHopResponse": {
      "type": "object",
      "properties": {
        "asn": {
          "type": "integer"
        },
        "asn_org": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "hop": {
          "type": "integer"
        },
        "hostname": {
          "type": "string"
        },
        "ip": {
          "type": "string"
        },
        "latitude": {
          "type": "number"
        },
        "longitude": {
          "type": "number"
        },
        "loss_pct": {
          "type": "number"
        },
        "rtt_avg_us": {
          "type": "integer"
        },
        "rtt_max_us": {
          "type": "integer"
        },
        "rtt_min_us": {
          "type": "integer"
        }
      }
    },
    "handler.traceListResponse": {
      "type": "object",
      "properties": {
        "traces": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/handler.traceResponse"
          }
        }
      }
    },
    "handler.traceResponse": {
      "type": "object",
      "properties": {
        "checker_id": {
          "type": "string"
        },
        "completed": {
          "type": "boolean"
        },
        "error": {
          "type": "string"
        },
        "hop_count": {
          "type": "integer"
        },
        "hops": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/handler.traceHopResponse"
          }
        },
        "id": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "monitor_id": {
          "type": "string"
        },
        "target_host": {
          "type": "string"
        },
        "total_ms": {
          "type": "integer"
        },
        "traced_at": {
          "type": "string"
        }
      }
    },
    "handler.transferOwnershipRequest": {
      "type": "object",
      "properties": {
        "new_owner_user_id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        }
      }
    },
    "handler.triggerResponse": {
      "type": "object",
      "properties": {
        "action": {
          "type": "string"
        },
        "component_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "condition": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        },
        "id": {
          "type": "string"
        },
        "service_id": {
          "type": "string"
        },
        "severity": {
          "type": "string"
        },
        "template": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      }
    },
    "handler.updateAccountIncidentRequest": {
      "type": "object",
      "properties": {
        "is_private": {
          "type": "boolean"
        },
        "name": {
          "type": "string"
        },
        "owner_id": {
          "type": "string"
        },
        "severity": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "summary": {
          "type": "string"
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "handler.updateAccountRequest": {
      "type": "object",
      "properties": {
        "default_escalation_policy_id": {
          "type": "string"
        },
        "name": {
          "type": "string",
          "example": "Acme Corp"
        }
      }
    },
    "handler.updateAlertChannelRequest": {
      "type": "object",
      "properties": {
        "config": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "enabled": {
          "type": "boolean",
          "example": true
        },
        "name": {
          "type": "string",
          "example": "Production Alerts"
        },
        "type": {
          "type": "string",
          "enum": [
            "slack",
            "webhook",
            "email",
            "telegram",
            "discord",
            "pagerduty",
            "push",
            "sms"
          ],
          "example": "slack"
        }
      }
    },
    "handler.updateAuthSubscriptionRequest": {
      "type": "object",
      "properties": {
        "channel_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "component_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "group_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "scope": {
          "type": "string",
          "enum": [
            "all",
            "components",
            "groups"
          ],
          "example": "components"
        }
      }
    },
    "handler.updateCFIntegrationRequest": {
      "type": "object",
      "properties": {
        "api_token": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        },
        "zone_name": {
          "type": "string"
        }
      }
    },
    "handler.updateChartEventRequest": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string"
        },
        "ended_at": {
          "type": "string"
        },
        "kind": {
          "type": "string"
        },
        "metadata": {
          "type": "object",
          "additionalProperties": {}
        },
        "monitor_id": {
          "type": "string"
        },
        "severity": {
          "type": "string"
        },
        "started_at": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      }
    },
    "handler.updateComponentGroupRequest": {
      "type": "object",
      "properties": {
        "collapsed": {
          "type": "boolean"
        },
        "description": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "position": {
          "type": "integer"
        }
      }
    },
    "handler.updateComponentRequest": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string"
        },
        "display_uptime": {
          "type": "boolean"
        },
        "group_id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "position": {
          "type": "integer"
        },
        "status": {
          "type": "string"
        }
      }
    },
    "handler.updateEnvVarRequest": {
      "type": "object",
      "properties": {
        "is_secret": {
          "type": "boolean",
          "example": true
        },
        "value": {
          "type": "string",
          "example": "new-s3cret"
        }
      }
    },
    "handler.updateExternalLinkRequest": {
      "type": "object",
      "properties": {
        "icon_url": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "time_window_minutes": {
          "type": "integer"
        },
        "url_template": {
          "type": "string"
        }
      }
    },
    "handler.updateIncidentRequest": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "severity": {
          "type": "string",
          "enum": [
            "minor",
            "medium",
            "major",
            "critical"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "investigating",
            "identified",
            "monitoring",
            "resolved"
          ]
        }
      }
    },
    "handler.updateIncidentTemplateRequest": {
      "type": "object",
      "properties": {
        "component_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "message": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "notify_subscribers": {
          "type": "boolean"
        },
        "severity": {
          "type": "string"
        },
        "title": {
          "type": "string"
        }
      }
    },
    "handler.updateMaintenanceRequest": {
      "type": "object",
      "properties": {
        "auto_status_change": {
          "type": "boolean"
        },
        "message": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "notify_subscribers": {
          "type": "boolean"
        },
        "scheduled_duration_minutes": {
          "type": "integer"
        },
        "scheduled_start": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "scheduled",
            "in_progress",
            "completed"
          ]
        }
      }
    },
    "handler.updateMonitorRequest": {
      "type": "object",
      "properties": {
        "aggregate_failure_count": {
          "type": "integer"
        },
        "aggregate_failure_mode": {
          "type": "string"
        },
        "allowed_status_codes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "example": [
            "2xx",
            "3xx"
          ]
        },
        "browser_config": {
          "description": "Browser config (type=browser only).",
          "allOf": [
            {
              "$ref": "#/definitions/entity.BrowserConfig"
            }
          ]
        },
        "cf_zone_integration_id": {
          "type": "string"
        },
        "check_interval_ms": {
          "type": "integer",
          "example": 60000
        },
        "checker_country": {
          "type": "string",
          "example": "DE"
        },
        "checker_id": {
          "type": "string",
          "example": ""
        },
        "checker_region": {
          "type": "string",
          "example": "us-west"
        },
        "domain_expiry_enabled": {
          "type": "boolean",
          "example": true
        },
        "domain_expiry_thresholds": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "failure_threshold": {
          "type": "integer",
          "example": 3
        },
        "follow_redirects": {
          "type": "boolean",
          "example": false
        },
        "headers": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "http_method": {
          "type": "string",
          "example": "GET"
        },
        "http_version": {
          "type": "string",
          "example": ""
        },
        "is_debug_enabled": {
          "type": "boolean",
          "example": false
        },
        "latency_threshold_ms": {
          "type": "integer",
          "example": 10000
        },
        "locations": {
          "description": "Multi-location fields.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/handler.locationRequest"
          }
        },
        "name": {
          "type": "string",
          "example": "Production API v2"
        },
        "resolve_override_ip": {
          "type": "string",
          "example": ""
        },
        "ssl_expiry_enabled": {
          "type": "boolean",
          "example": true
        },
        "ssl_expiry_thresholds": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "timeout_ms": {
          "type": "integer",
          "example": 5000
        },
        "uptime_threshold_critical": {
          "type": "number",
          "example": 95
        },
        "uptime_threshold_degraded": {
          "type": "number",
          "example": 99
        },
        "uptime_threshold_good": {
          "type": "number",
          "example": 99.9
        },
        "url": {
          "type": "string",
          "example": "https://example.com/health"
        }
      }
    },
    "handler.updateNotificationPreferencesRequest": {
      "type": "object",
      "properties": {
        "muted_monitors": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "quiet_hours": {
          "$ref": "#/definitions/handler.quietHoursInput"
        }
      }
    },
    "handler.updatePDIntegrationRequest": {
      "type": "object",
      "properties": {
        "api_key": {
          "type": "string"
        },
        "region": {
          "type": "string"
        },
        "service_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "sync_enabled": {
          "type": "boolean"
        }
      }
    },
    "handler.updateProbeRequest": {
      "type": "object",
      "properties": {
        "checked_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        },
        "connect_ms": {
          "type": "integer",
          "example": 5
        },
        "dns_ms": {
          "type": "integer",
          "example": 35
        },
        "error": {
          "type": "string",
          "example": ""
        },
        "receive_ms": {
          "type": "integer",
          "example": 2
        },
        "send_ms": {
          "type": "integer",
          "example": 1
        },
        "status": {
          "type": "integer",
          "example": 200
        },
        "tls_ms": {
          "type": "integer",
          "example": 12
        },
        "total_ms": {
          "type": "integer",
          "example": 103
        },
        "wait_ms": {
          "type": "integer",
          "example": 48
        }
      }
    },
    "handler.updateServiceRequest": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string"
        },
        "escalation_policy_id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "handler.updateStatusPageRequest": {
      "type": "object",
      "properties": {
        "allow_iframe": {
          "type": "boolean"
        },
        "branding_favicon_url": {
          "type": "string"
        },
        "branding_logo_url": {
          "type": "string"
        },
        "branding_primary_color": {
          "type": "string"
        },
        "custom_domain": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "password": {
          "type": "string"
        },
        "show_historical_uptime": {
          "type": "boolean"
        }
      }
    },
    "handler.updateSubscriptionRequest": {
      "type": "object",
      "properties": {
        "plan": {
          "type": "string",
          "example": "pro"
        }
      }
    },
    "handler.updateTeamRequest": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "example": "Platform Engineering"
        }
      }
    },
    "handler.updateUserPreferencesRequest": {
      "type": "object",
      "properties": {
        "theme": {
          "type": "string",
          "example": "dark"
        },
        "time_format": {
          "type": "string",
          "example": "12h"
        }
      }
    },
    "handler.updateUserRequest": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "example": "alice@example.com"
        },
        "name": {
          "type": "string",
          "example": "Alice Smith"
        }
      }
    },
    "handler.userPreferencesResponse": {
      "type": "object",
      "properties": {
        "theme": {
          "type": "string",
          "example": "light"
        },
        "time_format": {
          "type": "string",
          "example": "24h"
        },
        "user_id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        }
      }
    },
    "handler.userResponse": {
      "type": "object",
      "properties": {
        "avatar": {
          "type": "string",
          "example": "https://lh3.googleusercontent.com/a/photo"
        },
        "created_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        },
        "email": {
          "type": "string",
          "example": "alice@example.com"
        },
        "email_verified": {
          "type": "boolean",
          "example": true
        },
        "id": {
          "type": "string",
          "example": "550e8400-e29b-41d4-a716-446655440000"
        },
        "name": {
          "type": "string",
          "example": "Alice"
        },
        "provider": {
          "type": "string",
          "example": "google"
        },
        "role": {
          "type": "string",
          "example": "user"
        },
        "updated_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        }
      }
    },
    "handler.verifyChannelOTPRequest": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "example": "847291"
        }
      }
    },
    "handler.webVitalsResponse": {
      "type": "object",
      "properties": {
        "cls": {
          "type": "number"
        },
        "fcp_ms": {
          "type": "number"
        },
        "lcp_ms": {
          "type": "number"
        },
        "ttfb_ms": {
          "type": "number"
        }
      }
    },
    "handler.windowMetricsResponse": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string",
          "example": "2026-02-24T00:00:00Z"
        },
        "incident_count": {
          "type": "integer",
          "example": 2
        },
        "mtbf_seconds": {
          "type": "number",
          "example": 302400
        },
        "mttr_seconds": {
          "type": "number",
          "example": 180
        },
        "recovery_count": {
          "type": "integer",
          "example": 2
        },
        "to": {
          "type": "string",
          "example": "2026-03-03T00:00:00Z"
        },
        "total_downtime_seconds": {
          "type": "number",
          "example": 180
        },
        "total_excluded_seconds": {
          "type": "number",
          "example": 0
        },
        "total_uptime_seconds": {
          "type": "number",
          "example": 604620
        },
        "uptime_percent": {
          "type": "number",
          "example": 99.95
        },
        "window_days": {
          "type": "integer",
          "example": 7
        }
      }
    },
    "handler.wsTicketResponse": {
      "type": "object",
      "properties": {
        "expires_in": {
          "type": "integer",
          "example": 30
        },
        "ticket": {
          "type": "string",
          "example": "a3f87c1d..."
        }
      }
    },
    "service.BulkChange": {
      "type": "object",
      "properties": {
        "action": {
          "description": "\"create\", \"update\", \"delete\", \"unchanged\", \"error\"",
          "type": "string"
        },
        "diff": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/service.BulkFieldChange"
          }
        },
        "error": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "index": {
          "type": "integer"
        },
        "monitor": {
          "$ref": "#/definitions/service.BulkMonitorItem"
        },
        "monitor_name": {
          "type": "string"
        }
      }
    },
    "service.BulkFieldChange": {
      "type": "object",
      "properties": {
        "new": {},
        "old": {}
      }
    },
    "service.BulkMonitorItem": {
      "type": "object",
      "properties": {
        "allowed_status_codes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "check_interval_ms": {
          "type": "integer"
        },
        "checker_country": {
          "type": "string"
        },
        "checker_id": {
          "type": "string"
        },
        "checker_region": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "created_by": {
          "type": "string"
        },
        "domain_expiry_enabled": {
          "type": "boolean"
        },
        "domain_expiry_thresholds": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "failure_threshold": {
          "type": "integer"
        },
        "follow_redirects": {
          "type": "boolean"
        },
        "headers": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "health_status": {
          "type": "string"
        },
        "http_method": {
          "type": "string"
        },
        "http_version": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "is_debug_enabled": {
          "type": "boolean"
        },
        "latency_threshold_ms": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "resolve_override_ip": {
          "type": "string"
        },
        "ssl_expiry_enabled": {
          "type": "boolean"
        },
        "ssl_expiry_thresholds": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "status": {
          "description": "Read-only fields included in export, ignored on import.",
          "type": "string"
        },
        "timeout_ms": {
          "type": "integer"
        },
        "trace_interval_ms": {
          "type": "integer"
        },
        "updated_at": {
          "type": "string"
        },
        "uptime_threshold_critical": {
          "type": "number"
        },
        "uptime_threshold_degraded": {
          "type": "number"
        },
        "uptime_threshold_good": {
          "type": "number"
        },
        "url": {
          "type": "string"
        }
      }
    },
    "service.DailyUptime": {
      "type": "object",
      "properties": {
        "date": {
          "description": "\"2026-03-14\"",
          "type": "string"
        },
        "uptime_percent": {
          "description": "99.95",
          "type": "number"
        }
      }
    },
    "service.IncidentAnalytics": {
      "type": "object",
      "properties": {
        "by_severity": {
          "type": "object",
          "additionalProperties": {
            "type": "integer"
          }
        },
        "incident_count": {
          "type": "integer"
        },
        "mttf_seconds": {
          "description": "avg time between incidents",
          "type": "number"
        },
        "mttr_by_severity": {
          "type": "object",
          "additionalProperties": {
            "type": "number",
            "format": "float64"
          }
        },
        "mttr_seconds": {
          "description": "avg resolution time",
          "type": "number"
        },
        "open_action_items": {
          "type": "integer"
        },
        "uptime_pct": {
          "description": "percentage, only for service-scoped",
          "type": "number"
        }
      }
    }
  }
}
