{
  "openapi": "3.1.0",
  "info": {
    "title": "Ravensight programmatic data API",
    "version": "1.0.0",
    "description": "Existing Ravensight API. Bearer token in Authorization only. Standard reads and organization operations cost 100,000 weighted events; warehouse SQL uses the documented scan formula. GET /games is free. Usage billing must be enabled."
  },
  "servers": [
    {
      "url": "https://api.ravensight.io"
    }
  ],
  "paths": {
    "/api/v1/data/games": {
      "get": {
        "operationId": "list_games",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "minLength": 8
            },
            "description": "Reuse an ID only to retry the same operation."
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data/games/{gameId}/metrics": {
      "get": {
        "operationId": "get_metrics",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "minLength": 8
            },
            "description": "Reuse an ID only to retry the same operation."
          },
          {
            "name": "gameId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "include_synthetic",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "boolean"
              ],
              "enum": [
                "exclude",
                "include",
                "only",
                true,
                false
              ],
              "description": "exclude (default), include or only; true is include."
            }
          },
          {
            "name": "segment_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Saved segment ID belonging to this game. Selects players matching its rules during the query window."
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data/games/{gameId}/overview": {
      "get": {
        "operationId": "get_overview",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "minLength": 8
            },
            "description": "Reuse an ID only to retry the same operation."
          },
          {
            "name": "gameId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "day",
                "hour"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "include_synthetic",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "boolean"
              ],
              "enum": [
                "exclude",
                "include",
                "only",
                true,
                false
              ],
              "description": "exclude (default), include or only; true is include."
            }
          },
          {
            "name": "segment_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Saved segment ID belonging to this game. Selects players matching its rules during the query window."
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data/games/{gameId}/retention": {
      "get": {
        "operationId": "get_retention",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "minLength": 8
            },
            "description": "Reuse an ID only to retry the same operation."
          },
          {
            "name": "gameId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 0,
                "maximum": 90
              },
              "minItems": 1,
              "maxItems": 9,
              "description": "Default [1, 7]."
            },
            "style": "form",
            "explode": false
          },
          {
            "name": "mode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "classic",
                "rolling"
              ]
            }
          },
          {
            "name": "cohortBy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "day",
                "week"
              ],
              "description": "Default day; week groups by Monday."
            }
          },
          {
            "name": "startEvent",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Cohort on a player's first one of this event."
            }
          },
          {
            "name": "returnEvent",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Only this event counts as a return."
            }
          },
          {
            "name": "cumulative",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "include_synthetic",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "boolean"
              ],
              "enum": [
                "exclude",
                "include",
                "only",
                true,
                false
              ],
              "description": "exclude (default), include or only; true is include."
            }
          },
          {
            "name": "segment_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Saved segment ID belonging to this game. Selects players matching its rules during the query window."
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data/games/{gameId}/funnel": {
      "get": {
        "operationId": "get_funnel",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "minLength": 8
            },
            "description": "Reuse an ID only to retry the same operation."
          },
          {
            "name": "gameId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "steps",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Event names in the order they should happen, 2 to 8 of them. Exact names: check get_overview's topEvents if unsure."
            },
            "style": "form",
            "explode": false
          },
          {
            "name": "windowSeconds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "How long a player has to finish the whole funnel. Defaults to a day; 30 days is the maximum."
            }
          },
          {
            "name": "countBy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "players",
                "sessions"
              ],
              "description": "Count distinct players (default) or distinct sessions. Use sessions when the funnel is meant to happen in one sitting."
            }
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              },
              "description": "Optional event-property filters, e.g. {\"difficulty\": \"hard\"}. Up to five; values are compared as text."
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "include_synthetic",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "boolean"
              ],
              "enum": [
                "exclude",
                "include",
                "only",
                true,
                false
              ],
              "description": "exclude (default), include or only; true is include."
            }
          },
          {
            "name": "segment_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Saved segment ID belonging to this game. Selects players matching its rules during the query window."
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data/games/{gameId}/breakdown": {
      "get": {
        "operationId": "get_property_breakdown",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "minLength": 8
            },
            "description": "Reuse an ID only to retry the same operation."
          },
          {
            "name": "gameId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "property",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "The payload key to break down."
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Distinct values to rank (1-20, default 20)."
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "include_synthetic",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "boolean"
              ],
              "enum": [
                "exclude",
                "include",
                "only",
                true,
                false
              ],
              "description": "exclude (default), include or only; true is include."
            }
          },
          {
            "name": "segment_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Saved segment ID belonging to this game. Selects players matching its rules during the query window."
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data/games/{gameId}/monetization": {
      "get": {
        "operationId": "get_monetization",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "minLength": 8
            },
            "description": "Reuse an ID only to retry the same operation."
          },
          {
            "name": "gameId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "include_synthetic",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "boolean"
              ],
              "enum": [
                "exclude",
                "include",
                "only",
                true,
                false
              ],
              "description": "exclude (default), include or only; true is include."
            }
          },
          {
            "name": "segment_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Saved segment ID belonging to this game. Selects players matching its rules during the query window."
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data/games/{gameId}/economy": {
      "get": {
        "operationId": "get_economy",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "minLength": 8
            },
            "description": "Reuse an ID only to retry the same operation."
          },
          {
            "name": "gameId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resource",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "Default the busiest."
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "include_synthetic",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "boolean"
              ],
              "enum": [
                "exclude",
                "include",
                "only",
                true,
                false
              ],
              "description": "exclude (default), include or only; true is include."
            }
          },
          {
            "name": "segment_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Saved segment ID belonging to this game. Selects players matching its rules during the query window."
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data/games/{gameId}/health": {
      "get": {
        "operationId": "get_health",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "minLength": 8
            },
            "description": "Reuse an ID only to retry the same operation."
          },
          {
            "name": "gameId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "include_synthetic",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "boolean"
              ],
              "enum": [
                "exclude",
                "include",
                "only",
                true,
                false
              ],
              "description": "exclude (default), include or only; true is include."
            }
          },
          {
            "name": "segment_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Saved segment ID belonging to this game. Selects players matching its rules during the query window."
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data/games/{gameId}/progression": {
      "get": {
        "operationId": "get_progression",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "minLength": 8
            },
            "description": "Reuse an ID only to retry the same operation."
          },
          {
            "name": "gameId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "p1",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "p2",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "description": "Needs p1."
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "include_synthetic",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "boolean"
              ],
              "enum": [
                "exclude",
                "include",
                "only",
                true,
                false
              ],
              "description": "exclude (default), include or only; true is include."
            }
          },
          {
            "name": "segment_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Saved segment ID belonging to this game. Selects players matching its rules during the query window."
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data/games/{gameId}/distribution": {
      "get": {
        "operationId": "get_distribution",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "minLength": 8
            },
            "description": "Reuse an ID only to retry the same operation."
          },
          {
            "name": "gameId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "metric",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "session_length",
                "sessions_per_player",
                "playtime_per_player",
                "revenue_per_payer",
                "events_per_session"
              ]
            }
          },
          {
            "name": "buckets",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 5,
              "maximum": 50
            }
          },
          {
            "name": "min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 3
            }
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "include_synthetic",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "boolean"
              ],
              "enum": [
                "exclude",
                "include",
                "only",
                true,
                false
              ],
              "description": "exclude (default), include or only; true is include."
            }
          },
          {
            "name": "segment_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Saved segment ID belonging to this game. Selects players matching its rules during the query window."
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data/games/{gameId}/events": {
      "get": {
        "operationId": "export_events",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "minLength": 8
            },
            "description": "Reuse an ID only to retry the same operation."
          },
          {
            "name": "gameId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "skip",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "name": "include_synthetic",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "exclude",
                "include",
                "only"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data/games/{gameId}/realtime": {
      "get": {
        "operationId": "get_realtime",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "minLength": 8
            },
            "description": "Reuse an ID only to retry the same operation."
          },
          {
            "name": "gameId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_synthetic",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "boolean"
              ],
              "enum": [
                "exclude",
                "include",
                "only",
                true,
                false
              ],
              "description": "exclude (default), include or only; true is include."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Last 24 hours by UTC hour"
      }
    },
    "/api/v1/data/games/{gameId}/anomalies": {
      "get": {
        "operationId": "list_anomalies",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "minLength": 8
            },
            "description": "Reuse an ID only to retry the same operation."
          },
          {
            "name": "gameId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "include_synthetic",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "boolean"
              ],
              "enum": [
                "exclude",
                "include",
                "only",
                true,
                false
              ],
              "description": "exclude (default), include or only; true is include."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Read deterministic daily anomalies"
      }
    },
    "/api/v1/data/games/{gameId}/explore": {
      "get": {
        "operationId": "explore",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "minLength": 8
            },
            "description": "Reuse an ID only to retry the same operation."
          },
          {
            "name": "gameId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "from"
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "to"
          },
          {
            "name": "events",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated event names, at most 20."
          },
          {
            "name": "include_synthetic",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "include_synthetic"
          },
          {
            "name": "measure",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "measure"
          },
          {
            "name": "groupBy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "groupBy"
          },
          {
            "name": "splitBy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "splitBy"
          },
          {
            "name": "propKey",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "propKey"
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "platform"
          },
          {
            "name": "gameVersion",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "gameVersion"
          },
          {
            "name": "segment_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Saved segment ID belonging to this game. Selects players matching its rules during the query window."
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Custom aggregates"
      }
    },
    "/api/v1/data/games/{gameId}/engagement": {
      "get": {
        "operationId": "get_engagement_matrix",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "minLength": 8
            },
            "description": "Reuse an ID only to retry the same operation."
          },
          {
            "name": "gameId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "from"
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "to"
          },
          {
            "name": "events",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated event names, at most 20."
          },
          {
            "name": "include_synthetic",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "include_synthetic"
          },
          {
            "name": "segment_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Saved segment ID belonging to this game. Selects players matching its rules during the query window."
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Feature engagement matrix"
      }
    },
    "/api/v1/data/games/{gameId}/experiment-results": {
      "get": {
        "operationId": "get_experiment_results",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "minLength": 8
            },
            "description": "Reuse an ID only to retry the same operation."
          },
          {
            "name": "gameId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "experiment_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9_]{0,63}$"
            },
            "description": "Experiment key in this game environment."
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Feature engagement matrix"
      }
    },
    "/api/v1/data/org/games": {
      "get": {
        "operationId": "org_list_games",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            "description": "Reuse only for the identical operation retry."
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Resource or operation ID conflict"
          }
        },
        "summary": "List games",
        "description": "One programmatic call (100,000 weighted events). Whole-studio token required. Lists cap at 500 rows and return truncated. Invitations require owner role; other lists require org:read."
      },
      "post": {
        "operationId": "org_create_game",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            "description": "Reuse only for the identical operation retry."
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Resource or operation ID conflict"
          }
        },
        "summary": "Create game",
        "description": "One programmatic call (100,000 weighted events). Whole-studio token required. Lists cap at 500 rows and return truncated. Owner-enabled canManage plus current action role required. No money or token management; ingest keys only through the key operations. Cannot remove self or owner.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "gameId": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9_-]{1,64}$"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "engine": {
                    "type": "string"
                  },
                  "environment": {
                    "type": "string"
                  },
                  "projectId": {
                    "type": "string"
                  }
                },
                "required": [
                  "gameId",
                  "name"
                ]
              }
            }
          }
        }
      }
    },
    "/api/v1/data/org/projects": {
      "get": {
        "operationId": "org_list_projects",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            "description": "Reuse only for the identical operation retry."
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Resource or operation ID conflict"
          }
        },
        "summary": "List projects",
        "description": "One programmatic call (100,000 weighted events). Whole-studio token required. Lists cap at 500 rows and return truncated. Invitations require owner role; other lists require org:read."
      },
      "post": {
        "operationId": "org_create_project",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            "description": "Reuse only for the identical operation retry."
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Resource or operation ID conflict"
          }
        },
        "summary": "Create project",
        "description": "One programmatic call (100,000 weighted events). Whole-studio token required. Lists cap at 500 rows and return truncated. Owner-enabled canManage plus current action role required. No money or token management; ingest keys only through the key operations. Cannot remove self or owner.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "engine": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      }
    },
    "/api/v1/data/org/members": {
      "get": {
        "operationId": "org_list_members",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            "description": "Reuse only for the identical operation retry."
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Resource or operation ID conflict"
          }
        },
        "summary": "List members",
        "description": "One programmatic call (100,000 weighted events). Whole-studio token required. Lists cap at 500 rows and return truncated. Invitations require owner role; other lists require org:read."
      }
    },
    "/api/v1/data/org/invites": {
      "get": {
        "operationId": "org_list_invites",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            "description": "Reuse only for the identical operation retry."
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Resource or operation ID conflict"
          }
        },
        "summary": "List invites",
        "description": "One programmatic call (100,000 weighted events). Whole-studio token required. Lists cap at 500 rows and return truncated. Invitations require owner role; other lists require org:read."
      },
      "post": {
        "operationId": "org_create_invite",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            "description": "Reuse only for the identical operation retry."
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Resource or operation ID conflict"
          }
        },
        "summary": "Create invite",
        "description": "One programmatic call (100,000 weighted events). Whole-studio token required. Lists cap at 500 rows and return truncated. Owner-enabled canManage plus current action role required. No money or token management; ingest keys only through the key operations. Cannot remove self or owner.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "member",
                      "admin",
                      "viewer"
                    ]
                  }
                },
                "required": [
                  "email"
                ]
              }
            }
          }
        }
      }
    },
    "/api/v1/data/org/games/{gameId}": {
      "patch": {
        "operationId": "org_update_game",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            "description": "Reuse only for the identical operation retry."
          },
          {
            "name": "gameId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "environment_locked (a game whose key has been used cannot move from a public environment to an internal one, and a used production game keeps its environment), environment_conflict, or an operation ID conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Update game",
        "description": "One programmatic call (100,000 weighted events). Whole-studio token required. Lists cap at 500 rows and return truncated. Owner-enabled canManage plus current action role required. No money or token management; ingest keys only through the key operations. Cannot remove self or owner.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "environment": {
                    "type": "string"
                  }
                },
                "required": [],
                "minProperties": 1
              }
            }
          }
        }
      }
    },
    "/api/v1/data/org/members/{userId}": {
      "delete": {
        "operationId": "org_remove_member",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            "description": "Reuse only for the identical operation retry."
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Resource or operation ID conflict"
          }
        },
        "summary": "Remove member",
        "description": "One programmatic call (100,000 weighted events). Whole-studio token required. Lists cap at 500 rows and return truncated. Owner-enabled canManage plus current action role required. No money or token management; ingest keys only through the key operations. Cannot remove self or owner."
      }
    },
    "/api/v1/data/org/invites/{inviteId}": {
      "delete": {
        "operationId": "org_revoke_invite",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            "description": "Reuse only for the identical operation retry."
          },
          {
            "name": "inviteId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Resource or operation ID conflict"
          }
        },
        "summary": "Revoke invite",
        "description": "One programmatic call (100,000 weighted events). Whole-studio token required. Lists cap at 500 rows and return truncated. Owner-enabled canManage plus current action role required. No money or token management; ingest keys only through the key operations. Cannot remove self or owner."
      }
    },
    "/api/v1/data/games/{gameId}/sql": {
      "post": {
        "operationId": "warehouse_sql",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            "description": "Reuse only for the identical operation retry."
          },
          {
            "name": "gameId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Result exceeds 4 MB"
          },
          "422": {
            "description": "Estimated scan exceeds one billion rows"
          },
          "409": {
            "description": "Operation ID conflict"
          }
        },
        "summary": "Run game-scoped warehouse SQL",
        "description": "Guarded SELECT only. 10,000 result rows, 30 seconds, 1 GB read, 1 billion scanned rows, 4 MB response, 200 admitted queries per token per UTC day. Reserves (2 + ceil(estimatedRows / 500000)) * 100000 weighted events before execution, refunds unused calls based on actual rows read, never charges above reservation. Exact operation retries return stored results.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "sql"
                ],
                "properties": {
                  "sql": {
                    "type": "string"
                  },
                  "include_synthetic": {
                    "type": "string",
                    "enum": [
                      "exclude",
                      "include",
                      "only"
                    ],
                    "default": "exclude"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data/org/games/{gameId}/key-recommendation": {
      "get": {
        "operationId": "org_recommend_key",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            "description": "Reuse only for the identical operation retry."
          },
          {
            "name": "gameId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "distribution",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "private_testers",
                "internal_ci",
                "store_release",
                "public_demo",
                "web_build",
                "open_source"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Resource or operation ID conflict"
          }
        },
        "summary": "Recommend a key kind",
        "description": "One programmatic call (100,000 weighted events). Whole-studio token required. A fixed rule, no model call: a public key for a demo, a web build or public source, the live key for private testers, CI and store releases. Answers the kind, the reason, whether a separate environment is advised, whether the key can be issued now, and the steps."
      }
    },
    "/api/v1/data/org/games/{gameId}/keys": {
      "post": {
        "operationId": "org_issue_key",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            "description": "Reuse only for the identical operation retry."
          },
          {
            "name": "gameId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single-use claim and the command that redeems it. Never a key.",
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "claim",
                    "file",
                    "command",
                    "next_steps",
                    "meta"
                  ],
                  "properties": {
                    "claim": {
                      "type": "object",
                      "required": [
                        "id",
                        "kind",
                        "gameId",
                        "environment",
                        "expiresAt",
                        "code",
                        "header",
                        "url",
                        "singleUse"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The claim's public id, 32 hex characters."
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "live",
                            "public"
                          ]
                        },
                        "gameId": {
                          "type": "string"
                        },
                        "environment": {
                          "type": "string"
                        },
                        "expiresAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "10 minutes after the claim was issued."
                        },
                        "code": {
                          "type": "string",
                          "pattern": "^rsc_[a-f0-9]{32}_[A-Za-z0-9_-]{43}$",
                          "description": "The claim code. A credential for one redemption; treat it like one."
                        },
                        "header": {
                          "type": "string",
                          "enum": [
                            "X-Ravensight-Claim"
                          ]
                        },
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "description": "The redeem endpoint."
                        },
                        "singleUse": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        }
                      }
                    },
                    "file": {
                      "type": "string",
                      "enum": [
                        ".env.ravensight"
                      ]
                    },
                    "command": {
                      "type": "string",
                      "description": "A curl command that redeems the claim and writes the file."
                    },
                    "next_steps": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "description": "Operation ID, rate version and event units, as on every operation."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Refused input: invalid_operation_id, invalid_kind, invalid_input, allowed_events_required, invalid_policy, invalid_label, invalid_expires_at, steam_connection_missing or invalid_game_id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "key_management_required (the token is not allowed to issue keys), key_management_unavailable (an OAuth connection), management_required or forbidden (role)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for this token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "rotate_required (an internal environment whose key has been used, or any other environment whose key has never been used, where a shipped build that has not reported yet would stop; send rotate: true), key_dashboard_only (the game's key has been used and its environment is not development, staging, alpha or beta), public_key_limit (two live public keys), or an operation ID conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Issue an ingest key as a claim",
        "description": "One programmatic call (100,000 weighted events). Whole-studio token required. Owner-enabled canManage and canManageKeys plus a role that may rotate keys required. Answers a single-use claim, good for 10 minutes, and a command that writes .env.ravensight. The key is created when the claim is redeemed and is never in this response. A public key needs at least one name in policy.allowed_events. A live key for a game whose key has been used needs rotate: true in development, staging, alpha and beta, and is refused in every other environment (409 key_dashboard_only), where it is rotated in the dashboard.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "kind"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "live",
                      "public"
                    ]
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60,
                    "description": "Public keys only."
                  },
                  "policy": {
                    "type": "object",
                    "description": "Public keys only, and required for them: at least allowed_events.",
                    "required": [
                      "allowed_events"
                    ],
                    "properties": {
                      "allowed_events": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 100,
                        "minItems": 1
                      }
                    }
                  },
                  "expiresAt": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Public keys only. A future date."
                  },
                  "rotate": {
                    "type": "boolean",
                    "description": "Live keys only. Confirms replacing the game's current live key: needed in development, staging, alpha and beta once the key has been used, and in every other environment while the key has never been used."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data/org/games/{gameId}/public-keys/{keyPrefix}": {
      "delete": {
        "operationId": "org_revoke_public_key",
        "security": [
          {
            "ravensightToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Ravensight-Operation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            "description": "Reuse only for the identical operation retry."
          },
          {
            "name": "gameId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keyPrefix",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^gt_pub_[A-Za-z0-9_-]{8}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Data and metering metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "X-Ravensight-Operation-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Event-Units": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Ravensight-Rate-Version": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "key_management_required, key_management_unavailable (an OAuth connection), management_required or forbidden (role)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found (no such game in this studio) or public_key_not_found (no live public key with that prefix)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request refused or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "key_dashboard_only (the game's keys have been used and its environment is not development, staging, alpha or beta), or an operation ID conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Revoke a public key",
        "description": "One programmatic call (100,000 weighted events). Whole-studio token required. Owner-enabled canManage and canManageKeys plus a role that may rotate keys required. Permanent: the key stops working at once and its place frees for a new key. Refused (409 key_dashboard_only) once the game's keys have been used, unless its environment is development, staging, alpha or beta. The live key cannot be revoked here."
      }
    },
    "/api/v1/data/org/key-claims/redeem": {
      "post": {
        "operationId": "redeem_key_claim",
        "security": [],
        "summary": "Redeem a key claim",
        "description": "No token: the single-use claim code from org_issue_key is the credential, sent in the X-Ravensight-Claim header and never in the URL. Creates the key and answers it once, as an env file. No charge. An unknown, used or expired code, or one whose token or holder no longer has access, answers the same 404. The request always goes to the API host itself.",
        "parameters": [
          {
            "name": "X-Ravensight-Claim",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rsc_[a-f0-9]{32}_[A-Za-z0-9_-]{43}$"
            },
            "description": "The claim code. Works once, for 10 minutes."
          }
        ],
        "responses": {
          "200": {
            "description": "The env file: RAVENSIGHT_INGEST_KEY, RAVENSIGHT_KEY, RAVENSIGHT_API_URL, RAVENSIGHT_GAME_ID and RAVENSIGHT_ENVIRONMENT.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                },
                "description": "The answer must not be cached."
              },
              "Content-Disposition": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "attachment; filename=\".env.ravensight\""
                  ]
                },
                "description": "Names the file the body is meant for."
              },
              "Content-Type": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "text/plain; charset=utf-8"
                  ]
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "Tries allowed from one address in the window."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "Tries left from this address."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds until the window resets."
              },
              "RateLimit-Policy": {
                "schema": {
                  "type": "string"
                },
                "description": "The per-address limit and its window."
              }
            },
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The code was sent in the URL",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such claim",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The code is valid but the key cannot be issued now: rotate_required, key_dashboard_only, invalid_expires_at, steam_connection_missing or public_key_limit; the claim is kept for another try",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: more than 5 tries for one claim from one address, or 20 from one address, in 10 minutes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait, when the per-address limit was reached."
              }
            }
          },
          "500": {
            "description": "claim_spent: creating the key failed part way and the claim is spent, so issue a new one. Or internal_error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ravensightToken": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "gt_mcp_ token"
      }
    },
    "schemas": {
      "Result": {
        "type": "object",
        "required": [
          "meta"
        ],
        "properties": {
          "meta": {
            "type": "object",
            "required": [
              "operationId",
              "eventUnits",
              "rateVersion"
            ],
            "properties": {
              "operationId": {
                "type": "string"
              },
              "eventUnits": {
                "type": "integer"
              },
              "rateVersion": {
                "type": "string"
              }
            }
          }
        },
        "additionalProperties": true
      },
      "Error": {
        "type": "object",
        "required": [
          "error",
          "message"
        ],
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
