# List coaches `GET /api/v1/coaches` Lists coach records in the workspace. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Coaches → Read**. ## Headers - `X-Sport-Id` (integer) — Use the sport ID to limit the response to one sport. ## Query parameters - `team_id` (integer) — Include coaches assigned to this team. - `exclude_team_id` (integer) — Exclude coaches assigned to this team. - `archived` (boolean) — Use true to list archived records. The default lists active records. - `view_membership_status` (integer) — Use 1 to include current membership information. - `q` (string) — Search by name, email, or tax code. - `length` (integer) — Number of records to return. - `start` (integer) — Zero-based offset. - `draw` (string) — Optional request marker echoed in the response. - `page` (integer) — One-based page, used when length and start are omitted. - `pageSize` (integer) — Items per page, up to 100, when using page. - `sort` (string) — Sort by id, firstname, surname, taxcode, email, phone, portal_enabled, tsc, tsu, or current membership fields when expanded. Prefix the field name with a minus sign for descending order. - `order` (string) — Direction for unprefixed sort fields. Use asc or desc. ## Request Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --get \ --url "https://api.asdincloud.com/api/v1/coaches" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "X-Sport-Id: ${SPORT_ID:?Set SPORT_ID}" \ --data-urlencode "length=25" \ --data-urlencode "archived=false" ``` ## Response **200 OK** Returns matching coaches in `data` with counts before and after text search. Example with fictional data and selected fields. ```json { "status": "success", "data": [ { "id": 21, "sport_id": 3, "type": "coach", "firstname": "SAM", "surname": "EXAMPLE", "email": "sam@example.com", "archived_at": null, "to_notify": false, "metadata": {}, "fullname": "EXAMPLE SAM" } ], "records_total": 1, "records_filtered": 1, "draw": null } ``` ## Errors - `401` — The API key is missing or invalid. - `403` — The API key lacks the required permission.