{
	"openapi": "3.1.0",
	"info": {
		"title": "Rollare Public API",
		"version": "1.0.0",
		"description": "Public read API for Rollare tournaments and leagues (bracket maker & tournament management).\n\n- **Auth**: optional. Anonymous calls get a low quota; pass `Authorization: Bearer rl_live_…` (or `?api_key=`, for embed widgets that cannot set headers) for full tier quota. Create keys in your Rollare dashboard under Settings → API Keys.\n- **Rate limits**: every response carries `X-RateLimit-*` headers; exceeding them returns `429` with `Retry-After`.\n- **CORS**: all `/v1` endpoints send `Access-Control-Allow-Origin: *`.\n- **Caching**: GET responses are edge-cached briefly (`Cache-Control: public, max-age=30..60`); cache hits do not consume your quota.\n- **Privacy**: only published tournaments are visible; entrant personal data is never exposed."
	},
	"servers": [
		{
			"url": "/",
			"description": "Current host"
		}
	],
	"tags": [
		{
			"name": "tournaments",
			"description": "Public tournament data"
		},
		{
			"name": "leagues",
			"description": "Public league (series) data"
		},
		{
			"name": "bracket",
			"description": "Stateless bracket generation (no data stored)"
		},
		{
			"name": "account",
			"description": "Signed-in user data (mobile session bearer token required)"
		}
	],
	"paths": {
		"/v1/tournaments": {
			"get": {
				"operationId": "listTournaments",
				"summary": "List public tournaments",
				"description": "Discovery feed of published tournaments (non-draft, non-deleted), newest first. Filter by status, category, or currently-open registration. Offset cursor pagination, at most 50 per page; scan depth is capped.",
				"tags": [
					"tournaments"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string"
													},
													"slug": {
														"type": "string"
													},
													"name": {
														"type": "string"
													},
													"description": {
														"anyOf": [
															{
																"type": "string"
															},
															{
																"type": "null"
															}
														]
													},
													"format": {
														"type": "string",
														"enum": [
															"single_elimination",
															"double_elimination",
															"round_robin",
															"group_knockout",
															"swiss",
															"swiss_knockout"
														]
													},
													"category": {
														"type": "string"
													},
													"status": {
														"type": "string",
														"enum": [
															"draft",
															"live",
															"completed"
														]
													},
													"teamCount": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"startTime": {
														"anyOf": [
															{
																"type": "string",
																"format": "date-time",
																"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
															},
															{
																"type": "null"
															}
														]
													},
													"venue": {
														"anyOf": [
															{
																"type": "string"
															},
															{
																"type": "null"
															}
														]
													},
													"organizerName": {
														"type": "string"
													},
													"registration": {
														"type": "object",
														"properties": {
															"enabled": {
																"type": "boolean"
															},
															"open": {
																"type": "boolean"
															},
															"approvedCount": {
																"anyOf": [
																	{
																		"type": "integer",
																		"minimum": -9007199254740991,
																		"maximum": 9007199254740991
																	},
																	{
																		"type": "null"
																	}
																]
															}
														},
														"required": [
															"enabled",
															"open",
															"approvedCount"
														],
														"additionalProperties": false
													},
													"createdAt": {
														"type": "string",
														"format": "date-time",
														"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
													},
													"updatedAt": {
														"type": "string",
														"format": "date-time",
														"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
													}
												},
												"required": [
													"id",
													"slug",
													"name",
													"description",
													"format",
													"category",
													"status",
													"teamCount",
													"startTime",
													"venue",
													"organizerName",
													"registration",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false
											}
										},
										"nextCursor": {
											"anyOf": [
												{
													"type": "string"
												},
												{
													"type": "null"
												}
											]
										}
									},
									"required": [
										"data",
										"nextCursor"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"parameters": [
					{
						"name": "status",
						"in": "query",
						"required": false,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string",
							"enum": [
								"live",
								"completed"
							]
						}
					},
					{
						"name": "registration",
						"in": "query",
						"required": false,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string",
							"const": "open"
						}
					},
					{
						"name": "category",
						"in": "query",
						"required": false,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string",
							"maxLength": 40
						}
					},
					{
						"name": "limit",
						"in": "query",
						"required": false,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "integer",
							"minimum": 1,
							"maximum": 50
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"required": false,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string",
							"maxLength": 256
						}
					}
				]
			},
			"post": {
				"operationId": "createTournament",
				"summary": "Create a tournament",
				"description": "Mobile organizer flow (Phase 3): create a tournament as the signed-in user. Validation matches the web studio (format team-count limits, group/swiss config, registration window). Returns the generated id and slug. Requires the session bearer token; supports `Idempotency-Key`.",
				"tags": [
					"tournaments"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"data": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string"
												},
												"slug": {
													"type": "string"
												}
											},
											"required": [
												"id",
												"slug"
											],
											"additionalProperties": false
										}
									},
									"required": [
										"data"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$schema": "https://json-schema.org/draft/2020-12/schema",
								"type": "object",
								"properties": {
									"name": {
										"type": "string",
										"minLength": 1,
										"maxLength": 60
									},
									"format": {
										"type": "string",
										"enum": [
											"single_elimination",
											"double_elimination",
											"round_robin",
											"group_knockout",
											"swiss",
											"swiss_knockout"
										]
									},
									"teamCount": {
										"type": "integer",
										"minimum": 2,
										"maximum": 128
									},
									"divisionMode": {
										"type": "string",
										"enum": [
											"single",
											"multi"
										]
									},
									"category": {
										"type": "string",
										"maxLength": 40
									},
									"description": {
										"anyOf": [
											{
												"type": "string",
												"maxLength": 2000
											},
											{
												"type": "null"
											}
										]
									},
									"teamNames": {
										"maxItems": 128,
										"type": "array",
										"items": {
											"type": "string",
											"minLength": 1,
											"maxLength": 60
										}
									},
									"startTime": {
										"anyOf": [
											{
												"type": "string",
												"format": "date-time",
												"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
											},
											{
												"type": "null"
											}
										]
									},
									"venue": {
										"anyOf": [
											{
												"type": "string",
												"maxLength": 120
											},
											{
												"type": "null"
											}
										]
									},
									"groupStage": {
										"type": "object",
										"properties": {
											"groupCount": {
												"type": "integer",
												"minimum": 2,
												"maximum": 16
											},
											"advancePerGroup": {
												"type": "integer",
												"minimum": 1,
												"maximum": 9007199254740991
											},
											"knockoutFormat": {
												"type": "string",
												"enum": [
													"single_elimination",
													"double_elimination"
												]
											}
										},
										"required": [
											"groupCount",
											"advancePerGroup",
											"knockoutFormat"
										]
									},
									"swiss": {
										"type": "object",
										"properties": {
											"rounds": {
												"type": "integer",
												"minimum": 1,
												"maximum": 12
											},
											"advanceCount": {
												"type": "integer",
												"minimum": 1,
												"maximum": 9007199254740991
											},
											"knockoutFormat": {
												"type": "string",
												"enum": [
													"single_elimination",
													"double_elimination"
												]
											}
										}
									},
									"enableRegistration": {
										"type": "boolean"
									},
									"registrationSettings": {
										"type": "object",
										"properties": {
											"opensAt": {
												"anyOf": [
													{
														"type": "string",
														"format": "date-time",
														"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
													},
													{
														"type": "null"
													}
												]
											},
											"closesAt": {
												"anyOf": [
													{
														"type": "string",
														"format": "date-time",
														"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
													},
													{
														"type": "null"
													}
												]
											},
											"maxEntries": {
												"type": "integer",
												"minimum": 1,
												"maximum": 9007199254740991
											}
										}
									}
								},
								"required": [
									"name"
								]
							}
						}
					}
				}
			}
		},
		"/v1/tournaments/{slug}": {
			"get": {
				"operationId": "getTournament",
				"summary": "Get a published tournament",
				"description": "Returns tournament metadata, participant list, divisions and registration status. Only published (non-draft) tournaments are visible; draft or deleted tournaments return 404.",
				"tags": [
					"tournaments"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"id": {
											"type": "string"
										},
										"slug": {
											"type": "string"
										},
										"name": {
											"type": "string"
										},
										"description": {
											"anyOf": [
												{
													"type": "string"
												},
												{
													"type": "null"
												}
											]
										},
										"format": {
											"type": "string",
											"enum": [
												"single_elimination",
												"double_elimination",
												"round_robin",
												"group_knockout",
												"swiss",
												"swiss_knockout"
											]
										},
										"category": {
											"type": "string"
										},
										"status": {
											"type": "string",
											"enum": [
												"draft",
												"live",
												"completed"
											]
										},
										"teamCount": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										},
										"startTime": {
											"anyOf": [
												{
													"type": "string",
													"format": "date-time",
													"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
												},
												{
													"type": "null"
												}
											]
										},
										"venue": {
											"anyOf": [
												{
													"type": "string"
												},
												{
													"type": "null"
												}
											]
										},
										"organizerName": {
											"type": "string"
										},
										"leagueSlug": {
											"anyOf": [
												{
													"type": "string"
												},
												{
													"type": "null"
												}
											]
										},
										"divisions": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string"
													},
													"name": {
														"type": "string"
													},
													"format": {
														"type": "string",
														"enum": [
															"single_elimination",
															"double_elimination",
															"round_robin",
															"group_knockout",
															"swiss",
															"swiss_knockout"
														]
													},
													"participantCount": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													}
												},
												"required": [
													"id",
													"name",
													"format",
													"participantCount"
												],
												"additionalProperties": false
											}
										},
										"participants": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string"
													},
													"name": {
														"type": "string"
													},
													"seed": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"logoUrl": {
														"anyOf": [
															{
																"type": "string"
															},
															{
																"type": "null"
															}
														]
													}
												},
												"required": [
													"id",
													"name",
													"seed",
													"logoUrl"
												],
												"additionalProperties": false
											}
										},
										"registration": {
											"type": "object",
											"properties": {
												"enabled": {
													"type": "boolean"
												},
												"approvedCount": {
													"anyOf": [
														{
															"type": "integer",
															"minimum": -9007199254740991,
															"maximum": 9007199254740991
														},
														{
															"type": "null"
														}
													]
												}
											},
											"required": [
												"enabled",
												"approvedCount"
											],
											"additionalProperties": false
										},
										"scoring": {
											"type": "object",
											"properties": {
												"mode": {
													"type": "string",
													"enum": [
														"winner",
														"score"
													]
												},
												"setScoresEnabled": {
													"type": "boolean"
												},
												"maxSets": {
													"anyOf": [
														{
															"type": "integer",
															"minimum": -9007199254740991,
															"maximum": 9007199254740991
														},
														{
															"type": "null"
														}
													]
												}
											},
											"required": [
												"mode",
												"setScoresEnabled",
												"maxSets"
											],
											"additionalProperties": false
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
										}
									},
									"required": [
										"id",
										"slug",
										"name",
										"description",
										"format",
										"category",
										"status",
										"teamCount",
										"startTime",
										"venue",
										"organizerName",
										"leagueSlug",
										"divisions",
										"participants",
										"registration",
										"scoring",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"parameters": [
					{
						"name": "slug",
						"in": "path",
						"required": true,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string"
						}
					}
				]
			}
		},
		"/v1/tournaments/{slug}/matches": {
			"get": {
				"operationId": "listTournamentMatches",
				"summary": "List tournament matches",
				"description": "Returns all matches with scores, status, rounds and team references. Supports round/division/status filters and cursor pagination (stable order: round, matchNumber).",
				"tags": [
					"tournaments"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"allOf": [
										{
											"type": "object",
											"properties": {
												"data": {
													"type": "array",
													"items": {
														"type": "object",
														"properties": {
															"matchKey": {
																"type": "string"
															},
															"bracketType": {
																"anyOf": [
																	{
																		"type": "string"
																	},
																	{
																		"type": "null"
																	}
																]
															},
															"round": {
																"type": "integer",
																"minimum": -9007199254740991,
																"maximum": 9007199254740991
															},
															"matchNumber": {
																"anyOf": [
																	{
																		"type": "integer",
																		"minimum": -9007199254740991,
																		"maximum": 9007199254740991
																	},
																	{
																		"type": "null"
																	}
																]
															},
															"status": {
																"type": "string"
															},
															"scheduledAt": {
																"anyOf": [
																	{
																		"type": "string",
																		"format": "date-time",
																		"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
																	},
																	{
																		"type": "null"
																	}
																]
															},
															"venue": {
																"anyOf": [
																	{
																		"type": "string"
																	},
																	{
																		"type": "null"
																	}
																]
															},
															"team1": {
																"anyOf": [
																	{
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"seed": {
																				"type": "integer",
																				"minimum": -9007199254740991,
																				"maximum": 9007199254740991
																			},
																			"logoUrl": {
																				"anyOf": [
																					{
																						"type": "string"
																					},
																					{
																						"type": "null"
																					}
																				]
																			}
																		},
																		"required": [
																			"id",
																			"name",
																			"seed",
																			"logoUrl"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "null"
																	}
																]
															},
															"team2": {
																"anyOf": [
																	{
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"seed": {
																				"type": "integer",
																				"minimum": -9007199254740991,
																				"maximum": 9007199254740991
																			},
																			"logoUrl": {
																				"anyOf": [
																					{
																						"type": "string"
																					},
																					{
																						"type": "null"
																					}
																				]
																			}
																		},
																		"required": [
																			"id",
																			"name",
																			"seed",
																			"logoUrl"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "null"
																	}
																]
															},
															"score": {
																"anyOf": [
																	{
																		"type": "object",
																		"properties": {
																			"team1": {
																				"type": "number"
																			},
																			"team2": {
																				"type": "number"
																			},
																			"sets": {}
																		},
																		"required": [
																			"team1",
																			"team2",
																			"sets"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "null"
																	}
																]
															},
															"winnerParticipantId": {
																"anyOf": [
																	{
																		"type": "string"
																	},
																	{
																		"type": "null"
																	}
																]
															},
															"resultVersion": {
																"type": "integer",
																"minimum": -9007199254740991,
																"maximum": 9007199254740991
															}
														},
														"required": [
															"matchKey",
															"bracketType",
															"round",
															"matchNumber",
															"status",
															"scheduledAt",
															"venue",
															"team1",
															"team2",
															"score",
															"winnerParticipantId",
															"resultVersion"
														],
														"additionalProperties": false
													}
												},
												"nextCursor": {
													"anyOf": [
														{
															"type": "string"
														},
														{
															"type": "null"
														}
													]
												}
											},
											"required": [
												"data",
												"nextCursor"
											],
											"additionalProperties": false
										},
										{
											"type": "object",
											"properties": {
												"tournament": {
													"type": "object",
													"properties": {
														"slug": {
															"type": "string"
														},
														"format": {
															"type": "string",
															"enum": [
																"single_elimination",
																"double_elimination",
																"round_robin",
																"group_knockout",
																"swiss",
																"swiss_knockout"
															]
														},
														"status": {
															"type": "string",
															"enum": [
																"draft",
																"live",
																"completed"
															]
														}
													},
													"required": [
														"slug",
														"format",
														"status"
													],
													"additionalProperties": false
												},
												"divisionId": {
													"anyOf": [
														{
															"type": "string"
														},
														{
															"type": "null"
														}
													]
												}
											},
											"required": [
												"tournament",
												"divisionId"
											],
											"additionalProperties": false
										}
									]
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"parameters": [
					{
						"name": "slug",
						"in": "path",
						"required": true,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string"
						}
					},
					{
						"name": "division",
						"in": "query",
						"required": false,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string"
						}
					},
					{
						"name": "round",
						"in": "query",
						"required": false,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "integer",
							"exclusiveMinimum": 0,
							"maximum": 9007199254740991
						}
					},
					{
						"name": "status",
						"in": "query",
						"required": false,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string"
						}
					},
					{
						"name": "limit",
						"in": "query",
						"required": false,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "integer",
							"minimum": 1,
							"maximum": 250
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"required": false,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string"
						}
					}
				]
			}
		},
		"/v1/tournaments/{slug}/standings": {
			"get": {
				"operationId": "getTournamentStandings",
				"summary": "Get tournament standings",
				"description": "Derived standings for the tournament format: points table (round robin / swiss), per-group tables (group formats) or final placements (elimination formats).",
				"tags": [
					"tournaments"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"tournament": {
											"type": "object",
											"properties": {
												"slug": {
													"type": "string"
												},
												"name": {
													"type": "string"
												},
												"format": {
													"type": "string",
													"enum": [
														"single_elimination",
														"double_elimination",
														"round_robin",
														"group_knockout",
														"swiss",
														"swiss_knockout"
													]
												},
												"status": {
													"type": "string",
													"enum": [
														"draft",
														"live",
														"completed"
													]
												}
											},
											"required": [
												"slug",
												"name",
												"format",
												"status"
											],
											"additionalProperties": false
										},
										"divisionId": {
											"anyOf": [
												{
													"type": "string"
												},
												{
													"type": "null"
												}
											]
										},
										"kind": {
											"type": "string",
											"enum": [
												"points",
												"groups",
												"placements"
											]
										},
										"rows": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"participant": {
														"type": "object",
														"properties": {
															"id": {
																"type": "string"
															},
															"name": {
																"type": "string"
															},
															"seed": {
																"type": "integer",
																"minimum": -9007199254740991,
																"maximum": 9007199254740991
															},
															"logoUrl": {
																"anyOf": [
																	{
																		"type": "string"
																	},
																	{
																		"type": "null"
																	}
																]
															}
														},
														"required": [
															"id",
															"name",
															"seed",
															"logoUrl"
														],
														"additionalProperties": false
													},
													"rank": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"played": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"wins": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"draws": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"losses": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"points": {
														"type": "number"
													},
													"goalsFor": {
														"type": "number"
													},
													"goalsAgainst": {
														"type": "number"
													},
													"goalDifference": {
														"type": "number"
													},
													"opponentPoints": {
														"type": "number"
													},
													"byes": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													}
												},
												"required": [
													"participant",
													"rank",
													"played",
													"wins",
													"draws",
													"losses",
													"points"
												],
												"additionalProperties": false
											}
										},
										"groups": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"group": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"rows": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"participant": {
																	"type": "object",
																	"properties": {
																		"id": {
																			"type": "string"
																		},
																		"name": {
																			"type": "string"
																		},
																		"seed": {
																			"type": "integer",
																			"minimum": -9007199254740991,
																			"maximum": 9007199254740991
																		},
																		"logoUrl": {
																			"anyOf": [
																				{
																					"type": "string"
																				},
																				{
																					"type": "null"
																				}
																			]
																		}
																	},
																	"required": [
																		"id",
																		"name",
																		"seed",
																		"logoUrl"
																	],
																	"additionalProperties": false
																},
																"rank": {
																	"type": "integer",
																	"minimum": -9007199254740991,
																	"maximum": 9007199254740991
																},
																"played": {
																	"type": "integer",
																	"minimum": -9007199254740991,
																	"maximum": 9007199254740991
																},
																"wins": {
																	"type": "integer",
																	"minimum": -9007199254740991,
																	"maximum": 9007199254740991
																},
																"draws": {
																	"type": "integer",
																	"minimum": -9007199254740991,
																	"maximum": 9007199254740991
																},
																"losses": {
																	"type": "integer",
																	"minimum": -9007199254740991,
																	"maximum": 9007199254740991
																},
																"points": {
																	"type": "number"
																},
																"goalsFor": {
																	"type": "number"
																},
																"goalsAgainst": {
																	"type": "number"
																},
																"goalDifference": {
																	"type": "number"
																},
																"opponentPoints": {
																	"type": "number"
																},
																"byes": {
																	"type": "integer",
																	"minimum": -9007199254740991,
																	"maximum": 9007199254740991
																}
															},
															"required": [
																"participant",
																"rank",
																"played",
																"wins",
																"draws",
																"losses",
																"points"
															],
															"additionalProperties": false
														}
													}
												},
												"required": [
													"group",
													"rows"
												],
												"additionalProperties": false
											}
										},
										"placements": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"placement": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"participant": {
														"type": "object",
														"properties": {
															"id": {
																"type": "string"
															},
															"name": {
																"type": "string"
															},
															"seed": {
																"type": "integer",
																"minimum": -9007199254740991,
																"maximum": 9007199254740991
															},
															"logoUrl": {
																"anyOf": [
																	{
																		"type": "string"
																	},
																	{
																		"type": "null"
																	}
																]
															}
														},
														"required": [
															"id",
															"name",
															"seed",
															"logoUrl"
														],
														"additionalProperties": false
													}
												},
												"required": [
													"placement",
													"participant"
												],
												"additionalProperties": false
											}
										},
										"qualifiers": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string"
													},
													"name": {
														"type": "string"
													},
													"seed": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"logoUrl": {
														"anyOf": [
															{
																"type": "string"
															},
															{
																"type": "null"
															}
														]
													}
												},
												"required": [
													"id",
													"name",
													"seed",
													"logoUrl"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"tournament",
										"divisionId",
										"kind"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"parameters": [
					{
						"name": "slug",
						"in": "path",
						"required": true,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string"
						}
					},
					{
						"name": "division",
						"in": "query",
						"required": false,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string"
						}
					}
				]
			}
		},
		"/v1/tournaments/{slug}/schedule": {
			"get": {
				"operationId": "getTournamentSchedule",
				"summary": "Get tournament schedule",
				"description": "Returns scheduled matches sorted by start time, with venue and anonymized referee display names.",
				"tags": [
					"tournaments"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"tournament": {
											"type": "object",
											"properties": {
												"slug": {
													"type": "string"
												},
												"name": {
													"type": "string"
												},
												"status": {
													"type": "string",
													"enum": [
														"draft",
														"live",
														"completed"
													]
												}
											},
											"required": [
												"slug",
												"name",
												"status"
											],
											"additionalProperties": false
										},
										"divisionId": {
											"anyOf": [
												{
													"type": "string"
												},
												{
													"type": "null"
												}
											]
										},
										"matches": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"matchKey": {
														"type": "string"
													},
													"round": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"bracketType": {
														"anyOf": [
															{
																"type": "string"
															},
															{
																"type": "null"
															}
														]
													},
													"scheduledAt": {
														"type": "string",
														"format": "date-time",
														"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
													},
													"venue": {
														"anyOf": [
															{
																"type": "string"
															},
															{
																"type": "null"
															}
														]
													},
													"team1": {
														"anyOf": [
															{
																"type": "object",
																"properties": {
																	"id": {
																		"type": "string"
																	},
																	"name": {
																		"type": "string"
																	},
																	"seed": {
																		"type": "integer",
																		"minimum": -9007199254740991,
																		"maximum": 9007199254740991
																	},
																	"logoUrl": {
																		"anyOf": [
																			{
																				"type": "string"
																			},
																			{
																				"type": "null"
																			}
																		]
																	}
																},
																"required": [
																	"id",
																	"name",
																	"seed",
																	"logoUrl"
																],
																"additionalProperties": false
															},
															{
																"type": "null"
															}
														]
													},
													"team2": {
														"anyOf": [
															{
																"type": "object",
																"properties": {
																	"id": {
																		"type": "string"
																	},
																	"name": {
																		"type": "string"
																	},
																	"seed": {
																		"type": "integer",
																		"minimum": -9007199254740991,
																		"maximum": 9007199254740991
																	},
																	"logoUrl": {
																		"anyOf": [
																			{
																				"type": "string"
																			},
																			{
																				"type": "null"
																			}
																		]
																	}
																},
																"required": [
																	"id",
																	"name",
																	"seed",
																	"logoUrl"
																],
																"additionalProperties": false
															},
															{
																"type": "null"
															}
														]
													},
													"refereeNames": {
														"type": "array",
														"items": {
															"type": "string"
														}
													}
												},
												"required": [
													"matchKey",
													"round",
													"bracketType",
													"scheduledAt",
													"venue",
													"team1",
													"team2",
													"refereeNames"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"tournament",
										"divisionId",
										"matches"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"parameters": [
					{
						"name": "slug",
						"in": "path",
						"required": true,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string"
						}
					},
					{
						"name": "division",
						"in": "query",
						"required": false,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string"
						}
					}
				]
			},
			"put": {
				"operationId": "updateTournamentSchedule",
				"summary": "Batch-write the match schedule",
				"description": "Assign or clear times and venues for up to 1000 matches per call (same service as the web studio schedule board; reschedule notifications are fired from it). Requires `tournament.schedule`; supports `Idempotency-Key`.",
				"tags": [
					"tournaments"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"data": {
											"type": "object",
											"properties": {
												"updated": {
													"type": "integer",
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												}
											},
											"required": [
												"updated"
											],
											"additionalProperties": false
										}
									},
									"required": [
										"data"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"parameters": [
					{
						"name": "slug",
						"in": "path",
						"required": true,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$schema": "https://json-schema.org/draft/2020-12/schema",
								"type": "object",
								"properties": {
									"updates": {
										"maxItems": 1000,
										"type": "array",
										"items": {
											"type": "object",
											"properties": {
												"matchKey": {
													"type": "string",
													"minLength": 1,
													"maxLength": 64
												},
												"divisionId": {
													"anyOf": [
														{
															"type": "string",
															"minLength": 1
														},
														{
															"type": "null"
														}
													]
												},
												"scheduledAt": {
													"anyOf": [
														{
															"type": "string",
															"format": "date-time",
															"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
														},
														{
															"type": "null"
														}
													]
												},
												"venue": {
													"anyOf": [
														{
															"type": "string",
															"maxLength": 120
														},
														{
															"type": "null"
														}
													]
												}
											},
											"required": [
												"matchKey",
												"scheduledAt",
												"venue"
											]
										}
									},
									"locale": {
										"type": "string",
										"maxLength": 16
									}
								},
								"required": [
									"updates"
								]
							}
						}
					}
				}
			}
		},
		"/v1/leagues/{slug}": {
			"get": {
				"operationId": "getLeague",
				"summary": "Get a public league (series)",
				"description": "Returns league metadata and its published tournaments (series stations). Empty or draft-only leagues return 404.",
				"tags": [
					"leagues"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"id": {
											"type": "string"
										},
										"slug": {
											"type": "string"
										},
										"name": {
											"type": "string"
										},
										"description": {
											"anyOf": [
												{
													"type": "string"
												},
												{
													"type": "null"
												}
											]
										},
										"organizerName": {
											"type": "string"
										},
										"points": {
											"type": "object",
											"properties": {
												"placements": {
													"type": "array",
													"items": {
														"type": "number"
													}
												},
												"participation": {
													"type": "number"
												}
											},
											"required": [
												"placements",
												"participation"
											],
											"additionalProperties": false
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
										},
										"tournaments": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string"
													},
													"slug": {
														"type": "string"
													},
													"name": {
														"type": "string"
													},
													"format": {
														"type": "string",
														"enum": [
															"single_elimination",
															"double_elimination",
															"round_robin",
															"group_knockout",
															"swiss",
															"swiss_knockout"
														]
													},
													"status": {
														"type": "string",
														"enum": [
															"draft",
															"live",
															"completed"
														]
													},
													"teamCount": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"startTime": {
														"anyOf": [
															{
																"type": "string",
																"format": "date-time",
																"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
															},
															{
																"type": "null"
															}
														]
													},
													"venue": {
														"anyOf": [
															{
																"type": "string"
															},
															{
																"type": "null"
															}
														]
													},
													"station": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"multiDivision": {
														"type": "boolean"
													},
													"counted": {
														"type": "boolean"
													}
												},
												"required": [
													"id",
													"slug",
													"name",
													"format",
													"status",
													"teamCount",
													"startTime",
													"venue",
													"station",
													"multiDivision",
													"counted"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"id",
										"slug",
										"name",
										"description",
										"organizerName",
										"points",
										"createdAt",
										"updatedAt",
										"tournaments"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"parameters": [
					{
						"name": "slug",
						"in": "path",
						"required": true,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string"
						}
					}
				]
			}
		},
		"/v1/leagues/{slug}/standings": {
			"get": {
				"operationId": "getLeagueStandings",
				"summary": "Get league series standings",
				"description": "Cross-tournament series standings computed from completed tournaments under the league points rules.",
				"tags": [
					"leagues"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"league": {
											"type": "object",
											"properties": {
												"slug": {
													"type": "string"
												},
												"name": {
													"type": "string"
												}
											},
											"required": [
												"slug",
												"name"
											],
											"additionalProperties": false
										},
										"points": {
											"type": "object",
											"properties": {
												"placements": {
													"type": "array",
													"items": {
														"type": "number"
													}
												},
												"participation": {
													"type": "number"
												}
											},
											"required": [
												"placements",
												"participation"
											],
											"additionalProperties": false
										},
										"countedTournamentIds": {
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"rows": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"rank": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"name": {
														"type": "string"
													},
													"logoUrl": {
														"anyOf": [
															{
																"type": "string"
															},
															{
																"type": "null"
															}
														]
													},
													"played": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"points": {
														"type": "number"
													},
													"titles": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"bestPlace": {
														"anyOf": [
															{
																"type": "integer",
																"minimum": -9007199254740991,
																"maximum": 9007199254740991
															},
															{
																"type": "null"
															}
														]
													}
												},
												"required": [
													"rank",
													"name",
													"logoUrl",
													"played",
													"points",
													"titles",
													"bestPlace"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"league",
										"points",
										"countedTournamentIds",
										"rows"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"parameters": [
					{
						"name": "slug",
						"in": "path",
						"required": true,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string"
						}
					}
				]
			}
		},
		"/v1/bracket/generate": {
			"post": {
				"operationId": "generateBracket",
				"summary": "Generate a bracket (stateless)",
				"description": "Stateless bracket generation using the same engines as the app. No data is stored. Swiss rounds beyond played scores are provisional pairings.",
				"tags": [
					"bracket"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"format": {
											"type": "string",
											"enum": [
												"single_elimination",
												"double_elimination",
												"round_robin",
												"group_knockout",
												"swiss",
												"swiss_knockout"
											]
										},
										"teamCount": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										},
										"rounds": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"round": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"bracketType": {
														"anyOf": [
															{
																"type": "string"
															},
															{
																"type": "null"
															}
														]
													},
													"label": {
														"anyOf": [
															{
																"type": "string"
															},
															{
																"type": "null"
															}
														]
													},
													"matches": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"matchKey": {
																	"type": "string"
																},
																"round": {
																	"type": "integer",
																	"minimum": -9007199254740991,
																	"maximum": 9007199254740991
																},
																"matchNumber": {
																	"anyOf": [
																		{
																			"type": "integer",
																			"minimum": -9007199254740991,
																			"maximum": 9007199254740991
																		},
																		{
																			"type": "null"
																		}
																	]
																},
																"bracketType": {
																	"anyOf": [
																		{
																			"type": "string"
																		},
																		{
																			"type": "null"
																		}
																	]
																},
																"team1": {
																	"anyOf": [
																		{
																			"type": "object",
																			"properties": {
																				"id": {
																					"type": "string"
																				},
																				"name": {
																					"type": "string"
																				},
																				"seed": {
																					"type": "integer",
																					"minimum": -9007199254740991,
																					"maximum": 9007199254740991
																				},
																				"group": {
																					"type": "integer",
																					"minimum": -9007199254740991,
																					"maximum": 9007199254740991
																				}
																			},
																			"required": [
																				"id",
																				"name",
																				"seed"
																			],
																			"additionalProperties": false
																		},
																		{
																			"type": "null"
																		}
																	]
																},
																"team2": {
																	"anyOf": [
																		{
																			"type": "object",
																			"properties": {
																				"id": {
																					"type": "string"
																				},
																				"name": {
																					"type": "string"
																				},
																				"seed": {
																					"type": "integer",
																					"minimum": -9007199254740991,
																					"maximum": 9007199254740991
																				},
																				"group": {
																					"type": "integer",
																					"minimum": -9007199254740991,
																					"maximum": 9007199254740991
																				}
																			},
																			"required": [
																				"id",
																				"name",
																				"seed"
																			],
																			"additionalProperties": false
																		},
																		{
																			"type": "null"
																		}
																	]
																},
																"isBye": {
																	"type": "boolean"
																}
															},
															"required": [
																"matchKey",
																"round",
																"matchNumber",
																"bracketType",
																"team1",
																"team2",
																"isBye"
															],
															"additionalProperties": false
														}
													}
												},
												"required": [
													"round",
													"bracketType",
													"label",
													"matches"
												],
												"additionalProperties": false
											}
										},
										"groups": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"group": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"teams": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string"
																},
																"name": {
																	"type": "string"
																},
																"seed": {
																	"type": "integer",
																	"minimum": -9007199254740991,
																	"maximum": 9007199254740991
																},
																"group": {
																	"type": "integer",
																	"minimum": -9007199254740991,
																	"maximum": 9007199254740991
																}
															},
															"required": [
																"id",
																"name",
																"seed"
															],
															"additionalProperties": false
														}
													}
												},
												"required": [
													"group",
													"teams"
												],
												"additionalProperties": false
											}
										},
										"champion": {
											"anyOf": [
												{
													"type": "object",
													"properties": {
														"id": {
															"type": "string"
														},
														"name": {
															"type": "string"
														},
														"seed": {
															"type": "integer",
															"minimum": -9007199254740991,
															"maximum": 9007199254740991
														},
														"group": {
															"type": "integer",
															"minimum": -9007199254740991,
															"maximum": 9007199254740991
														}
													},
													"required": [
														"id",
														"name",
														"seed"
													],
													"additionalProperties": false
												},
												{
													"type": "null"
												}
											]
										},
										"provisionalRounds": {
											"type": "array",
											"items": {
												"type": "integer",
												"minimum": -9007199254740991,
												"maximum": 9007199254740991
											}
										}
									},
									"required": [
										"format",
										"teamCount",
										"rounds",
										"groups",
										"champion",
										"provisionalRounds"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$schema": "https://json-schema.org/draft/2020-12/schema",
								"type": "object",
								"properties": {
									"format": {
										"type": "string",
										"enum": [
											"single_elimination",
											"double_elimination",
											"round_robin",
											"group_knockout",
											"swiss",
											"swiss_knockout"
										]
									},
									"teams": {
										"minItems": 2,
										"maxItems": 128,
										"type": "array",
										"items": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"minLength": 1,
													"maxLength": 64
												},
												"name": {
													"type": "string",
													"minLength": 1,
													"maxLength": 100
												},
												"seed": {
													"type": "integer",
													"minimum": 1,
													"maximum": 9007199254740991
												},
												"logoUrl": {
													"anyOf": [
														{
															"type": "string",
															"maxLength": 2048,
															"format": "uri"
														},
														{
															"type": "null"
														}
													]
												}
											},
											"required": [
												"name"
											]
										}
									},
									"settings": {
										"type": "object",
										"properties": {
											"doubleRoundRobin": {
												"type": "boolean"
											},
											"swissRounds": {
												"type": "integer",
												"minimum": 1,
												"maximum": 12
											},
											"groupCount": {
												"type": "integer",
												"minimum": 2,
												"maximum": 16
											}
										}
									}
								},
								"required": [
									"format",
									"teams"
								]
							}
						}
					}
				}
			}
		},
		"/v1/me": {
			"get": {
				"operationId": "getMe",
				"summary": "Get the signed-in user",
				"description": "Identity of the user owning the bearer session token (mobile sign-in channel). Requires `Authorization: Bearer <session token>` from the sign-in response (`set-auth-token` header); API keys are not accepted here.",
				"tags": [
					"account"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"id": {
											"type": "string"
										},
										"name": {
											"type": "string"
										},
										"email": {
											"type": "string"
										},
										"emailVerified": {
											"type": "boolean"
										},
										"image": {
											"anyOf": [
												{
													"type": "string"
												},
												{
													"type": "null"
												}
											]
										}
									},
									"required": [
										"id",
										"name",
										"email",
										"emailVerified",
										"image"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				}
			},
			"put": {
				"operationId": "updateMe",
				"summary": "Update my profile",
				"description": "Edit the signed-in user's display name and/or avatar image URL (null clears the avatar). Upload images through POST /v1/uploads/image first and pass the returned URL. Requires the session bearer token.",
				"tags": [
					"account"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"id": {
											"type": "string"
										},
										"name": {
											"type": "string"
										},
										"email": {
											"type": "string"
										},
										"emailVerified": {
											"type": "boolean"
										},
										"image": {
											"anyOf": [
												{
													"type": "string"
												},
												{
													"type": "null"
												}
											]
										}
									},
									"required": [
										"id",
										"name",
										"email",
										"emailVerified",
										"image"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$schema": "https://json-schema.org/draft/2020-12/schema",
								"type": "object",
								"properties": {
									"name": {
										"type": "string",
										"minLength": 1,
										"maxLength": 60
									},
									"image": {
										"anyOf": [
											{
												"type": "string",
												"maxLength": 500
											},
											{
												"type": "null"
											}
										]
									}
								}
							}
						}
					}
				}
			}
		},
		"/v1/my/entries": {
			"get": {
				"operationId": "listMyEntries",
				"summary": "List my tournament entries",
				"description": "Registrations of the signed-in user with their review status (pending/approved/rejected), check-in state and a tournament summary. Requires the session bearer token.",
				"tags": [
					"account"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"tournament": {
														"type": "object",
														"properties": {
															"slug": {
																"type": "string"
															},
															"name": {
																"type": "string"
															},
															"status": {
																"type": "string",
																"enum": [
																	"draft",
																	"live",
																	"completed"
																]
															},
															"startTime": {
																"anyOf": [
																	{
																		"type": "string",
																		"format": "date-time",
																		"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
																	},
																	{
																		"type": "null"
																	}
																]
															},
															"venue": {
																"anyOf": [
																	{
																		"type": "string"
																	},
																	{
																		"type": "null"
																	}
																]
															}
														},
														"required": [
															"slug",
															"name",
															"status",
															"startTime",
															"venue"
														],
														"additionalProperties": false
													},
													"entryName": {
														"type": "string"
													},
													"status": {
														"type": "string"
													},
													"divisionId": {
														"anyOf": [
															{
																"type": "string"
															},
															{
																"type": "null"
															}
														]
													},
													"checkedInAt": {
														"anyOf": [
															{
																"type": "string",
																"format": "date-time",
																"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
															},
															{
																"type": "null"
															}
														]
													},
													"createdAt": {
														"type": "string",
														"format": "date-time",
														"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
													}
												},
												"required": [
													"tournament",
													"entryName",
													"status",
													"divisionId",
													"checkedInAt",
													"createdAt"
												],
												"additionalProperties": false
											}
										},
										"nextCursor": {
											"anyOf": [
												{
													"type": "string"
												},
												{
													"type": "null"
												}
											]
										}
									},
									"required": [
										"data",
										"nextCursor"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				}
			}
		},
		"/v1/inbox": {
			"get": {
				"operationId": "listMyInbox",
				"summary": "List my inbox notifications",
				"description": "Published notifications addressed to the signed-in user (announcement/creation channels), newest first, with per-user read state. Requires the session bearer token.",
				"tags": [
					"account"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string"
													},
													"notificationId": {
														"type": "string"
													},
													"channel": {
														"type": "string",
														"enum": [
															"whats_new",
															"official",
															"creation"
														]
													},
													"title": {
														"type": "string"
													},
													"content": {
														"type": "string"
													},
													"actionUrl": {
														"anyOf": [
															{
																"type": "string"
															},
															{
																"type": "null"
															}
														]
													},
													"readAt": {
														"anyOf": [
															{
																"type": "string",
																"format": "date-time",
																"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
															},
															{
																"type": "null"
															}
														]
													},
													"createdAt": {
														"type": "string",
														"format": "date-time",
														"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
													}
												},
												"required": [
													"id",
													"notificationId",
													"channel",
													"title",
													"content",
													"actionUrl",
													"readAt",
													"createdAt"
												],
												"additionalProperties": false
											}
										},
										"nextCursor": {
											"anyOf": [
												{
													"type": "string"
												},
												{
													"type": "null"
												}
											]
										}
									},
									"required": [
										"data",
										"nextCursor"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				}
			},
			"post": {
				"operationId": "markMyInboxRead",
				"summary": "Mark inbox notifications read",
				"description": "Mark specific inbox receipts read by id, or everything with `all: true` (optionally scoped to a channel). Requires the session bearer token.",
				"tags": [
					"account"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"ok": {
											"type": "boolean",
											"const": true
										},
										"updated": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"ok",
										"updated"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$schema": "https://json-schema.org/draft/2020-12/schema",
								"type": "object",
								"properties": {
									"receiptIds": {
										"maxItems": 100,
										"type": "array",
										"items": {
											"type": "string",
											"minLength": 1,
											"maxLength": 128
										}
									},
									"all": {
										"type": "boolean"
									},
									"channel": {
										"type": "string",
										"enum": [
											"official",
											"creation"
										]
									}
								}
							}
						}
					}
				}
			}
		},
		"/v1/device-tokens": {
			"post": {
				"operationId": "registerDeviceToken",
				"summary": "Register a push device token",
				"description": "Upsert an Expo push token for the signed-in user (per-device push registry). Registering again refreshes the binding and last-seen time. Requires the session bearer token.",
				"tags": [
					"account"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"ok": {
											"type": "boolean",
											"const": true
										}
									},
									"required": [
										"ok"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$schema": "https://json-schema.org/draft/2020-12/schema",
								"type": "object",
								"properties": {
									"token": {
										"type": "string",
										"minLength": 1,
										"maxLength": 256
									},
									"platform": {
										"type": "string",
										"enum": [
											"ios",
											"android"
										]
									},
									"appVersion": {
										"anyOf": [
											{
												"type": "string",
												"maxLength": 64
											},
											{
												"type": "null"
											}
										]
									}
								},
								"required": [
									"token",
									"platform"
								]
							}
						}
					}
				}
			}
		},
		"/v1/tournaments/{slug}/matches/{matchKey}": {
			"put": {
				"operationId": "recordTournamentMatchScore",
				"summary": "Record or clear a match result",
				"description": "Organizer/scorer write channel (mobile Phase 2). Requires `Authorization: Bearer <session token>` plus the `tournament.record` permission (owner, member or the assigned referee/scorekeeper). Send the `resultVersion` observed on read; a mismatch returns 409 and the client should reload and choose overwrite or discard. Requests require an `Idempotency-Key` header (UUID); replaying the same key with the same payload returns the stored response for 24h. Clearing a result sends both scores as null.",
				"tags": [
					"tournaments"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"data": {
											"type": "object",
											"properties": {
												"matchKey": {
													"type": "string"
												},
												"bracketType": {
													"anyOf": [
														{
															"type": "string"
														},
														{
															"type": "null"
														}
													]
												},
												"round": {
													"type": "integer",
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"matchNumber": {
													"anyOf": [
														{
															"type": "integer",
															"minimum": -9007199254740991,
															"maximum": 9007199254740991
														},
														{
															"type": "null"
														}
													]
												},
												"status": {
													"type": "string"
												},
												"scheduledAt": {
													"anyOf": [
														{
															"type": "string",
															"format": "date-time",
															"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
														},
														{
															"type": "null"
														}
													]
												},
												"venue": {
													"anyOf": [
														{
															"type": "string"
														},
														{
															"type": "null"
														}
													]
												},
												"team1": {
													"anyOf": [
														{
															"type": "object",
															"properties": {
																"id": {
																	"type": "string"
																},
																"name": {
																	"type": "string"
																},
																"seed": {
																	"type": "integer",
																	"minimum": -9007199254740991,
																	"maximum": 9007199254740991
																},
																"logoUrl": {
																	"anyOf": [
																		{
																			"type": "string"
																		},
																		{
																			"type": "null"
																		}
																	]
																}
															},
															"required": [
																"id",
																"name",
																"seed",
																"logoUrl"
															],
															"additionalProperties": false
														},
														{
															"type": "null"
														}
													]
												},
												"team2": {
													"anyOf": [
														{
															"type": "object",
															"properties": {
																"id": {
																	"type": "string"
																},
																"name": {
																	"type": "string"
																},
																"seed": {
																	"type": "integer",
																	"minimum": -9007199254740991,
																	"maximum": 9007199254740991
																},
																"logoUrl": {
																	"anyOf": [
																		{
																			"type": "string"
																		},
																		{
																			"type": "null"
																		}
																	]
																}
															},
															"required": [
																"id",
																"name",
																"seed",
																"logoUrl"
															],
															"additionalProperties": false
														},
														{
															"type": "null"
														}
													]
												},
												"score": {
													"anyOf": [
														{
															"type": "object",
															"properties": {
																"team1": {
																	"type": "number"
																},
																"team2": {
																	"type": "number"
																},
																"sets": {}
															},
															"required": [
																"team1",
																"team2",
																"sets"
															],
															"additionalProperties": false
														},
														{
															"type": "null"
														}
													]
												},
												"winnerParticipantId": {
													"anyOf": [
														{
															"type": "string"
														},
														{
															"type": "null"
														}
													]
												},
												"resultVersion": {
													"type": "integer",
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												}
											},
											"required": [
												"matchKey",
												"bracketType",
												"round",
												"matchNumber",
												"status",
												"scheduledAt",
												"venue",
												"team1",
												"team2",
												"score",
												"winnerParticipantId",
												"resultVersion"
											],
											"additionalProperties": false
										}
									},
									"required": [
										"data"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"parameters": [
					{
						"name": "slug",
						"in": "path",
						"required": true,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string"
						}
					},
					{
						"name": "matchKey",
						"in": "path",
						"required": true,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$schema": "https://json-schema.org/draft/2020-12/schema",
								"type": "object",
								"properties": {
									"divisionId": {
										"anyOf": [
											{
												"type": "string",
												"minLength": 1
											},
											{
												"type": "null"
											}
										]
									},
									"team1Score": {
										"anyOf": [
											{
												"type": "integer",
												"minimum": 0,
												"maximum": 9007199254740991
											},
											{
												"type": "null"
											}
										]
									},
									"team2Score": {
										"anyOf": [
											{
												"type": "integer",
												"minimum": 0,
												"maximum": 9007199254740991
											},
											{
												"type": "null"
											}
										]
									},
									"setScores": {
										"anyOf": [
											{
												"minItems": 1,
												"maxItems": 7,
												"type": "array",
												"items": {
													"type": "array",
													"prefixItems": [
														{
															"type": "integer",
															"minimum": 0,
															"maximum": 9007199254740991
														},
														{
															"type": "integer",
															"minimum": 0,
															"maximum": 9007199254740991
														}
													]
												}
											},
											{
												"type": "null"
											}
										]
									},
									"winnerParticipantId": {
										"anyOf": [
											{
												"type": "string",
												"minLength": 1
											},
											{
												"type": "null"
											}
										]
									},
									"resultVersion": {
										"type": "integer",
										"minimum": 0,
										"maximum": 9007199254740991
									}
								},
								"required": [
									"resultVersion"
								]
							}
						}
					}
				}
			}
		},
		"/v1/tournaments/{slug}/registrations": {
			"get": {
				"operationId": "listTournamentRegistrations",
				"summary": "List tournament registrations (organizer)",
				"description": "Registration worklist for the signed-in organizer (requires the `tournament.registration` permission), filterable by review status. Not part of the public read cache. Requires the session bearer token.",
				"tags": [
					"tournaments"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string"
													},
													"displayName": {
														"type": "string"
													},
													"status": {
														"type": "string",
														"enum": [
															"pending",
															"approved",
															"rejected",
															"waitlisted"
														]
													},
													"divisionId": {
														"anyOf": [
															{
																"type": "string"
															},
															{
																"type": "null"
															}
														]
													},
													"note": {
														"anyOf": [
															{
																"type": "string"
															},
															{
																"type": "null"
															}
														]
													},
													"contactEmail": {
														"anyOf": [
															{
																"type": "string"
															},
															{
																"type": "null"
															}
														]
													},
													"members": {
														"type": "array",
														"items": {
															"type": "string"
														}
													},
													"reviewNote": {
														"anyOf": [
															{
																"type": "string"
															},
															{
																"type": "null"
															}
														]
													},
													"reviewedAt": {
														"anyOf": [
															{
																"type": "string",
																"format": "date-time",
																"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
															},
															{
																"type": "null"
															}
														]
													},
													"checkedInAt": {
														"anyOf": [
															{
																"type": "string",
																"format": "date-time",
																"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
															},
															{
																"type": "null"
															}
														]
													},
													"createdAt": {
														"type": "string",
														"format": "date-time",
														"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
													},
													"updatedAt": {
														"type": "string",
														"format": "date-time",
														"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
													}
												},
												"required": [
													"id",
													"displayName",
													"status",
													"divisionId",
													"note",
													"contactEmail",
													"members",
													"reviewNote",
													"reviewedAt",
													"checkedInAt",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false
											}
										},
										"nextCursor": {
											"anyOf": [
												{
													"type": "string"
												},
												{
													"type": "null"
												}
											]
										}
									},
									"required": [
										"data",
										"nextCursor"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"parameters": [
					{
						"name": "slug",
						"in": "path",
						"required": true,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string"
						}
					},
					{
						"name": "status",
						"in": "query",
						"required": false,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string",
							"enum": [
								"pending",
								"approved",
								"rejected",
								"waitlisted"
							]
						}
					},
					{
						"name": "limit",
						"in": "query",
						"required": false,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "integer",
							"minimum": 1,
							"maximum": 200
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"required": false,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string",
							"maxLength": 64
						}
					}
				]
			},
			"post": {
				"operationId": "submitRegistration",
				"summary": "Submit a registration",
				"description": "Entrant sign-up for a tournament with open registration (sign-in required; the organizer cannot register). Waitlist intake is applied automatically when the quota is full and waitlisting is enabled. Re-submitting updates the existing entry and resets it to pending.",
				"tags": [
					"tournaments"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"data": {
											"type": "object",
											"properties": {
												"ok": {
													"type": "boolean",
													"const": true
												},
												"waitlisted": {
													"type": "boolean"
												}
											},
											"required": [
												"ok",
												"waitlisted"
											],
											"additionalProperties": false
										}
									},
									"required": [
										"data"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"parameters": [
					{
						"name": "slug",
						"in": "path",
						"required": true,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$schema": "https://json-schema.org/draft/2020-12/schema",
								"type": "object",
								"properties": {
									"displayName": {
										"type": "string",
										"minLength": 1,
										"maxLength": 60
									},
									"contactEmail": {
										"type": "string",
										"maxLength": 120,
										"format": "email",
										"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
									},
									"divisionId": {
										"anyOf": [
											{
												"type": "string",
												"minLength": 1
											},
											{
												"type": "null"
											}
										]
									},
									"note": {
										"anyOf": [
											{
												"type": "string",
												"maxLength": 500
											},
											{
												"type": "null"
											}
										]
									},
									"members": {
										"maxItems": 8,
										"type": "array",
										"items": {
											"type": "string",
											"minLength": 1,
											"maxLength": 30
										}
									},
									"logoUrl": {
										"anyOf": [
											{
												"type": "string",
												"maxLength": 500
											},
											{
												"type": "null"
											}
										]
									},
									"customAnswers": {
										"type": "object",
										"propertyNames": {
											"type": "string"
										},
										"additionalProperties": {
											"type": "string",
											"maxLength": 500
										}
									}
								},
								"required": [
									"displayName",
									"contactEmail"
								]
							}
						}
					}
				}
			}
		},
		"/v1/tournaments/{slug}/registrations/{registrationId}/review": {
			"post": {
				"operationId": "reviewTournamentRegistration",
				"summary": "Approve or reject a registration",
				"description": "Organizer review action (mobile Phase 2): approve or reject one registration with an optional review note. Pass `expectedUpdatedAt` from the list payload to guard against concurrent edits (409 if the entrant changed their entry). Passing the last slot auto-rejects the remaining pending entries (quota full). Requires the session bearer token and the `tournament.registration` permission; supports `Idempotency-Key` replay.",
				"tags": [
					"tournaments"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"ok": {
											"type": "boolean",
											"const": true
										},
										"autoRejected": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"ok",
										"autoRejected"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"parameters": [
					{
						"name": "slug",
						"in": "path",
						"required": true,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string"
						}
					},
					{
						"name": "registrationId",
						"in": "path",
						"required": true,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$schema": "https://json-schema.org/draft/2020-12/schema",
								"type": "object",
								"properties": {
									"decision": {
										"type": "string",
										"enum": [
											"approve",
											"reject"
										]
									},
									"reviewNote": {
										"anyOf": [
											{
												"type": "string",
												"maxLength": 300
											},
											{
												"type": "null"
											}
										]
									},
									"expectedUpdatedAt": {
										"anyOf": [
											{
												"type": "string",
												"format": "date-time",
												"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
											},
											{
												"type": "null"
											}
										]
									},
									"locale": {
										"type": "string",
										"maxLength": 16
									}
								},
								"required": [
									"decision"
								]
							}
						}
					}
				}
			}
		},
		"/v1/my/tournaments": {
			"get": {
				"operationId": "listMyTournaments",
				"summary": "List tournaments I own",
				"description": "Tournaments owned by the signed-in user (mobile organizer entry point), including drafts. Requires the session bearer token.",
				"tags": [
					"account"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string"
													},
													"slug": {
														"type": "string"
													},
													"name": {
														"type": "string"
													},
													"format": {
														"type": "string",
														"enum": [
															"single_elimination",
															"double_elimination",
															"round_robin",
															"group_knockout",
															"swiss",
															"swiss_knockout"
														]
													},
													"category": {
														"type": "string"
													},
													"status": {
														"type": "string",
														"enum": [
															"draft",
															"live",
															"completed"
														]
													},
													"teamCount": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"startTime": {
														"anyOf": [
															{
																"type": "string",
																"format": "date-time",
																"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
															},
															{
																"type": "null"
															}
														]
													},
													"venue": {
														"anyOf": [
															{
																"type": "string"
															},
															{
																"type": "null"
															}
														]
													},
													"updatedAt": {
														"type": "string",
														"format": "date-time",
														"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
													}
												},
												"required": [
													"id",
													"slug",
													"name",
													"format",
													"category",
													"status",
													"teamCount",
													"startTime",
													"venue",
													"updatedAt"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"data"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				}
			}
		},
		"/v1/my/leagues": {
			"get": {
				"operationId": "listMyLeagues",
				"summary": "List leagues I manage",
				"description": "Leagues owned by the signed-in user (web studio /studio/leagues projection). Requires the session bearer token.",
				"tags": [
					"account"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string"
													},
													"slug": {
														"type": "string"
													},
													"name": {
														"type": "string"
													},
													"description": {
														"type": "string"
													},
													"tournamentCount": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"completedCount": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"archivedAt": {
														"anyOf": [
															{
																"type": "string",
																"format": "date-time",
																"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
															},
															{
																"type": "null"
															}
														]
													},
													"createdAt": {
														"type": "string",
														"format": "date-time",
														"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
													},
													"updatedAt": {
														"type": "string",
														"format": "date-time",
														"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
													}
												},
												"required": [
													"id",
													"slug",
													"name",
													"description",
													"tournamentCount",
													"completedCount",
													"archivedAt",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"data"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				}
			}
		},
		"/v1/my/participating": {
			"get": {
				"operationId": "listMyParticipating",
				"summary": "List tournaments I participate in as staff",
				"description": "Tournaments where the signed-in user is a member (referee/scorekeeper/staff), excluding owned ones. Requires the session bearer token.",
				"tags": [
					"account"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string"
													},
													"slug": {
														"type": "string"
													},
													"name": {
														"type": "string"
													},
													"role": {
														"anyOf": [
															{
																"type": "string"
															},
															{
																"type": "null"
															}
														]
													},
													"status": {
														"type": "string",
														"enum": [
															"draft",
															"live",
															"completed"
														]
													},
													"startTime": {
														"anyOf": [
															{
																"type": "string",
																"format": "date-time",
																"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
															},
															{
																"type": "null"
															}
														]
													},
													"venue": {
														"anyOf": [
															{
																"type": "string"
															},
															{
																"type": "null"
															}
														]
													}
												},
												"required": [
													"id",
													"slug",
													"name",
													"role",
													"status",
													"startTime",
													"venue"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"data"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				}
			}
		},
		"/v1/my/billing": {
			"get": {
				"operationId": "getMyBilling",
				"summary": "Read-only subscription status",
				"description": "Current plan tier, non-renew deadline and Event Pass tournaments. Purchases and portal management stay on the web (Apple IAP policy). Requires the session bearer token.",
				"tags": [
					"account"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"plan": {
											"type": "string",
											"enum": [
												"free",
												"community",
												"pro"
											]
										},
										"nonRenewUntil": {
											"anyOf": [
												{
													"type": "string",
													"format": "date-time",
													"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
												},
												{
													"type": "null"
												}
											]
										},
										"passTournaments": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string"
													},
													"name": {
														"type": "string"
													}
												},
												"required": [
													"id",
													"name"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"plan",
										"nonRenewUntil",
										"passTournaments"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				}
			}
		},
		"/v1/tournaments/{slug}/participants": {
			"put": {
				"operationId": "updateTournamentParticipants",
				"summary": "Replace the participant roster",
				"description": "Bulk roster replace (same semantics as the web studio): when the roster materially changes, existing matches and results in scope are cleared (rosterReset=true). Requires `tournament.manage`; supports `Idempotency-Key`.",
				"tags": [
					"tournaments"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"data": {
											"type": "object",
											"properties": {
												"rosterReset": {
													"type": "boolean"
												},
												"participants": {
													"type": "array",
													"items": {
														"type": "object",
														"properties": {
															"id": {
																"type": "string"
															},
															"name": {
																"type": "string"
															},
															"seed": {
																"type": "integer",
																"minimum": -9007199254740991,
																"maximum": 9007199254740991
															},
															"logoUrl": {
																"anyOf": [
																	{
																		"type": "string"
																	},
																	{
																		"type": "null"
																	}
																]
															}
														},
														"required": [
															"id",
															"name",
															"seed",
															"logoUrl"
														],
														"additionalProperties": false
													}
												}
											},
											"required": [
												"rosterReset",
												"participants"
											],
											"additionalProperties": false
										}
									},
									"required": [
										"data"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"parameters": [
					{
						"name": "slug",
						"in": "path",
						"required": true,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$schema": "https://json-schema.org/draft/2020-12/schema",
								"type": "object",
								"properties": {
									"divisionId": {
										"anyOf": [
											{
												"type": "string",
												"minLength": 1
											},
											{
												"type": "null"
											}
										]
									},
									"participants": {
										"minItems": 2,
										"maxItems": 128,
										"type": "array",
										"items": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"minLength": 1
												},
												"name": {
													"type": "string",
													"minLength": 1,
													"maxLength": 60
												},
												"seed": {
													"type": "integer",
													"minimum": 1,
													"maximum": 9007199254740991
												},
												"logoUrl": {
													"anyOf": [
														{
															"type": "string",
															"maxLength": 500
														},
														{
															"type": "null"
														}
													]
												}
											},
											"required": [
												"name",
												"seed"
											]
										}
									}
								},
								"required": [
									"participants"
								]
							}
						}
					}
				}
			}
		},
		"/v1/tournaments/{slug}/registration": {
			"get": {
				"operationId": "getRegistrationInfo",
				"summary": "Get public registration info",
				"description": "Registration state for the tournament form: open/closed with the machine-readable reason, waitlist availability, quota counters, member limit and the custom question fields to render. Pass `?division=` for division-scoped quotas.",
				"tags": [
					"tournaments"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"tournament": {
											"type": "object",
											"properties": {
												"slug": {
													"type": "string"
												},
												"name": {
													"type": "string"
												},
												"status": {
													"type": "string",
													"enum": [
														"draft",
														"live",
														"completed"
													]
												}
											},
											"required": [
												"slug",
												"name",
												"status"
											],
											"additionalProperties": false
										},
										"registration": {
											"type": "object",
											"properties": {
												"enabled": {
													"type": "boolean"
												},
												"accepting": {
													"type": "boolean"
												},
												"closedReason": {
													"type": "string",
													"enum": [
														"disabled",
														"closed",
														"not_open",
														"deadline_passed",
														"full",
														"tournament_started",
														"none"
													]
												},
												"waitlistEnabled": {
													"type": "boolean"
												},
												"opensAt": {
													"anyOf": [
														{
															"type": "string",
															"format": "date-time",
															"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
														},
														{
															"type": "null"
														}
													]
												},
												"closesAt": {
													"anyOf": [
														{
															"type": "string",
															"format": "date-time",
															"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
														},
														{
															"type": "null"
														}
													]
												},
												"approvedCount": {
													"type": "integer",
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"targetEntries": {
													"anyOf": [
														{
															"type": "integer",
															"minimum": -9007199254740991,
															"maximum": 9007199254740991
														},
														{
															"type": "null"
														}
													]
												},
												"maxEntries": {
													"anyOf": [
														{
															"type": "integer",
															"minimum": -9007199254740991,
															"maximum": 9007199254740991
														},
														{
															"type": "null"
														}
													]
												},
												"membersMax": {
													"type": "integer",
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"customFieldsEnabled": {
													"type": "boolean"
												},
												"customFields": {
													"type": "array",
													"items": {
														"type": "object",
														"properties": {
															"id": {
																"type": "string"
															},
															"label": {
																"type": "string"
															},
															"required": {
																"type": "boolean"
															},
															"inputType": {
																"type": "string",
																"enum": [
																	"text",
																	"textarea",
																	"number",
																	"email",
																	"phone",
																	"select",
																	"multiselect",
																	"image"
																]
															},
															"maxLength": {
																"anyOf": [
																	{
																		"type": "integer",
																		"minimum": -9007199254740991,
																		"maximum": 9007199254740991
																	},
																	{
																		"type": "null"
																	}
																]
															},
															"options": {
																"type": "array",
																"items": {
																	"type": "string"
																}
															}
														},
														"required": [
															"id",
															"label",
															"required",
															"inputType",
															"maxLength",
															"options"
														],
														"additionalProperties": false
													}
												}
											},
											"required": [
												"enabled",
												"accepting",
												"closedReason",
												"waitlistEnabled",
												"opensAt",
												"closesAt",
												"approvedCount",
												"targetEntries",
												"maxEntries",
												"membersMax",
												"customFieldsEnabled",
												"customFields"
											],
											"additionalProperties": false
										}
									},
									"required": [
										"tournament",
										"registration"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"parameters": [
					{
						"name": "slug",
						"in": "path",
						"required": true,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string"
						}
					},
					{
						"name": "division",
						"in": "query",
						"required": false,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string"
						}
					}
				]
			}
		},
		"/v1/tournaments/{slug}/lifecycle": {
			"post": {
				"operationId": "tournamentLifecycleAction",
				"summary": "Run a lifecycle action",
				"description": "State machine actions from the mobile dashboard: publish/unpublish/finish/reopen/pause/resume/archive/unarchive and advance_knockout (group/swiss → elimination stage, returns qualifiers). Transition legality is enforced here; the underlying services still guard permissions and archived/paused state. Requires `tournament.manage`; supports `Idempotency-Key`.",
				"tags": [
					"tournaments"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"data": {
											"type": "object",
											"properties": {
												"status": {
													"type": "string",
													"enum": [
														"draft",
														"live",
														"completed"
													]
												},
												"paused": {
													"type": "boolean"
												},
												"archived": {
													"type": "boolean"
												},
												"qualifiers": {
													"anyOf": [
														{
															"type": "array",
															"items": {
																"type": "object",
																"properties": {
																	"id": {
																		"type": "string"
																	},
																	"name": {
																		"type": "string"
																	},
																	"seed": {
																		"type": "number"
																	}
																},
																"required": [
																	"id",
																	"name",
																	"seed"
																],
																"additionalProperties": false
															}
														},
														{
															"type": "null"
														}
													]
												}
											},
											"required": [
												"status",
												"paused",
												"archived"
											],
											"additionalProperties": false
										}
									},
									"required": [
										"data"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"parameters": [
					{
						"name": "slug",
						"in": "path",
						"required": true,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$schema": "https://json-schema.org/draft/2020-12/schema",
								"type": "object",
								"properties": {
									"action": {
										"type": "string",
										"enum": [
											"publish",
											"unpublish",
											"finish",
											"reopen",
											"pause",
											"resume",
											"archive",
											"unarchive",
											"advance_knockout"
										]
									},
									"divisionId": {
										"anyOf": [
											{
												"type": "string",
												"minLength": 1
											},
											{
												"type": "null"
											}
										]
									}
								},
								"required": [
									"action"
								]
							}
						}
					}
				}
			}
		},
		"/v1/uploads/image": {
			"post": {
				"operationId": "uploadImage",
				"summary": "Upload an image",
				"description": "Base64 image upload (same validation chain as the web app: per-user quota, 2 MB cap, magic-byte whitelist for PNG/JPEG/WebP/GIF; SVG and HTML are rejected). `kind` selects the storage folder: avatar, registration (custom question images) or participant_logo. Requires the session bearer token.",
				"tags": [
					"account"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"url": {
											"type": "string"
										}
									},
									"required": [
										"url"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$schema": "https://json-schema.org/draft/2020-12/schema",
								"type": "object",
								"properties": {
									"kind": {
										"type": "string",
										"enum": [
											"avatar",
											"registration",
											"participant_logo"
										]
									},
									"fileName": {
										"type": "string",
										"minLength": 1,
										"maxLength": 200
									},
									"contentType": {
										"type": "string",
										"enum": [
											"image/png",
											"image/jpeg",
											"image/webp",
											"image/gif"
										]
									},
									"dataBase64": {
										"type": "string",
										"minLength": 1
									}
								},
								"required": [
									"kind",
									"fileName",
									"contentType",
									"dataBase64"
								]
							}
						}
					}
				}
			}
		},
		"/v1/my/api-keys": {
			"get": {
				"operationId": "listMyApiKeys",
				"summary": "List my API keys",
				"description": "API keys of the signed-in user with display prefix/suffix only (plaintext is never returned after creation), the account's effective rate tier and the active-key quota. Requires the session bearer token.",
				"tags": [
					"account"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"keys": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string"
													},
													"name": {
														"type": "string"
													},
													"prefix": {
														"type": "string"
													},
													"suffix": {
														"type": "string"
													},
													"status": {
														"type": "string",
														"enum": [
															"active",
															"revoked"
														]
													},
													"rateTier": {
														"type": "string"
													},
													"effectiveTier": {
														"type": "string"
													},
													"createdAt": {
														"type": "string",
														"format": "date-time",
														"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
													},
													"lastUsedAt": {
														"anyOf": [
															{
																"type": "string",
																"format": "date-time",
																"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
															},
															{
																"type": "null"
															}
														]
													},
													"revokedAt": {
														"anyOf": [
															{
																"type": "string",
																"format": "date-time",
																"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
															},
															{
																"type": "null"
															}
														]
													}
												},
												"required": [
													"id",
													"name",
													"prefix",
													"suffix",
													"status",
													"rateTier",
													"effectiveTier",
													"createdAt",
													"lastUsedAt",
													"revokedAt"
												],
												"additionalProperties": false
											}
										},
										"effectiveTier": {
											"type": "string"
										},
										"activeCount": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										},
										"maxActive": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										},
										"available": {
											"type": "boolean"
										}
									},
									"required": [
										"keys",
										"effectiveTier",
										"activeCount",
										"maxActive",
										"available"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				}
			},
			"post": {
				"operationId": "createMyApiKey",
				"summary": "Create an API key",
				"description": "Issue a new API key for the signed-in user. The plaintext key (`rl_live_…`) is returned exactly once in this response and only its prefix/suffix are stored in cleartext form afterwards. Active keys per account are capped. Requires the session bearer token; supports `Idempotency-Key`.",
				"tags": [
					"account"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"plaintext": {
											"type": "string"
										},
										"key": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string"
												},
												"name": {
													"type": "string"
												},
												"prefix": {
													"type": "string"
												},
												"suffix": {
													"type": "string"
												},
												"status": {
													"type": "string",
													"enum": [
														"active",
														"revoked"
													]
												},
												"rateTier": {
													"type": "string"
												},
												"effectiveTier": {
													"type": "string"
												},
												"createdAt": {
													"type": "string",
													"format": "date-time",
													"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
												},
												"lastUsedAt": {
													"anyOf": [
														{
															"type": "string",
															"format": "date-time",
															"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
														},
														{
															"type": "null"
														}
													]
												},
												"revokedAt": {
													"anyOf": [
														{
															"type": "string",
															"format": "date-time",
															"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
														},
														{
															"type": "null"
														}
													]
												}
											},
											"required": [
												"id",
												"name",
												"prefix",
												"suffix",
												"status",
												"rateTier",
												"effectiveTier",
												"createdAt",
												"lastUsedAt",
												"revokedAt"
											],
											"additionalProperties": false
										}
									},
									"required": [
										"plaintext",
										"key"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$schema": "https://json-schema.org/draft/2020-12/schema",
								"type": "object",
								"properties": {
									"name": {
										"type": "string",
										"minLength": 1,
										"maxLength": 64
									}
								},
								"required": [
									"name"
								]
							}
						}
					}
				}
			}
		},
		"/v1/my/api-keys/{id}/revoke": {
			"post": {
				"operationId": "revokeMyApiKey",
				"summary": "Revoke an API key",
				"description": "Revoke one of the signed-in user's active API keys. Revocation is permanent and idempotent (already-revoked keys succeed without change). Requires the session bearer token.",
				"tags": [
					"account"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"ok": {
											"type": "boolean",
											"const": true
										}
									},
									"required": [
										"ok"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string"
						}
					}
				]
			}
		},
		"/v1/my/notification-preferences": {
			"get": {
				"operationId": "getMyNotificationPreferences",
				"summary": "Get my notification preferences",
				"description": "Effective per-channel notification switches for the signed-in user (whats_new is always on; official and creation are user-toggleable). Requires the session bearer token.",
				"tags": [
					"account"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"preferences": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"channel": {
														"type": "string"
													},
													"enabled": {
														"type": "boolean"
													}
												},
												"required": [
													"channel",
													"enabled"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"preferences"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				}
			},
			"put": {
				"operationId": "updateMyNotificationPreference",
				"summary": "Update a notification preference",
				"description": "Toggle one channel (official = platform announcements, creation = activity about my tournaments/entries) for the signed-in user. Requires the session bearer token.",
				"tags": [
					"account"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"preferences": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"channel": {
														"type": "string"
													},
													"enabled": {
														"type": "boolean"
													}
												},
												"required": [
													"channel",
													"enabled"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"preferences"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$schema": "https://json-schema.org/draft/2020-12/schema",
								"type": "object",
								"properties": {
									"channel": {
										"type": "string",
										"enum": [
											"official",
											"creation"
										]
									},
									"enabled": {
										"type": "boolean"
									}
								},
								"required": [
									"channel",
									"enabled"
								]
							}
						}
					}
				}
			}
		},
		"/v1/my/account/delete": {
			"post": {
				"operationId": "deleteMyAccount",
				"summary": "Delete my account",
				"description": "Request deletion of the signed-in account (same better-auth flow as the web settings page, including its cooling-off semantics). The literal confirmation word \"DELETE\" is required; accounts with a password credential must also send the password. Requires the session bearer token.",
				"tags": [
					"account"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"ok": {
											"type": "boolean",
											"const": true
										}
									},
									"required": [
										"ok"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$schema": "https://json-schema.org/draft/2020-12/schema",
								"type": "object",
								"properties": {
									"confirmation": {
										"type": "string",
										"const": "DELETE"
									},
									"password": {
										"type": "string",
										"minLength": 1,
										"maxLength": 200
									}
								},
								"required": [
									"confirmation"
								]
							}
						}
					}
				}
			}
		},
		"/v1/tournaments/{slug}/settings/scheduling": {
			"get": {
				"operationId": "getTournamentSchedulingSettings",
				"summary": "Get scheduling settings (organizer)",
				"description": "Venue pool and scheduling rules (slot minutes, day windows, blocked dates) used by the schedule planner. Requires `tournament.manage` via the session bearer token.",
				"tags": [
					"tournaments"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"data": {
											"type": "object",
											"properties": {
												"venues": {
													"maxItems": 64,
													"type": "array",
													"items": {
														"type": "string",
														"minLength": 1,
														"maxLength": 120
													}
												},
												"slotMinutes": {
													"type": "integer",
													"minimum": 5,
													"maximum": 600
												},
												"bufferMinutes": {
													"type": "integer",
													"minimum": 0,
													"maximum": 300
												},
												"dayStart": {
													"type": "string",
													"pattern": "^([01]?\\d|2[0-3]):([0-5]\\d)$"
												},
												"dayEnd": {
													"type": "string",
													"pattern": "^([01]?\\d|2[0-3]):([0-5]\\d)$"
												},
												"dayWindows": {
													"maxItems": 12,
													"type": "array",
													"items": {
														"type": "object",
														"properties": {
															"start": {
																"type": "string",
																"pattern": "^([01]?\\d|2[0-3]):([0-5]\\d)$"
															},
															"end": {
																"type": "string",
																"pattern": "^([01]?\\d|2[0-3]):([0-5]\\d)$"
															}
														},
														"required": [
															"start",
															"end"
														],
														"additionalProperties": false
													}
												},
												"blockedDates": {
													"maxItems": 400,
													"type": "array",
													"items": {
														"type": "string",
														"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
													}
												},
												"maxPerTeamPerDay": {
													"type": "integer",
													"minimum": 0,
													"maximum": 99
												},
												"refereeBufferMinutes": {
													"type": "integer",
													"minimum": 0,
													"maximum": 600
												},
												"divisionOverrides": {
													"type": "object",
													"propertyNames": {
														"type": "string",
														"minLength": 1,
														"maxLength": 64
													},
													"additionalProperties": {
														"type": "object",
														"properties": {
															"venues": {
																"maxItems": 64,
																"type": "array",
																"items": {
																	"type": "string",
																	"minLength": 1,
																	"maxLength": 120
																}
															},
															"dayWindows": {
																"maxItems": 12,
																"type": "array",
																"items": {
																	"type": "object",
																	"properties": {
																		"start": {
																			"type": "string",
																			"pattern": "^([01]?\\d|2[0-3]):([0-5]\\d)$"
																		},
																		"end": {
																			"type": "string",
																			"pattern": "^([01]?\\d|2[0-3]):([0-5]\\d)$"
																		}
																	},
																	"required": [
																		"start",
																		"end"
																	],
																	"additionalProperties": false
																}
															}
														},
														"additionalProperties": false
													}
												}
											},
											"required": [
												"venues",
												"slotMinutes",
												"bufferMinutes",
												"dayStart",
												"dayEnd",
												"maxPerTeamPerDay"
											],
											"additionalProperties": false
										}
									},
									"required": [
										"data"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"parameters": [
					{
						"name": "slug",
						"in": "path",
						"required": true,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string"
						}
					}
				]
			},
			"put": {
				"operationId": "updateTournamentSchedulingSettings",
				"summary": "Update scheduling settings (organizer)",
				"description": "Replace the scheduling settings block (venues, slot minutes, day windows, blocked dates, per-division overrides) — the same whitelist-validated settings the web studio writes. Requires `tournament.manage`; supports `Idempotency-Key`.",
				"tags": [
					"tournaments"
				],
				"security": [
					{
						"bearerAuth": []
					},
					{
						"apiKeyQuery": []
					}
				],
				"responses": {
					"200": {
						"description": "Success",
						"headers": {
							"X-RateLimit-Limit": {
								"description": "Requests allowed in the tightest current window for your tier.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Remaining requests in the window. Omitted on edge-cache hits (hits do not consume quota).",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "Unix seconds when the current window resets.",
								"schema": {
									"type": "integer"
								}
							},
							"X-Request-Id": {
								"description": "Per-request identifier for support/debugging.",
								"schema": {
									"type": "string"
								}
							}
						},
						"content": {
							"application/json": {
								"schema": {
									"$schema": "https://json-schema.org/draft/2020-12/schema",
									"type": "object",
									"properties": {
										"data": {
											"type": "object",
											"properties": {
												"venues": {
													"maxItems": 64,
													"type": "array",
													"items": {
														"type": "string",
														"minLength": 1,
														"maxLength": 120
													}
												},
												"slotMinutes": {
													"type": "integer",
													"minimum": 5,
													"maximum": 600
												},
												"bufferMinutes": {
													"type": "integer",
													"minimum": 0,
													"maximum": 300
												},
												"dayStart": {
													"type": "string",
													"pattern": "^([01]?\\d|2[0-3]):([0-5]\\d)$"
												},
												"dayEnd": {
													"type": "string",
													"pattern": "^([01]?\\d|2[0-3]):([0-5]\\d)$"
												},
												"dayWindows": {
													"maxItems": 12,
													"type": "array",
													"items": {
														"type": "object",
														"properties": {
															"start": {
																"type": "string",
																"pattern": "^([01]?\\d|2[0-3]):([0-5]\\d)$"
															},
															"end": {
																"type": "string",
																"pattern": "^([01]?\\d|2[0-3]):([0-5]\\d)$"
															}
														},
														"required": [
															"start",
															"end"
														],
														"additionalProperties": false
													}
												},
												"blockedDates": {
													"maxItems": 400,
													"type": "array",
													"items": {
														"type": "string",
														"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
													}
												},
												"maxPerTeamPerDay": {
													"type": "integer",
													"minimum": 0,
													"maximum": 99
												},
												"refereeBufferMinutes": {
													"type": "integer",
													"minimum": 0,
													"maximum": 600
												},
												"divisionOverrides": {
													"type": "object",
													"propertyNames": {
														"type": "string",
														"minLength": 1,
														"maxLength": 64
													},
													"additionalProperties": {
														"type": "object",
														"properties": {
															"venues": {
																"maxItems": 64,
																"type": "array",
																"items": {
																	"type": "string",
																	"minLength": 1,
																	"maxLength": 120
																}
															},
															"dayWindows": {
																"maxItems": 12,
																"type": "array",
																"items": {
																	"type": "object",
																	"properties": {
																		"start": {
																			"type": "string",
																			"pattern": "^([01]?\\d|2[0-3]):([0-5]\\d)$"
																		},
																		"end": {
																			"type": "string",
																			"pattern": "^([01]?\\d|2[0-3]):([0-5]\\d)$"
																		}
																	},
																	"required": [
																		"start",
																		"end"
																	],
																	"additionalProperties": false
																}
															}
														},
														"additionalProperties": false
													}
												}
											},
											"required": [
												"venues",
												"slotMinutes",
												"bufferMinutes",
												"dayStart",
												"dayEnd",
												"maxPerTeamPerDay"
											],
											"additionalProperties": false
										}
									},
									"required": [
										"data"
									],
									"additionalProperties": false
								}
							}
						}
					},
					"400": {
						"description": "Invalid request (validation failed)"
					},
					"401": {
						"description": "Invalid or revoked API key"
					},
					"404": {
						"description": "Resource not found (draft/deleted or unknown slug)"
					},
					"429": {
						"description": "Rate limit exceeded for your tier"
					},
					"500": {
						"description": "Internal server error"
					}
				},
				"parameters": [
					{
						"name": "slug",
						"in": "path",
						"required": true,
						"schema": {
							"$schema": "https://json-schema.org/draft/2020-12/schema",
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$schema": "https://json-schema.org/draft/2020-12/schema",
								"type": "object",
								"properties": {
									"venues": {
										"maxItems": 64,
										"type": "array",
										"items": {
											"type": "string",
											"minLength": 1,
											"maxLength": 120
										}
									},
									"slotMinutes": {
										"type": "integer",
										"minimum": 5,
										"maximum": 600
									},
									"bufferMinutes": {
										"type": "integer",
										"minimum": 0,
										"maximum": 300
									},
									"dayStart": {
										"type": "string",
										"pattern": "^([01]?\\d|2[0-3]):([0-5]\\d)$"
									},
									"dayEnd": {
										"type": "string",
										"pattern": "^([01]?\\d|2[0-3]):([0-5]\\d)$"
									},
									"dayWindows": {
										"maxItems": 12,
										"type": "array",
										"items": {
											"type": "object",
											"properties": {
												"start": {
													"type": "string",
													"pattern": "^([01]?\\d|2[0-3]):([0-5]\\d)$"
												},
												"end": {
													"type": "string",
													"pattern": "^([01]?\\d|2[0-3]):([0-5]\\d)$"
												}
											},
											"required": [
												"start",
												"end"
											]
										}
									},
									"blockedDates": {
										"maxItems": 400,
										"type": "array",
										"items": {
											"type": "string",
											"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
										}
									},
									"maxPerTeamPerDay": {
										"type": "integer",
										"minimum": 0,
										"maximum": 99
									},
									"refereeBufferMinutes": {
										"type": "integer",
										"minimum": 0,
										"maximum": 600
									},
									"divisionOverrides": {
										"type": "object",
										"propertyNames": {
											"type": "string",
											"minLength": 1,
											"maxLength": 64
										},
										"additionalProperties": {
											"type": "object",
											"properties": {
												"venues": {
													"maxItems": 64,
													"type": "array",
													"items": {
														"type": "string",
														"minLength": 1,
														"maxLength": 120
													}
												},
												"dayWindows": {
													"maxItems": 12,
													"type": "array",
													"items": {
														"type": "object",
														"properties": {
															"start": {
																"type": "string",
																"pattern": "^([01]?\\d|2[0-3]):([0-5]\\d)$"
															},
															"end": {
																"type": "string",
																"pattern": "^([01]?\\d|2[0-3]):([0-5]\\d)$"
															}
														},
														"required": [
															"start",
															"end"
														]
													}
												}
											}
										}
									}
								},
								"required": [
									"venues",
									"slotMinutes",
									"bufferMinutes",
									"dayStart",
									"dayEnd",
									"maxPerTeamPerDay"
								]
							}
						}
					}
				}
			}
		}
	},
	"components": {
		"schemas": {
			"ApiError": {
				"$schema": "https://json-schema.org/draft/2020-12/schema",
				"type": "object",
				"properties": {
					"error": {
						"type": "object",
						"properties": {
							"code": {
								"type": "string",
								"enum": [
									"invalid_request",
									"unauthorized",
									"forbidden",
									"not_found",
									"conflict",
									"rate_limited",
									"internal_error"
								]
							},
							"message": {
								"type": "string"
							},
							"request_id": {
								"type": "string"
							}
						},
						"required": [
							"code",
							"message",
							"request_id"
						],
						"additionalProperties": false
					}
				},
				"required": [
					"error"
				],
				"additionalProperties": false
			}
		},
		"securitySchemes": {
			"bearerAuth": {
				"type": "http",
				"scheme": "bearer",
				"description": "Rollare API key: `rl_live_…`"
			},
			"apiKeyQuery": {
				"type": "apiKey",
				"in": "query",
				"name": "api_key",
				"description": "Fallback for embed contexts that cannot set headers. Prefer the Authorization header; query-string keys may leak into logs."
			}
		}
	}
}
