# List sports `GET /api/v1/sports` Lists the sports in the workspace associated with your API key. You can call this endpoint before selecting a sport. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Sports → Read**. ## Query parameters - `status` (string) — Defaults to `visible`, which excludes hidden and archived sports. Use `hidden` for hidden sports that are not archived, `archived` for archived sports, or `all` for all three groups. - `q` (string) — Searches the name, public name, and slug. - `length` (integer) — Positive page size. Omit it to return all matches. - `start` (integer) — Zero-based offset. Defaults to `0`. Use it with `length`. - `sort` (string) — Sort by `id`, `tsc` (creation time), or `tsu` (last update time). Prefix a field with `-` for descending order. - `order` (string) — Sort direction for fields without a `-` prefix. Accepts `asc` (the default) or `desc`. - `draw` (string) — Optional request marker echoed in the response. ## Request Set ASDINCLOUD_API_KEY before running. ```sh curl --get \ --url "https://api.asdincloud.com/api/v1/sports" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --data-urlencode "q=basketball" \ --data-urlencode "sort=id" \ --data-urlencode "length=10" \ --data-urlencode "start=0" ``` ## Response **200 OK** `data` contains the sports on the requested page. List entries also include `sport_public_link` and `form_id`. When no pre-registration form is configured, `form_id` is `null`. `records_total` counts sports after the status filter, before search and pagination. `records_filtered` counts sports after both the status filter and search, before pagination. `draw` echoes the request marker or returns `null` when omitted. Example with fictional data and selected fields. ```json { "status": "success", "records_total": 2, "records_filtered": 1, "data": [ { "id": 1, "name": "Basketball", "public_name": "Basketball", "slug": "basketball", "is_hidden": null, "archived_at": null, "sport_public_link": "https://module.asdincloud.com/example-club/basketball", "form_id": null } ], "draw": null } ``` ## Errors - `401` — The API key is missing or invalid. - `403` — The API key lacks Sports read access.