# Export memberships `GET /api/v1/memberships/export` Downloads membership history or a directory with current membership status. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Memberships → Read**. ## Headers - `X-Sport-Id` (integer, required) — The sport ID from [List sports](/api/sports/list.md). Use the sport the record belongs to. ## Query parameters - `mode` (string) — Use history for membership records or current for a directory of people with current membership details. Defaults to history. - `subject_type` (string) — Use athlete, coach, or staff. - `subject_id` (integer) — ID of the person holding the membership. - `organization` (string) — Governing organization, up to 100 characters. - `season` (string) — Season label, for example 2026/2027. - `card_type` (string or null) — Membership card category, up to 100 characters. - `status` (string) — Use active, pending, expired, canceled, or all. - `team_id` (integer) — Filter by team assignment. ## 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/memberships/export" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "X-Sport-Id: ${SPORT_ID:?Set SPORT_ID}" \ --data-urlencode "mode=history" \ --data-urlencode "subject_type=athlete" \ --data-urlencode "season=2026/2027" \ --output "memberships.csv" ``` ## Response **200 OK** Returns a semicolon-delimited CSV attachment. Current mode uses subject type, organization, and season filters. ```http HTTP/1.1 200 OK Content-Type: text/csv; charset=UTF-8 Content-Disposition: attachment; filename="export_tesseramenti_2026-11-14_120000.csv" ``` ## Errors - `401` — The API key is missing or invalid. - `403` — The API key lacks the required permission.