# List campaigns `GET /api/v1/campaigns` Lists campaign records in the workspace. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Campaigns → Read**. ## Headers - `X-Sport-Id` (integer) — Use the sport ID to limit the response to one sport. ## Query parameters - `type` (string) — Use email for email campaigns. The sms filter returns an empty list. - `q` (string) — Search by campaign name. - `length` (integer) — Number of records to return. - `start` (integer) — Zero-based offset. - `draw` (string) — Optional request marker echoed in the response. - `sort` (string) — Sort by id, tsc, or tsu. 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/campaigns" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "X-Sport-Id: ${SPORT_ID:?Set SPORT_ID}" \ --data-urlencode "type=email" \ --data-urlencode "length=25" ``` ## Response **200 OK** Returns matching campaigns and recipient and open metrics in `data`. Example with fictional data and selected fields. ```json { "status": "success", "data": [ { "id": 24, "sport_id": 3, "name": "November club news", "subject": "News from the club", "body_html": "
Registration for the winter program opens this week.
", "track_opens": false, "template_id": null, "recipient_config": null, "status": "draft", "scheduled_at": null, "recipients": 0, "open_count": 0, "open_rate": 0 } ], "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.