{
  "openapi": "3.1.0",
  "info": {
    "title": "codex-reset.com public API",
    "version": "1.0.0",
    "description": "Codex usage-limit reset data from codex-reset.com: the reset forecast, the canonical Alert (⚠️ Watch / ✅ Reset), the verified reset and banked-grant history, Tibo's recent posts and the mirrored OpenAI status.\n\n**Free and keyless, on one condition — credit.** Anything shown to people (a site, app, bot message, dashboard, MCP tool or API that passes this data on) names the source and links to it where the data appears: `Data: codex-reset.com` linking to https://codex-reset.com/. Server-side readers send a `User-Agent` that identifies the project and a way to reach it, e.g. `myproject/1.0 (+https://myproject.example)`. Readers that republish without credit or hide who they are are blocked without notice. Personal scripts need only the identifying `User-Agent`.\n\nPoll politely: at most once a minute. No authentication. Responses are published copies refreshed about every minute; `x-published-*` headers carry their freshness.\n\nAlso available: a read-only MCP server at https://codex-reset.com/mcp, the history as CSV / JSON / Frictionless Data Package under /data/, an Atom feed at /feed.xml, and https://codex-reset.com/developers for the human-readable guide.",
    "termsOfService": "https://codex-reset.com/terms",
    "contact": {
      "name": "codex-reset.com",
      "url": "https://codex-reset.com/developers"
    },
    "license": {
      "name": "Data: CC BY 4.0 with credit to codex-reset.com",
      "url": "https://creativecommons.org/licenses/by/4.0/"
    }
  },
  "externalDocs": {
    "description": "Developer guide",
    "url": "https://codex-reset.com/developers"
  },
  "servers": [
    {
      "url": "https://codex-reset.com"
    }
  ],
  "security": [],
  "paths": {
    "/api/forecast": {
      "get": {
        "operationId": "getForecast",
        "summary": "Reset forecast and the canonical Alert",
        "description": "Chance of a Codex usage-limit reset in the next 24 and 48 hours, confidence, the last reset, the active Watch (official_signal) and latest_alert.",
        "parameters": [
          {
            "$ref": "#/components/parameters/locale"
          },
          {
            "name": "tz",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "IANA time zone for display copy. Default UTC."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forecast"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/UnsupportedLocale"
          }
        }
      }
    },
    "/api/timeline": {
      "get": {
        "operationId": "getTimeline",
        "summary": "Verified reset and banked-grant history",
        "description": "Every reset row (confirmed: false for promises and replies) and every banked grant with its updates, newest first.",
        "parameters": [
          {
            "$ref": "#/components/parameters/locale"
          },
          {
            "name": "group",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "reset",
                "credits",
                "boost",
                "unlock"
              ],
              "default": "all"
            },
            "description": "boost and unlock are still accepted and return nothing."
          },
          {
            "name": "preview",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "1",
                "0"
              ]
            },
            "description": "1: only rows that name a forward window; 0: none of them."
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Timeline"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/UnsupportedLocale"
          }
        }
      }
    },
    "/api/feed": {
      "get": {
        "operationId": "getFeed",
        "summary": "Tibo's recent posts",
        "description": "The hot feed: posts a reset lane claims, display-only context posts, the site's observed banked grants and the timeline rows. Classification envelopes and internal provenance are stripped.",
        "parameters": [
          {
            "$ref": "#/components/parameters/locale"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Feed"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/UnsupportedLocale"
          }
        }
      }
    },
    "/api/push/latest": {
      "get": {
        "operationId": "getLatestPushAlert",
        "summary": "Latest Alert, as sent to Web Push",
        "description": "The latest sanitized regular Reset or strong Watch. An expired Watch can remain until a newer Alert.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PushLatest"
                }
              }
            }
          }
        }
      }
    },
    "/api/push/key": {
      "get": {
        "operationId": "getPushKey",
        "summary": "Web Push VAPID public key",
        "description": "Present only while Web Push is fully configured.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PushKey"
                }
              }
            }
          },
          "404": {
            "description": "Web Push is not configured."
          }
        }
      }
    },
    "/api/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Liveness of the reset chain",
        "description": "overall_status covers the core chain only; Alert and #tibo receipts are reported separately.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            }
          }
        }
      }
    },
    "/api/status": {
      "get": {
        "operationId": "getStatus",
        "summary": "Mirrored OpenAI status (current)",
        "description": "",
        "parameters": [
          {
            "$ref": "#/components/parameters/locale"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/UnsupportedLocale"
          }
        }
      }
    },
    "/api/status-history": {
      "get": {
        "operationId": "getStatusHistory",
        "summary": "Mirrored OpenAI status (incident history)",
        "description": "",
        "parameters": [
          {
            "$ref": "#/components/parameters/locale"
          },
          {
            "name": "range",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "30d",
                "90d",
                "180d"
              ],
              "default": "90d"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusHistory"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/UnsupportedLocale"
          }
        }
      }
    },
    "/api/juice": {
      "get": {
        "operationId": "getJuice",
        "summary": "Codex \"juice\" (rate-limit allowance) observations",
        "description": "",
        "parameters": [
          {
            "name": "range",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "7d",
                "30d",
                "90d"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Juice"
                }
              }
            }
          }
        }
      }
    },
    "/api/usage-reference": {
      "get": {
        "operationId": "getUsageReference",
        "summary": "Reference usage curve across a reset cycle",
        "description": "An anonymous day-by-day curve of percent remaining. May legitimately be empty (fresh: false).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageReference"
                }
              }
            }
          }
        }
      }
    },
    "/api/reset-poll": {
      "get": {
        "operationId": "getResetPoll",
        "summary": "Reader poll on the next reset window",
        "description": "",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResetPoll"
                }
              }
            }
          }
        }
      }
    },
    "/api/effort-evidence": {
      "get": {
        "operationId": "getEffortEvidence",
        "summary": "Effort evidence dataset",
        "description": "Backs the site's claims; answers 503 while the dataset is unavailable.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EffortEvidence"
                }
              }
            }
          },
          "503": {
            "description": "Dataset unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EffortEvidence"
                }
              }
            }
          }
        }
      }
    },
    "/feed.xml": {
      "get": {
        "operationId": "getAtomFeed",
        "summary": "Atom feed of reset events",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/atom+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/data/codex-resets.csv": {
      "get": {
        "operationId": "getResetHistoryCsv",
        "summary": "Reset history as CSV",
        "description": "RFC 4180, UTF-8, header row; one row per event (see DatasetRow). CC BY 4.0.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable; retry in a minute."
          }
        }
      }
    },
    "/data/codex-resets.json": {
      "get": {
        "operationId": "getResetHistoryJson",
        "summary": "Reset history as JSON",
        "description": "Title, licence (CC BY 4.0), attribution, coverage, counts, the field list and the rows.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Dataset"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable; retry in a minute."
          }
        }
      }
    },
    "/data/datapackage.json": {
      "get": {
        "operationId": "getResetHistoryDataPackage",
        "summary": "Reset history as a Frictionless Data Package",
        "description": "Tabular data package pointing at the CSV, with the same Table Schema.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable; retry in a minute."
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "locale": {
        "name": "locale",
        "in": "query",
        "schema": {
          "type": "string",
          "enum": [
            "zh",
            "ja",
            "es"
          ]
        },
        "description": "Adds translated copy (localized_summary, localized_text). Omit for English."
      }
    },
    "responses": {
      "UnsupportedLocale": {
        "description": "The locale is not one of zh, ja, es.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "error"
              ],
              "properties": {
                "error": {
                  "const": "unsupported_locale"
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "FeedPost": {
        "type": "object",
        "description": "One of Tibo's posts that a reset lane claims.",
        "required": [
          "id",
          "text",
          "at",
          "url",
          "is_reply",
          "tibo_lane",
          "explicit_reset_claim"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9]{5,25}$",
            "description": "X post id."
          },
          "text": {
            "type": "string"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "is_reply": {
            "type": "boolean"
          },
          "replying_to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tibo_lane": {
            "type": "string",
            "enum": [
              "reset_announcement",
              "reset_related"
            ]
          },
          "explicit_reset_claim": {
            "type": "boolean"
          },
          "banked_state": {
            "type": "string",
            "enum": [
              "announced",
              "arriving",
              "available",
              "unknown"
            ]
          },
          "separate_grant": {
            "type": "boolean",
            "description": "A banked row the site files as a grant of its own; never merge it with banked_observations."
          },
          "replies": {
            "type": "integer"
          },
          "reposts": {
            "type": "integer"
          },
          "likes": {
            "type": "integer"
          }
        }
      },
      "RadarContextPost": {
        "type": "object",
        "description": "A recent post no reset lane claims. Display-only: never an alert, reset or forecast input.",
        "required": [
          "id",
          "text",
          "at",
          "url",
          "display_kind",
          "visibility_only"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9]{5,25}$",
            "description": "X post id."
          },
          "text": {
            "type": "string"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "display_kind": {
            "const": "context"
          },
          "visibility_only": {
            "const": true
          }
        }
      },
      "BankedObservation": {
        "type": "object",
        "description": "A banked grant the site's own monitoring saw land.",
        "required": [
          "id",
          "kind",
          "source",
          "banked_state",
          "at",
          "after_announcement",
          "title",
          "text"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The Event id, not a post id."
          },
          "kind": {
            "const": "banked"
          },
          "source": {
            "const": "observed"
          },
          "banked_state": {
            "const": "available"
          },
          "at": {
            "type": "string",
            "format": "date-time",
            "description": "Grant time."
          },
          "after_announcement": {
            "type": "boolean"
          },
          "title": {
            "type": "string"
          },
          "text": {
            "type": "string",
            "description": "The channel sentence, English."
          }
        }
      },
      "Feed": {
        "type": "object",
        "required": [
          "fetched_at",
          "source",
          "stale",
          "tweets",
          "radar_context",
          "banked_observations",
          "events"
        ],
        "properties": {
          "fetched_at": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "type": "string"
          },
          "stale": {
            "type": "boolean"
          },
          "newest_post_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "tweets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeedPost"
            }
          },
          "radar_context": {
            "type": "array",
            "maxItems": 10,
            "items": {
              "$ref": "#/components/schemas/RadarContextPost"
            },
            "description": "Newest posts of the last 14 days that no reset lane claims; tweets ∪ radar_context sorted by at is the raw recent timeline."
          },
          "banked_observations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BankedObservation"
            },
            "description": "Newest first; always an array."
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimelineEvent"
            },
            "description": "The same rows as /api/timeline events."
          }
        }
      },
      "AlertWindow": {
        "type": "object",
        "required": [
          "label",
          "start_at",
          "end_at",
          "time_zone"
        ],
        "properties": {
          "label": {
            "type": "string"
          },
          "start_at": {
            "type": "string",
            "format": "date-time"
          },
          "end_at": {
            "type": "string",
            "format": "date-time"
          },
          "time_zone": {
            "type": "string",
            "description": "IANA time zone of Tibo's words."
          },
          "target_kind": {
            "type": "string"
          },
          "target_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "LatestAlert": {
        "type": "object",
        "description": "The canonical Alert: the latest ⚠️ Watch or ✅ Reset. Retained until a newer Alert replaces it.",
        "required": [
          "id",
          "kind",
          "state",
          "source_at",
          "summary",
          "score",
          "window",
          "corrected"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "watch",
              "reset"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "expired",
              "confirmed"
            ],
            "description": "A Watch is active or expired; a Reset is confirmed."
          },
          "source_at": {
            "type": "string",
            "format": "date-time"
          },
          "summary": {
            "type": "string"
          },
          "url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "score": {
            "anyOf": [
              {
                "type": "integer",
                "enum": [
                  83,
                  93
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "window": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AlertWindow"
              },
              {
                "type": "null"
              }
            ]
          },
          "pending": {
            "type": "string",
            "enum": [
              "done",
              "on_its_way"
            ],
            "description": "⌛️ A Watch rung by Tibo's own completion statement before the site's monitor measured the reset; score and window are then null."
          },
          "corrected": {
            "type": "boolean"
          },
          "confirmation_source": {
            "type": "string"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "observation_message": {
            "type": "string"
          },
          "confirmed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "confirmation_url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "localized_summary": {
            "type": "string",
            "description": "Locale responses only."
          },
          "translation_status": {
            "type": "string",
            "description": "Locale responses only."
          }
        }
      },
      "Probabilities": {
        "type": "object",
        "required": [
          "rounded_24h",
          "rounded_48h"
        ],
        "properties": {
          "rounded_24h": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100,
            "description": "Chance (%) of a reset in the next 24 hours."
          },
          "rounded_48h": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100,
            "description": "Chance (%) of a reset in the next 48 hours."
          },
          "raw_24h": {
            "type": "number"
          },
          "raw_48h": {
            "type": "number"
          },
          "range_24h": {
            "type": "object",
            "description": "Wilson sampling band; informational."
          },
          "range_48h": {
            "type": "object",
            "description": "Wilson sampling band; informational."
          }
        }
      },
      "Forecast": {
        "type": "object",
        "required": [
          "updated_at",
          "probabilities",
          "confidence",
          "last_reset_at",
          "official_signal",
          "latest_alert"
        ],
        "properties": {
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "probabilities": {
            "$ref": "#/components/schemas/Probabilities"
          },
          "confidence": {
            "type": "string"
          },
          "last_reset_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "official_signal": {
            "anyOf": [
              {
                "type": "object",
                "description": "The currently active Watch only; null once its window closes, a later Reset lands, or a banked reset answers it."
              },
              {
                "type": "null"
              }
            ]
          },
          "context": {
            "type": "object",
            "description": "Tibo context of the last seven days (QUIET / TEASE / UNCLEAR). Informational only: never changes the probabilities."
          },
          "wait_comparison": {
            "anyOf": [
              {
                "type": "object",
                "description": "The current wait against the latest eight completed reset intervals."
              },
              {
                "type": "null"
              }
            ]
          },
          "model": {
            "type": "object"
          },
          "backtest": {
            "type": "object"
          },
          "latest_alert": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LatestAlert"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "TimelineEvent": {
        "type": "object",
        "required": [
          "id",
          "date",
          "type",
          "group",
          "summary",
          "announced_at"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "type": {
            "type": "string"
          },
          "group": {
            "type": "string",
            "enum": [
              "reset",
              "credits",
              "boost",
              "unlock"
            ],
            "description": "credits = a banked grant or its update. /api/timeline returns only reset and credits; /api/feed events may still carry boost and unlock rows."
          },
          "summary": {
            "type": "string",
            "description": "≤180-character excerpt, or the site's own summary for an observed row."
          },
          "text": {
            "type": "string",
            "description": "Credits rows: the full post."
          },
          "localized_summary": {
            "type": "string"
          },
          "localized_text": {
            "type": "string"
          },
          "url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "announced_at": {
            "type": "string",
            "format": "date-time"
          },
          "announcement_state": {
            "type": "string",
            "description": "announced = ✅ for an ordinary reset."
          },
          "banked_state": {
            "type": "string",
            "enum": [
              "announced",
              "arriving",
              "available",
              "unknown"
            ]
          },
          "source": {
            "type": "string"
          },
          "observed_variant": {
            "type": "string"
          },
          "preview": {
            "type": "boolean"
          },
          "confirmed": {
            "type": "boolean",
            "description": "A reset row counts as a verified global reset; banked rows are true."
          },
          "banked_grant": {
            "type": "boolean",
            "description": "true on the row that is a banked grant; false on a grant's later updates."
          }
        }
      },
      "Timeline": {
        "type": "object",
        "required": [
          "updated_at",
          "events",
          "stats"
        ],
        "properties": {
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "events": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/TimelineEvent"
                },
                {
                  "required": [
                    "confirmed",
                    "banked_grant"
                  ],
                  "properties": {
                    "group": {
                      "enum": [
                        "reset",
                        "credits"
                      ]
                    }
                  }
                }
              ]
            }
          },
          "stats": {
            "type": "object"
          }
        }
      },
      "Health": {
        "type": "object",
        "required": [
          "ok",
          "overall_status",
          "stale",
          "alerts_v3"
        ],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "overall_status": {
            "type": "string",
            "description": "Core reset chain only."
          },
          "stale": {
            "type": "boolean"
          },
          "newest_post_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_discovery": {
            "type": "object"
          },
          "alerts_v3": {
            "type": "object",
            "description": "The three independent Alert receipts (Telegram, Discord, Web Push)."
          },
          "tibo_visibility": {
            "type": "object",
            "description": "The two independent #tibo receipts."
          }
        }
      },
      "StatusSurface": {
        "type": "object",
        "required": [
          "id",
          "label",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "Status": {
        "type": "object",
        "required": [
          "indicator",
          "description",
          "degraded",
          "surfaces",
          "checked_at"
        ],
        "properties": {
          "indicator": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "degraded": {
            "type": "boolean"
          },
          "surfaces": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusSurface"
            }
          },
          "active_incident": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "checked_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "StatusHistory": {
        "type": "object",
        "required": [
          "range",
          "checked_at",
          "current",
          "incidents"
        ],
        "properties": {
          "range": {
            "type": "string",
            "enum": [
              "30d",
              "90d",
              "180d"
            ]
          },
          "checked_at": {
            "type": "string",
            "format": "date-time"
          },
          "current": {
            "type": "object"
          },
          "incidents": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "Juice": {
        "type": "object",
        "required": [
          "status",
          "checked_at",
          "range"
        ],
        "properties": {
          "status": {
            "type": "string"
          },
          "checked_at": {
            "type": "string",
            "format": "date-time"
          },
          "range": {
            "type": "string",
            "enum": [
              "7d",
              "30d",
              "90d"
            ]
          }
        }
      },
      "UsageReference": {
        "type": "object",
        "required": [
          "fresh",
          "days"
        ],
        "properties": {
          "fresh": {
            "type": "boolean",
            "description": "false while the usage verifier is dormant (data older than 36 h); then show nothing."
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "days": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "day_of_cycle",
                "percent_remaining"
              ],
              "properties": {
                "date": {
                  "type": "string",
                  "format": "date"
                },
                "day_of_cycle": {
                  "type": "number"
                },
                "percent_remaining": {
                  "type": "number"
                }
              }
            }
          }
        }
      },
      "ResetPoll": {
        "type": "object",
        "required": [
          "open",
          "windows"
        ],
        "properties": {
          "open": {
            "type": "boolean"
          },
          "windows": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "tally": {
            "type": "object",
            "description": "Aggregates only once there are at least 5 votes."
          }
        }
      },
      "EffortEvidence": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string"
          },
          "data": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "PushKey": {
        "type": "object",
        "required": [
          "enabled",
          "public_key"
        ],
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "public_key": {
            "type": "string",
            "description": "VAPID public key."
          }
        }
      },
      "PushLatest": {
        "type": "object",
        "required": [
          "alert"
        ],
        "properties": {
          "alert": {
            "anyOf": [
              {
                "type": "object",
                "description": "The latest regular Reset or strong Watch, from the same state as forecast.latest_alert.",
                "required": [
                  "id",
                  "kind",
                  "event_id"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "event_id": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  },
                  "at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "url": {
                    "type": "string"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "DatasetRow": {
        "type": "object",
        "required": [
          "event_id",
          "type",
          "announced_at",
          "date",
          "source"
        ],
        "properties": {
          "event_id": {
            "type": "string",
            "description": "Stable id: the X post id, the post id plus \"-banked\" for the grant a reset post also gave, or the site's own id for a grant only its monitoring saw."
          },
          "type": {
            "type": "string",
            "enum": [
              "reset",
              "banked"
            ],
            "description": "reset (usage limits reset for all users) or banked (a reset credit added to accounts for later use)."
          },
          "announced_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the event was announced, UTC (ISO 8601). For a post, its exact time from the post id."
          },
          "date": {
            "type": "string",
            "format": "date",
            "description": "UTC date of announced_at."
          },
          "source": {
            "type": "string",
            "enum": [
              "post",
              "observed"
            ],
            "description": "post (an X post by @thsottiaux) or observed (the site's monitoring accounts; no post)."
          },
          "post_url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "const": ""
              }
            ],
            "description": "The source post on X; empty for an observed grant."
          },
          "banked_state": {
            "type": "string",
            "enum": [
              "",
              "announced",
              "arriving",
              "available",
              "unknown"
            ],
            "description": "For a banked grant: announced, arriving, available or unknown. Empty for a reset."
          },
          "summary": {
            "type": "string",
            "description": "One-line English summary of the announcement."
          }
        }
      },
      "Dataset": {
        "type": "object",
        "required": [
          "title",
          "license",
          "attribution",
          "fields",
          "events"
        ],
        "properties": {
          "title": {
            "type": "string"
          },
          "license": {
            "type": "object"
          },
          "attribution": {
            "type": "string"
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DatasetRow"
            }
          }
        }
      }
    }
  }
}