{
  "openapi": "3.1.0",
  "info": {
    "title": "APIzone Status API",
    "version": "1.0.0",
    "description": "Independent, real-time status monitoring for 200+ popular APIs. No authentication required; 60 requests/minute per IP.",
    "contact": {
      "url": "https://apizone.io"
    }
  },
  "servers": [
    {
      "url": "https://apizone.io"
    }
  ],
  "paths": {
    "/api/v1/status": {
      "get": {
        "operationId": "listStatus",
        "summary": "Status for all monitored APIs",
        "description": "Returns every monitored API with its current status and last measured latency.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "services": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ServiceStatus"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/status/{slug}": {
      "get": {
        "operationId": "getStatus",
        "summary": "Status for one API",
        "description": "Current status plus the last 24h of checks, 90-day daily uptime, and recent incidents.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "stripe"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Unknown service"
          }
        }
      }
    },
    "/api/v1/uptime/{slug}": {
      "get": {
        "operationId": "getUptime",
        "summary": "Uptime summary for one API",
        "description": "Uptime percentage and latency (p50/p95) over 24h, 7d, 30d, and 90d.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "stripe"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "slug": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "category": {
                      "type": "string"
                    },
                    "uptime": {
                      "type": "object",
                      "additionalProperties": {
                        "$ref": "#/components/schemas/UptimeWindow"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown service"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ServiceStatus": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "operational",
              "degraded",
              "down",
              "unknown"
            ]
          },
          "lastCheckAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "lastLatencyMs": {
            "type": [
              "integer",
              "null"
            ]
          },
          "url": {
            "type": "string"
          }
        }
      },
      "UptimeWindow": {
        "type": "object",
        "properties": {
          "uptimePct": {
            "type": [
              "number",
              "null"
            ]
          },
          "p50LatencyMs": {
            "type": [
              "integer",
              "null"
            ]
          },
          "p95LatencyMs": {
            "type": [
              "integer",
              "null"
            ]
          },
          "checkCount": {
            "type": "integer"
          }
        }
      }
    }
  }
}