{
  "openapi": "3.1.0",
  "info": {
    "title": "weBump Platform API preview",
    "version": "0.1.0",
    "description": "Local-history handoff preview. Supplemental local-first saves. Disabled by default; no public activation implied. See contract.md for consent, retention and launch requirements."
  },
  "servers": [
    {
      "url": "https://api.webump.app"
    },
    {
      "url": "https://winnie.taila760d9.ts.net:8443",
      "description": "Isolated development; sandbox projects only when platform is enabled."
    }
  ],
  "paths": {
    "/oauth/authorize": {
      "get": {
        "operationId": "get_oauth_authorize",
        "summary": "Begin five-minute phone approval request",
        "security": [],
        "responses": {
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "428": {
            "$ref": "#/components/responses/Error428"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "302": {
            "description": "Open the official HTTPS approval link. It carries only a request reference.",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "client_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "redirect_uri",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri",
              "description": "Exact registered HTTPS URL. No query, fragment or userinfo."
            }
          },
          {
            "in": "query",
            "name": "response_type",
            "required": true,
            "schema": {
              "const": "code"
            }
          },
          {
            "in": "query",
            "name": "state",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          },
          {
            "in": "query",
            "name": "code_challenge",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{43}$"
            }
          },
          {
            "in": "query",
            "name": "code_challenge_method",
            "required": true,
            "schema": {
              "const": "S256"
            }
          },
          {
            "in": "query",
            "name": "scope",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/oauth/token": {
      "post": {
        "operationId": "post_oauth_token",
        "summary": "Redeem a one-minute code or rotate a refresh token",
        "security": [],
        "responses": {
          "200": {
            "description": "Success; always Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tokens"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "428": {
            "$ref": "#/components/responses/Error428"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/AuthorizationCode"
                  },
                  {
                    "$ref": "#/components/schemas/Refresh"
                  }
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/AuthorizationCode"
                  },
                  {
                    "$ref": "#/components/schemas/Refresh"
                  }
                ]
              }
            }
          }
        },
        "description": "Refresh is attempted once. A lost response requires reconnect; reuse revokes the family. Tokens last 10 minutes; refresh grants expire after 30 idle / 180 absolute days."
      }
    },
    "/oauth/revoke": {
      "post": {
        "operationId": "post_oauth_revoke",
        "summary": "Disconnect the token owner from this project; unknown tokens succeed",
        "security": [],
        "responses": {
          "200": {
            "description": "Success; always Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "428": {
            "$ref": "#/components/responses/Error428"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "client_id": {
                    "type": "string"
                  },
                  "token": {
                    "type": "string"
                  }
                },
                "required": [
                  "client_id",
                  "token"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/v1/me": {
      "get": {
        "operationId": "get_v1_me",
        "summary": "Project-specific player ID and permitted own card",
        "security": [
          {
            "PlayerToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; always Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "428": {
            "$ref": "#/components/responses/Error428"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    },
    "/v1/me/permissions": {
      "get": {
        "operationId": "get_v1_me_permissions",
        "summary": "Effective scopes and player-controlled sharing choices",
        "security": [
          {
            "PlayerToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; always Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "428": {
            "$ref": "#/components/responses/Error428"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    },
    "/v1/me/state": {
      "get": {
        "operationId": "get_v1_me_state",
        "summary": "Read state and the shared document revision",
        "security": [
          {
            "PlayerToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; always Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "428": {
            "$ref": "#/components/responses/Error428"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "description": "Requires game.state."
      }
    },
    "/v1/me/state/{key}": {
      "put": {
        "operationId": "put_v1_me_state_key",
        "summary": "Replace state conditionally",
        "security": [
          {
            "PlayerToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; always Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "428": {
            "$ref": "#/components/responses/Error428"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "description": "Requires game.state.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {}
                },
                "required": [
                  "value"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          },
          {
            "in": "header",
            "name": "If-Match",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\"[0-9]+\"$"
            },
            "description": "Shared player document revision returned by GET. Wildcards and weak ETags are rejected."
          }
        ]
      },
      "delete": {
        "operationId": "delete_v1_me_state_key",
        "summary": "Delete state conditionally",
        "security": [
          {
            "PlayerToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; always Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "428": {
            "$ref": "#/components/responses/Error428"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "description": "Requires game.state.",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            }
          },
          {
            "in": "header",
            "name": "If-Match",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\"[0-9]+\"$"
            },
            "description": "Shared player document revision returned by GET. Wildcards and weak ETags are rejected."
          }
        ]
      }
    },
    "/v1/me/capsule": {
      "get": {
        "operationId": "get_v1_me_capsule",
        "summary": "Read capsule and the shared document revision",
        "security": [
          {
            "PlayerToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; always Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "428": {
            "$ref": "#/components/responses/Error428"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "description": "Requires game.capsule."
      },
      "put": {
        "operationId": "put_v1_me_capsule",
        "summary": "Replace capsule conditionally",
        "security": [
          {
            "PlayerToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; always Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "428": {
            "$ref": "#/components/responses/Error428"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "description": "Requires game.capsule.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {}
                },
                "required": [
                  "value"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "in": "header",
            "name": "If-Match",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\"[0-9]+\"$"
            },
            "description": "Shared player document revision returned by GET. Wildcards and weak ETags are rejected."
          }
        ]
      },
      "delete": {
        "operationId": "delete_v1_me_capsule",
        "summary": "Delete capsule conditionally",
        "security": [
          {
            "PlayerToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; always Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "428": {
            "$ref": "#/components/responses/Error428"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "description": "Requires game.capsule.",
        "parameters": [
          {
            "in": "header",
            "name": "If-Match",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\"[0-9]+\"$"
            },
            "description": "Shared player document revision returned by GET. Wildcards and weak ETags are rejected."
          }
        ]
      }
    },
    "/v1/me/showcase": {
      "get": {
        "operationId": "get_v1_me_showcase",
        "summary": "Read showcase and the shared document revision",
        "security": [
          {
            "PlayerToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; always Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "428": {
            "$ref": "#/components/responses/Error428"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "description": "Requires game.showcase."
      },
      "put": {
        "operationId": "put_v1_me_showcase",
        "summary": "Replace showcase conditionally",
        "security": [
          {
            "PlayerToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; always Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "428": {
            "$ref": "#/components/responses/Error428"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "description": "Requires game.showcase.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {}
                },
                "required": [
                  "value"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "in": "header",
            "name": "If-Match",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\"[0-9]+\"$"
            },
            "description": "Shared player document revision returned by GET. Wildcards and weak ETags are rejected."
          }
        ]
      },
      "delete": {
        "operationId": "delete_v1_me_showcase",
        "summary": "Delete showcase conditionally",
        "security": [
          {
            "PlayerToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; always Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "428": {
            "$ref": "#/components/responses/Error428"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "description": "Requires game.showcase.",
        "parameters": [
          {
            "in": "header",
            "name": "If-Match",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\"[0-9]+\"$"
            },
            "description": "Shared player document revision returned by GET. Wildcards and weak ETags are rejected."
          }
        ]
      }
    },
    "/v1/me/visitor-handoff": {
      "post": {
        "operationId": "post_v1_me_visitor_handoff",
        "summary": "Start handoff or redeem the one-use approved handoff code",
        "security": [
          {
            "PlayerToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; always Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "authorization_url": {
                          "type": "string"
                        },
                        "expires_in": {
                          "const": 300
                        }
                      },
                      "required": [
                        "authorization_url",
                        "expires_in"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "visitors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Visitor"
                          },
                          "maxItems": 50
                        }
                      },
                      "required": [
                        "visitors"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "428": {
            "$ref": "#/components/responses/Error428"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "description": "Requires visitors.receive.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/HandoffBegin"
                  },
                  {
                    "$ref": "#/components/schemas/HandoffRedeem"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/v1/me/visitors/{reference}": {
      "get": {
        "operationId": "get_v1_me_visitors_reference",
        "summary": "Refresh a previously handed-off card; no arbitrary people lookup",
        "security": [
          {
            "PlayerToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; always Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Visitor"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "428": {
            "$ref": "#/components/responses/Error428"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "description": "Requires visitors.receive.",
        "parameters": [
          {
            "in": "path",
            "name": "reference",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/me/game-data": {
      "delete": {
        "operationId": "delete_v1_me_game_data",
        "summary": "Delete game data, pairwise ID and all grants; keep the local game save",
        "security": [
          {
            "PlayerToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; always Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "428": {
            "$ref": "#/components/responses/Error428"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    },
    "/app/v1/platform-games": {
      "post": {
        "operationId": "post_app_v1_platform_games",
        "summary": "List own connected games and available recipients",
        "security": [
          {
            "InstallationID": [],
            "InstallationSecret": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; always Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "428": {
            "$ref": "#/components/responses/Error428"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/app/v1/platform-preferences": {
      "post": {
        "operationId": "post_app_v1_platform_preferences",
        "summary": "Set global visitor-card sharing",
        "security": [
          {
            "InstallationID": [],
            "InstallationSecret": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; always Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "428": {
            "$ref": "#/components/responses/Error428"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sharing": {
                    "type": "boolean"
                  },
                  "consent_version": {
                    "const": "2026-09-10"
                  }
                },
                "required": [
                  "sharing",
                  "consent_version"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/app/v1/platform-exclusion": {
      "post": {
        "operationId": "post_app_v1_platform_exclusion",
        "summary": "Exclude or allow a project to receive your visitor card",
        "security": [
          {
            "InstallationID": [],
            "InstallationSecret": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; always Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "428": {
            "$ref": "#/components/responses/Error428"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "client_id": {
                    "type": "string"
                  },
                  "excluded": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "client_id",
                  "excluded"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/app/v1/platform-manage": {
      "post": {
        "operationId": "post_app_v1_platform_manage",
        "summary": "Disconnect, delete or change own game sharing",
        "security": [
          {
            "InstallationID": [],
            "InstallationSecret": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; always Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "428": {
            "$ref": "#/components/responses/Error428"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "player_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "action": {
                    "enum": [
                      "disconnect",
                      "delete",
                      "settings"
                    ]
                  },
                  "stats_sharing": {
                    "type": "boolean"
                  },
                  "showcase_visibility": {
                    "enum": [
                      "private",
                      "friends",
                      "public"
                    ]
                  }
                },
                "required": [
                  "player_id",
                  "action"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/app/v1/platform-request": {
      "post": {
        "operationId": "post_app_v1_platform_request",
        "summary": "Read immutable request details before presenting approval",
        "security": [
          {
            "InstallationID": [],
            "InstallationSecret": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; always Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "428": {
            "$ref": "#/components/responses/Error428"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "request": {
                    "type": "string"
                  }
                },
                "required": [
                  "request"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/app/v1/platform-decision": {
      "post": {
        "operationId": "post_app_v1_platform_decision",
        "summary": "Explicitly approve or deny the bound request",
        "security": [
          {
            "InstallationID": [],
            "InstallationSecret": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; always Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "428": {
            "$ref": "#/components/responses/Error428"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "request": {
                    "type": "string"
                  },
                  "approve": {
                    "type": "boolean"
                  },
                  "consent_version": {
                    "type": "string"
                  },
                  "stats_sharing": {
                    "type": "boolean"
                  },
                  "receipt_ids": {
                    "type": "array",
                    "maxItems": 50,
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                },
                "required": [
                  "request",
                  "approve"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/app/v1/platform-encounter": {
      "post": {
        "operationId": "post_app_v1_platform_encounter",
        "summary": "Accept a fresh rolling ID and return local receipt references",
        "security": [
          {
            "InstallationID": [],
            "InstallationSecret": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; always Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "428": {
            "$ref": "#/components/responses/Error428"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rolling_id": {
                    "type": "string",
                    "minLength": 24,
                    "maxLength": 96
                  }
                },
                "required": [
                  "rolling_id"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "PlayerToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "Opaque project/player token. Installation secrets are never accepted."
      },
      "InstallationID": {
        "type": "apiKey",
        "in": "header",
        "name": "x-webump-installation-id"
      },
      "InstallationSecret": {
        "type": "apiKey",
        "in": "header",
        "name": "x-webump-installation-secret"
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      },
      "Tokens": {
        "type": "object",
        "properties": {
          "access_token": {
            "type": "string"
          },
          "refresh_token": {
            "type": "string"
          },
          "token_type": {
            "const": "Bearer"
          },
          "expires_in": {
            "type": "integer",
            "maximum": 600
          },
          "scope": {
            "type": "string"
          }
        },
        "required": [
          "access_token",
          "refresh_token",
          "token_type",
          "expires_in",
          "scope"
        ],
        "additionalProperties": false
      },
      "Document": {
        "type": "object",
        "properties": {
          "data": {},
          "revision": {
            "type": "integer",
            "minimum": 0
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "data",
          "revision",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "Visitor": {
        "type": "object",
        "properties": {
          "reference": {
            "type": "string",
            "format": "uuid"
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "theme_color": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "stats": {
            "type": "object"
          },
          "capsule": {
            "type": "object"
          },
          "stats_revision": {
            "type": "string",
            "description": "Content revision of the shared stats; private state writes do not change it."
          }
        },
        "required": [
          "reference",
          "display_name",
          "theme_color",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "Authorization": {
        "type": "object",
        "properties": {
          "client_id": {
            "type": "string"
          },
          "redirect_uri": {
            "type": "string",
            "format": "uri",
            "description": "Exact registered HTTPS URL. No query, fragment or userinfo."
          },
          "response_type": {
            "const": "code"
          },
          "state": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "code_challenge": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$"
          },
          "code_challenge_method": {
            "const": "S256"
          },
          "scope": {
            "type": "string"
          }
        },
        "required": [
          "client_id",
          "redirect_uri",
          "response_type",
          "state",
          "code_challenge",
          "code_challenge_method",
          "scope"
        ],
        "additionalProperties": false
      },
      "AuthorizationCode": {
        "type": "object",
        "properties": {
          "grant_type": {
            "const": "authorization_code"
          },
          "client_id": {
            "type": "string"
          },
          "redirect_uri": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "code_verifier": {
            "type": "string"
          }
        },
        "required": [
          "grant_type",
          "client_id",
          "redirect_uri",
          "code",
          "code_verifier"
        ],
        "additionalProperties": false
      },
      "Refresh": {
        "type": "object",
        "properties": {
          "grant_type": {
            "const": "refresh_token"
          },
          "client_id": {
            "type": "string"
          },
          "refresh_token": {
            "type": "string"
          }
        },
        "required": [
          "grant_type",
          "client_id",
          "refresh_token"
        ],
        "additionalProperties": false
      },
      "HandoffBegin": {
        "type": "object",
        "properties": {
          "action": {
            "const": "begin"
          },
          "client_id": {
            "type": "string"
          },
          "redirect_uri": {
            "type": "string",
            "format": "uri",
            "description": "Exact registered HTTPS URL. No query, fragment or userinfo."
          },
          "response_type": {
            "const": "code"
          },
          "state": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "code_challenge": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$"
          },
          "code_challenge_method": {
            "const": "S256"
          },
          "scope": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "client_id",
          "redirect_uri",
          "response_type",
          "state",
          "code_challenge",
          "code_challenge_method",
          "scope"
        ],
        "additionalProperties": false
      },
      "HandoffRedeem": {
        "type": "object",
        "properties": {
          "action": {
            "const": "redeem"
          },
          "code": {
            "type": "string"
          },
          "code_verifier": {
            "type": "string"
          },
          "redirect_uri": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "code",
          "code_verifier",
          "redirect_uri"
        ],
        "additionalProperties": false
      }
    },
    "responses": {
      "Error400": {
        "description": "Invalid request, OAuth grant or schema.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error401": {
        "description": "Invalid or expired token.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error403": {
        "description": "Insufficient scope, suspension or consent required.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error409": {
        "description": "revision_conflict \u2014 reread and reconcile.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error410": {
        "description": "Visitor consent/reference unavailable. Remove cached personal data.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error413": {
        "description": "quota_exceeded \u2014 body or storage bound.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error428": {
        "description": "precondition_required \u2014 strong If-Match required.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error429": {
        "description": "rate_limited \u2014 honor Retry-After.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "string"
            },
            "description": "Seconds before another attempt."
          }
        }
      },
      "Error503": {
        "description": "Platform disabled or temporarily unavailable.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  }
}
