{
  "openapi": "3.1.0",
  "info": {
    "title": "CrossFit API",
    "version": "1.0.0",
    "summary": "CrossFit competition results as JSON: athletes, the Open, the Games, divisions, workouts, leaderboards and affiliate gyms.",
    "description": "A read-only REST API over public CrossFit competition data, normalised into one schema that does not change between seasons.\n\n**Every field is always present.** A value that does not apply is `null`; it is never omitted, so a row has the same shape on page one and page four hundred.\n\n**Provenance.** Every record carries the source it came from, usually with the URL. Anything this service computed rather than read is labelled `calculated_by`.\n\nThis is an independent service. It is not affiliated with, endorsed by, or operated by CrossFit, LLC. CrossFit® is a trademark of its respective owner.",
    "contact": {
      "name": "CrossFit API",
      "url": "https://crossfitapi.com",
      "email": "hello@crossfitapi.com"
    },
    "termsOfService": "https://crossfitapi.com/terms"
  },
  "servers": [
    {
      "url": "https://api.crossfitapi.com",
      "description": "Production"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Meta",
      "description": "Status, coverage and plans. No key required."
    },
    {
      "name": "Competitions",
      "description": "Any competition, by id or slug."
    },
    {
      "name": "The Open",
      "description": "Convenience routes for the Open, by year."
    },
    {
      "name": "The Games",
      "description": "Convenience routes for the Games, by year."
    },
    {
      "name": "Athletes",
      "description": "Profiles, results and careers."
    },
    {
      "name": "Workouts",
      "description": "Workouts and per-workout leaderboards."
    },
    {
      "name": "Results",
      "description": "A single result, in full."
    },
    {
      "name": "Gyms",
      "description": "Affiliate gyms, including radius search."
    }
  ],
  "paths": {
    "/v1/health": {
      "get": {
        "tags": [
          "Meta"
        ],
        "summary": "Service status and dataset totals",
        "description": "Answers without a key. Includes per-source freshness and the row counts behind the coverage page.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/data": {
      "get": {
        "tags": [
          "Meta"
        ],
        "summary": "Coverage, per season",
        "description": "What is loaded and how complete it is, counted from the database rather than declared.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/plans": {
      "get": {
        "tags": [
          "Meta"
        ],
        "summary": "The plans on sale",
        "description": "Prices, quotas and capabilities. Free and Enterprise are deliberately absent: neither is something you can buy here.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/countries": {
      "get": {
        "tags": [
          "Meta"
        ],
        "summary": "Athlete and gym counts by country",
        "description": "Useful as a facet list for a country filter.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Country"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/competitions": {
      "get": {
        "tags": [
          "Competitions"
        ],
        "summary": "Every competition",
        "description": "Filterable by type and year.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Competition"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "type",
            "description": "Competition type.",
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "games",
                "quarterfinal",
                "semifinal"
              ]
            },
            "in": "query",
            "required": false
          },
          {
            "name": "year",
            "description": "Season year.",
            "schema": {
              "type": "integer"
            },
            "in": "query",
            "required": false
          }
        ]
      }
    },
    "/v1/competitions/{id}": {
      "get": {
        "tags": [
          "Competitions"
        ],
        "summary": "One competition",
        "description": "By public id or slug.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Competition"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or no such endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The competition public id, or its slug. Both resolve.",
            "schema": {
              "type": "string"
            },
            "in": "path",
            "required": true
          }
        ]
      }
    },
    "/v1/competitions/{id}/divisions": {
      "get": {
        "tags": [
          "Competitions"
        ],
        "summary": "Divisions of a competition",
        "description": "Canonical keys alongside the source ids they came from.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Division"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or no such endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The competition public id, or its slug. Both resolve.",
            "schema": {
              "type": "string"
            },
            "in": "path",
            "required": true
          }
        ]
      }
    },
    "/v1/competitions/{id}/workouts": {
      "get": {
        "tags": [
          "Competitions"
        ],
        "summary": "Workouts of a competition",
        "description": "In competition order.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Workout"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or no such endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The competition public id, or its slug. Both resolve.",
            "schema": {
              "type": "string"
            },
            "in": "path",
            "required": true
          }
        ]
      }
    },
    "/v1/competitions/{id}/leaderboard": {
      "get": {
        "tags": [
          "Competitions"
        ],
        "summary": "Leaderboard of any competition",
        "description": "The same shape for the Open, the Games and the qualifying stages.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/LeaderboardRow"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter, cursor, year or division",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "This plan does not include the requested capability",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or no such endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The competition public id, or its slug. Both resolve.",
            "schema": {
              "type": "string"
            },
            "in": "path",
            "required": true
          },
          {
            "name": "limit",
            "description": "Rows per page. The maximum is set by your plan; asking for more is an error rather than a silent truncation.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 50
            },
            "in": "query",
            "required": false
          },
          {
            "name": "cursor",
            "description": "Opaque cursor from `pagination.next_cursor`. Omit for the first page.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          },
          {
            "name": "division",
            "description": "Canonical division key, for example `men` or `men-45-49`. The same key means the same field in every season, which the upstream ids do not.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          },
          {
            "name": "scaled",
            "description": "Defaults to `rx`. `all` interleaves every scaling.",
            "schema": {
              "type": "string",
              "enum": [
                "rx",
                "scaled",
                "foundations",
                "all"
              ]
            },
            "in": "query",
            "required": false
          },
          {
            "name": "country",
            "description": "ISO 3166-1 alpha-2 country code.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          },
          {
            "name": "gym",
            "description": "Gym public id or slug.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          }
        ]
      }
    },
    "/v1/open": {
      "get": {
        "tags": [
          "The Open"
        ],
        "summary": "Open seasons served",
        "description": "Oldest first.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Competition"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/open/{year}": {
      "get": {
        "tags": [
          "The Open"
        ],
        "summary": "One Open season",
        "description": "",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Competition"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter, cursor, year or division",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "year",
            "description": "Season year, for example 2026.",
            "schema": {
              "type": "integer"
            },
            "in": "path",
            "required": true
          }
        ]
      }
    },
    "/v1/open/{year}/divisions": {
      "get": {
        "tags": [
          "The Open"
        ],
        "summary": "Divisions of an Open season",
        "description": "",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Division"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter, cursor, year or division",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "year",
            "description": "Season year, for example 2026.",
            "schema": {
              "type": "integer"
            },
            "in": "path",
            "required": true
          }
        ]
      }
    },
    "/v1/open/{year}/workouts": {
      "get": {
        "tags": [
          "The Open"
        ],
        "summary": "Workouts of an Open season",
        "description": "Each with its decoded score type and, where we could derive one, a time cap.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Workout"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter, cursor, year or division",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "year",
            "description": "Season year, for example 2026.",
            "schema": {
              "type": "integer"
            },
            "in": "path",
            "required": true
          }
        ]
      }
    },
    "/v1/open/{year}/leaderboard": {
      "get": {
        "tags": [
          "The Open"
        ],
        "summary": "Open leaderboard",
        "description": "Cursor-paginated on rank plus a tiebreaker id, so depth costs no more than the first page.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/LeaderboardRow"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter, cursor, year or division",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "This plan does not include the requested capability",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "year",
            "description": "Season year, for example 2026.",
            "schema": {
              "type": "integer"
            },
            "in": "path",
            "required": true
          },
          {
            "name": "limit",
            "description": "Rows per page. The maximum is set by your plan; asking for more is an error rather than a silent truncation.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 50
            },
            "in": "query",
            "required": false
          },
          {
            "name": "cursor",
            "description": "Opaque cursor from `pagination.next_cursor`. Omit for the first page.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          },
          {
            "name": "division",
            "description": "Canonical division key, for example `men` or `men-45-49`. The same key means the same field in every season, which the upstream ids do not.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          },
          {
            "name": "scaled",
            "description": "Defaults to `rx`. `all` interleaves every scaling.",
            "schema": {
              "type": "string",
              "enum": [
                "rx",
                "scaled",
                "foundations",
                "all"
              ]
            },
            "in": "query",
            "required": false
          },
          {
            "name": "country",
            "description": "ISO 3166-1 alpha-2 country code.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          },
          {
            "name": "gym",
            "description": "Gym public id or slug.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          }
        ]
      }
    },
    "/v1/games": {
      "get": {
        "tags": [
          "The Games"
        ],
        "summary": "Games seasons served",
        "description": "",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Competition"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/games/{year}": {
      "get": {
        "tags": [
          "The Games"
        ],
        "summary": "One Games season",
        "description": "",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Competition"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter, cursor, year or division",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "year",
            "description": "Season year, for example 2026.",
            "schema": {
              "type": "integer"
            },
            "in": "path",
            "required": true
          }
        ]
      }
    },
    "/v1/games/{year}/divisions": {
      "get": {
        "tags": [
          "The Games"
        ],
        "summary": "Divisions of a Games season",
        "description": "Individual and team fields.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Division"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter, cursor, year or division",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "year",
            "description": "Season year, for example 2026.",
            "schema": {
              "type": "integer"
            },
            "in": "path",
            "required": true
          }
        ]
      }
    },
    "/v1/games/{year}/workouts": {
      "get": {
        "tags": [
          "The Games"
        ],
        "summary": "Events of a Games season",
        "description": "In competition order.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Workout"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter, cursor, year or division",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "year",
            "description": "Season year, for example 2026.",
            "schema": {
              "type": "integer"
            },
            "in": "path",
            "required": true
          }
        ]
      }
    },
    "/v1/games/{year}/leaderboard": {
      "get": {
        "tags": [
          "The Games"
        ],
        "summary": "Games leaderboard",
        "description": "Final standings, on the points the source published.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/LeaderboardRow"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter, cursor, year or division",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "This plan does not include the requested capability",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "year",
            "description": "Season year, for example 2026.",
            "schema": {
              "type": "integer"
            },
            "in": "path",
            "required": true
          },
          {
            "name": "limit",
            "description": "Rows per page. The maximum is set by your plan; asking for more is an error rather than a silent truncation.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 50
            },
            "in": "query",
            "required": false
          },
          {
            "name": "cursor",
            "description": "Opaque cursor from `pagination.next_cursor`. Omit for the first page.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          },
          {
            "name": "division",
            "description": "Canonical division key, for example `men` or `men-45-49`. The same key means the same field in every season, which the upstream ids do not.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          },
          {
            "name": "scaled",
            "description": "Defaults to `rx`. `all` interleaves every scaling.",
            "schema": {
              "type": "string",
              "enum": [
                "rx",
                "scaled",
                "foundations",
                "all"
              ]
            },
            "in": "query",
            "required": false
          },
          {
            "name": "country",
            "description": "ISO 3166-1 alpha-2 country code.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          },
          {
            "name": "gym",
            "description": "Gym public id or slug.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          }
        ]
      }
    },
    "/v1/athletes": {
      "get": {
        "tags": [
          "Athletes"
        ],
        "summary": "List athletes",
        "description": "Cursor-paginated by name.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AthleteHit"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter, cursor, year or division",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "limit",
            "description": "Rows per page. The maximum is set by your plan; asking for more is an error rather than a silent truncation.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 50
            },
            "in": "query",
            "required": false
          },
          {
            "name": "cursor",
            "description": "Opaque cursor from `pagination.next_cursor`. Omit for the first page.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          }
        ]
      }
    },
    "/v1/athletes/search": {
      "get": {
        "tags": [
          "Athletes"
        ],
        "summary": "Search athletes by name",
        "description": "Accent- and case-insensitive. Returns the gym and country alongside each hit so a picker does not need a second request.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AthleteHit"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter, cursor, year or division",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "q",
            "description": "The name, or part of it.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          },
          {
            "name": "limit",
            "description": "Rows per page. The maximum is set by your plan; asking for more is an error rather than a silent truncation.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 50
            },
            "in": "query",
            "required": false
          },
          {
            "name": "cursor",
            "description": "Opaque cursor from `pagination.next_cursor`. Omit for the first page.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          }
        ]
      }
    },
    "/v1/athletes/{id}": {
      "get": {
        "tags": [
          "Athletes"
        ],
        "summary": "One athlete",
        "description": "By public id or slug.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Athlete"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or no such endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The athlete public id, or its slug. Both resolve.",
            "schema": {
              "type": "string"
            },
            "in": "path",
            "required": true
          }
        ]
      }
    },
    "/v1/athletes/{id}/results": {
      "get": {
        "tags": [
          "Athletes"
        ],
        "summary": "An athlete's results",
        "description": "One row per competition entered, newest first, with the workout scores nested.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AthleteResult"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "This plan does not include the requested capability",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or no such endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The athlete public id, or its slug. Both resolve.",
            "schema": {
              "type": "string"
            },
            "in": "path",
            "required": true
          },
          {
            "name": "limit",
            "description": "Rows per page. The maximum is set by your plan; asking for more is an error rather than a silent truncation.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 50
            },
            "in": "query",
            "required": false
          },
          {
            "name": "cursor",
            "description": "Opaque cursor from `pagination.next_cursor`. Omit for the first page.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          }
        ]
      }
    },
    "/v1/athletes/source/{source}/{source_id}": {
      "get": {
        "tags": [
          "Athletes"
        ],
        "summary": "Look an athlete up by their id at the source",
        "description": "For migrating off a scraper: hand it the competitor id you already store and get back this API’s athlete. Saves reconciling by name, which is the step that goes wrong on accents and on the several athletes who share one.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Athlete"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or no such endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "source",
            "description": "Source code.",
            "schema": {
              "type": "string",
              "enum": [
                "crossfit"
              ]
            },
            "in": "path",
            "required": true
          },
          {
            "name": "source_id",
            "description": "The competitor id at that source.",
            "schema": {
              "type": "string"
            },
            "in": "path",
            "required": true
          }
        ]
      }
    },
    "/v1/athletes/{id}/career": {
      "get": {
        "tags": [
          "Athletes"
        ],
        "summary": "An athlete's career ranks",
        "description": "The source's own career leaderboard positions, by scope — worldwide, country and affiliate. Empty for an athlete the source has never ranked.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "This plan does not include the requested capability",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or no such endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The athlete public id, or its slug. Both resolve.",
            "schema": {
              "type": "string"
            },
            "in": "path",
            "required": true
          }
        ]
      }
    },
    "/v1/workouts/{id}": {
      "get": {
        "tags": [
          "Workouts"
        ],
        "summary": "One workout",
        "description": "With its score type and, where derived, its time cap.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workout"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or no such endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The workout public id, or its slug. Both resolve.",
            "schema": {
              "type": "string"
            },
            "in": "path",
            "required": true
          }
        ]
      }
    },
    "/v1/workouts/{id}/leaderboard": {
      "get": {
        "tags": [
          "Workouts"
        ],
        "summary": "Leaderboard for one workout",
        "description": "Ranked on that workout alone, with the packed source score decoded into reps, time and tiebreak.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WorkoutLeaderboardRow"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter, cursor, year or division",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "This plan does not include the requested capability",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or no such endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The workout public id, or its slug. Both resolve.",
            "schema": {
              "type": "string"
            },
            "in": "path",
            "required": true
          },
          {
            "name": "limit",
            "description": "Rows per page. The maximum is set by your plan; asking for more is an error rather than a silent truncation.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 50
            },
            "in": "query",
            "required": false
          },
          {
            "name": "cursor",
            "description": "Opaque cursor from `pagination.next_cursor`. Omit for the first page.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          },
          {
            "name": "division",
            "description": "Canonical division key, for example `men` or `men-45-49`. The same key means the same field in every season, which the upstream ids do not.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          },
          {
            "name": "scaled",
            "description": "Defaults to `rx`. `all` interleaves every scaling.",
            "schema": {
              "type": "string",
              "enum": [
                "rx",
                "scaled",
                "foundations",
                "all"
              ]
            },
            "in": "query",
            "required": false
          },
          {
            "name": "country",
            "description": "ISO 3166-1 alpha-2 country code.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          },
          {
            "name": "gym",
            "description": "Gym public id or slug.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          }
        ]
      }
    },
    "/v1/results/{id}": {
      "get": {
        "tags": [
          "Results"
        ],
        "summary": "One result in full",
        "description": "The athlete, the competition, the placing and every workout score behind it. This is what a `result_id` on a leaderboard row resolves to.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultDetail"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "This plan does not include the requested capability",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or no such endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The result public id, or its slug. Both resolve.",
            "schema": {
              "type": "string"
            },
            "in": "path",
            "required": true
          }
        ]
      }
    },
    "/v1/gyms": {
      "get": {
        "tags": [
          "Gyms"
        ],
        "summary": "List or search affiliate gyms",
        "description": "Pass `near` and `radius_km` for a radius search; results then carry `distance_km`.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Gym"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter, cursor, year or division",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "limit",
            "description": "Rows per page. The maximum is set by your plan; asking for more is an error rather than a silent truncation.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 50
            },
            "in": "query",
            "required": false
          },
          {
            "name": "cursor",
            "description": "Opaque cursor from `pagination.next_cursor`. Omit for the first page.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          },
          {
            "name": "q",
            "description": "Name fragment.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          },
          {
            "name": "country",
            "description": "ISO 3166-1 alpha-2 code.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          },
          {
            "name": "near",
            "description": "Latitude and longitude, `50.85,4.35`.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          },
          {
            "name": "radius_km",
            "description": "Radius in kilometres. Requires `near`.",
            "schema": {
              "type": "number"
            },
            "in": "query",
            "required": false
          }
        ]
      }
    },
    "/v1/gyms/map": {
      "get": {
        "tags": [
          "Gyms"
        ],
        "summary": "Every gym with coordinates, as map pins",
        "description": "One response, not a cursor: the caller is drawing all of them at once. Each pin carries only what a marker needs; follow the id for the full record.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/GymPin"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gyms/search": {
      "get": {
        "tags": [
          "Gyms"
        ],
        "summary": "Search gyms by name",
        "description": "A convenience alias for `/v1/gyms?q=`.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Gym"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter, cursor, year or division",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "q",
            "description": "Name fragment.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          },
          {
            "name": "limit",
            "description": "Rows per page. The maximum is set by your plan; asking for more is an error rather than a silent truncation.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 50
            },
            "in": "query",
            "required": false
          },
          {
            "name": "cursor",
            "description": "Opaque cursor from `pagination.next_cursor`. Omit for the first page.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          }
        ]
      }
    },
    "/v1/gyms/{id}": {
      "get": {
        "tags": [
          "Gyms"
        ],
        "summary": "One gym",
        "description": "By public id or slug.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gym"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or no such endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The gym public id, or its slug. Both resolve.",
            "schema": {
              "type": "string"
            },
            "in": "path",
            "required": true
          }
        ]
      }
    },
    "/v1/gyms/{id}/athletes": {
      "get": {
        "tags": [
          "Gyms"
        ],
        "summary": "Athletes who competed for a gym",
        "description": "",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AthleteHit"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No active subscription for this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or no such endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The gym public id, or its slug. Both resolve.",
            "schema": {
              "type": "string"
            },
            "in": "path",
            "required": true
          },
          {
            "name": "limit",
            "description": "Rows per page. The maximum is set by your plan; asking for more is an error rather than a silent truncation.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 50
            },
            "in": "query",
            "required": false
          },
          {
            "name": "cursor",
            "description": "Opaque cursor from `pagination.next_cursor`. Omit for the first page.",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "required": false
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Your API key: `Authorization: Bearer cfapi_live_...`. Every account also gets a `cfapi_test_` key that reaches the same data and is free of the monthly quota."
      }
    },
    "schemas": {
      "Pagination": {
        "type": "object",
        "properties": {
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "has_more": {
            "type": "boolean"
          }
        },
        "required": [
          "next_cursor",
          "has_more"
        ]
      },
      "Country": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "code",
          "name"
        ]
      },
      "GymRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "distance_km": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          }
        },
        "required": [
          "id",
          "name",
          "distance_km"
        ]
      },
      "Source": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "source_url": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "name",
          "source_url"
        ]
      },
      "Athlete": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "slug": {
            "type": "string"
          },
          "gender": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Country"
              },
              {
                "type": "null"
              }
            ]
          },
          "gym": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/GymRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "height": {
            "type": [
              "string",
              "null"
            ]
          },
          "weight": {
            "type": [
              "string",
              "null"
            ]
          },
          "first_seen": {
            "type": "string"
          },
          "last_seen": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "first_name",
          "last_name",
          "slug",
          "gender",
          "country",
          "gym",
          "height",
          "weight",
          "first_seen",
          "last_seen"
        ]
      },
      "AthleteHit": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "gender": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Country"
              },
              {
                "type": "null"
              }
            ]
          },
          "gym": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/GymRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "latest_season": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "competitions": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "gender",
          "country",
          "gym",
          "latest_season",
          "competitions"
        ]
      },
      "Gym": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Country"
              },
              {
                "type": "null"
              }
            ]
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "latitude": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "longitude": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "distance_km": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "image_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "$ref": "#/components/schemas/Source"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "address",
          "city",
          "state",
          "country",
          "region",
          "latitude",
          "longitude",
          "distance_km",
          "image_url",
          "source"
        ]
      },
      "Competition": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "year": {
            "type": "integer",
            "format": "int32"
          },
          "start_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "end_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "$ref": "#/components/schemas/Source"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "type",
          "year",
          "start_date",
          "end_date",
          "status",
          "source"
        ]
      },
      "Division": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "gender": {
            "type": [
              "string",
              "null"
            ]
          },
          "age_min": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "age_max": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "team": {
            "type": "boolean"
          },
          "source_division_id": {
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "key",
          "id",
          "name",
          "category",
          "gender",
          "age_min",
          "age_max",
          "team",
          "source_division_id"
        ]
      },
      "Workout": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "ordinal": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "score_type": {
            "type": "string"
          },
          "time_cap_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "time_cap_uncertain": {
            "type": "boolean"
          },
          "calculated_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "source_workout_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          }
        },
        "required": [
          "id",
          "ordinal",
          "name",
          "description",
          "score_type",
          "time_cap_seconds",
          "time_cap_uncertain",
          "calculated_by",
          "source_workout_id"
        ]
      },
      "LeaderboardRow": {
        "type": "object",
        "properties": {
          "result_id": {
            "type": "string"
          },
          "rank": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "score": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "scaled": {
            "type": "string"
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "age": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "athlete": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AthleteRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "team": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TeamRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "gym": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/GymRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "gym_name_raw": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Country"
              },
              {
                "type": "null"
              }
            ]
          },
          "region": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Region"
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "$ref": "#/components/schemas/Source"
          }
        },
        "required": [
          "result_id",
          "rank",
          "score",
          "scaled",
          "status",
          "age",
          "athlete",
          "team",
          "gym",
          "gym_name_raw",
          "country",
          "region",
          "source"
        ]
      },
      "Region": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "scheme": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "scheme"
        ]
      },
      "TeamRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "AthleteRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "gender": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "gender"
        ]
      },
      "WorkoutResult": {
        "type": "object",
        "properties": {
          "workout_id": {
            "type": "string"
          },
          "ordinal": {
            "type": "integer",
            "format": "int32"
          },
          "workout": {
            "type": [
              "string",
              "null"
            ]
          },
          "rank": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "score_raw": {
            "type": "string"
          },
          "score_display": {
            "type": [
              "string",
              "null"
            ]
          },
          "breakdown": {
            "type": [
              "string",
              "null"
            ]
          },
          "valid": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "scaled": {
            "type": [
              "string",
              "null"
            ]
          },
          "video": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "reps": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "time_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "tiebreak_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "points": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        },
        "required": [
          "workout_id",
          "ordinal",
          "workout",
          "rank",
          "score_raw",
          "score_display",
          "breakdown",
          "valid",
          "scaled",
          "video",
          "reps",
          "time_seconds",
          "tiebreak_seconds",
          "points"
        ]
      },
      "CareerEntry": {
        "type": "object",
        "properties": {
          "year": {
            "type": "integer",
            "format": "int32"
          },
          "competition": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "competition_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "scope": {
            "type": "string"
          },
          "rank": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "division": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "total_entrants": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "source_percentile": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "source": {
            "$ref": "#/components/schemas/Source"
          }
        },
        "required": [
          "year",
          "competition",
          "type",
          "competition_id",
          "scope",
          "rank",
          "division",
          "region",
          "total_entrants",
          "source_percentile",
          "source"
        ]
      },
      "AthleteResult": {
        "type": "object",
        "properties": {
          "result_id": {
            "type": "string"
          },
          "year": {
            "type": "integer",
            "format": "int32"
          },
          "competition": {
            "type": "string"
          },
          "competition_id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "division": {
            "type": "string"
          },
          "division_name": {
            "type": "string"
          },
          "scaled": {
            "type": "string"
          },
          "rank": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "score": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "age": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "gym": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/GymRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "gym_name_raw": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Region"
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "$ref": "#/components/schemas/Source"
          }
        },
        "required": [
          "result_id",
          "year",
          "competition",
          "competition_id",
          "type",
          "division",
          "division_name",
          "scaled",
          "rank",
          "score",
          "status",
          "age",
          "gym",
          "gym_name_raw",
          "region",
          "source"
        ]
      },
      "GymPin": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "latitude": {
            "type": "number",
            "format": "double"
          },
          "longitude": {
            "type": "number",
            "format": "double"
          }
        },
        "required": [
          "id",
          "slug",
          "name",
          "city",
          "country",
          "latitude",
          "longitude"
        ]
      },
      "ResultDetail": {
        "type": "object",
        "properties": {
          "result_id": {
            "type": "string"
          },
          "athlete": {
            "$ref": "#/components/schemas/AthleteRefPublic"
          },
          "year": {
            "type": "integer",
            "format": "int32"
          },
          "competition": {
            "type": "string"
          },
          "competition_id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "division": {
            "type": "string"
          },
          "division_name": {
            "type": "string"
          },
          "scaled": {
            "type": "string"
          },
          "rank": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "score": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "age": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "gym": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/GymRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "gym_name_raw": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Region"
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "$ref": "#/components/schemas/Source"
          },
          "workout_results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkoutResult"
            }
          }
        },
        "required": [
          "result_id",
          "athlete",
          "year",
          "competition",
          "competition_id",
          "type",
          "division",
          "division_name",
          "scaled",
          "rank",
          "score",
          "status",
          "age",
          "gym",
          "gym_name_raw",
          "region",
          "source",
          "workout_results"
        ]
      },
      "AthleteRefPublic": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "gender": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "gender"
        ]
      },
      "WorkoutLeaderboardRow": {
        "type": "object",
        "properties": {
          "rank": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "division": {
            "type": "string"
          },
          "scaled": {
            "type": [
              "string",
              "null"
            ]
          },
          "athlete": {
            "$ref": "#/components/schemas/AthleteRef"
          },
          "gym": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/GymRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "country": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Country"
              },
              {
                "type": "null"
              }
            ]
          },
          "score_raw": {
            "type": "string"
          },
          "score_display": {
            "type": [
              "string",
              "null"
            ]
          },
          "reps": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "time_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "tiebreak_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "valid": {
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "required": [
          "rank",
          "division",
          "scaled",
          "athlete",
          "gym",
          "country",
          "score_raw",
          "score_display",
          "reps",
          "time_seconds",
          "tiebreak_seconds",
          "valid"
        ]
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "A stable machine-readable code. Switch on this, not on the message."
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  },
  "externalDocs": {
    "description": "Guides and quickstart",
    "url": "https://crossfitapi.com/docs"
  }
}
