---
title: "List all campaigns"
type: reference
method: GET
path: /rest-api/campaigns.do
tag: "Campaigns"
---

# List all campaigns

`GET https://YOUR-NETWORK-DOMAIN/rest-api/campaigns.do`

Returns all non-deleted campaigns accessible by the authenticated user. Users with the SHARE permission on CAMPAIGNS see all campaigns in the system; otherwise, only campaigns linked to the user's advertiser shares are returned. Results can be narrowed by the active flag, an advertiser, label names and any on/off setting (filter[...]), ordered by id and paged with offset and limit, and trimmed to the fields named in fields; a labels filter matches any of its names, and one naming no existing label returns an empty list. Use the selfServRequest flag to receive a simplified self-serve response format. Each campaign's 'status' array holds UI status tokens computed from traffic statistics, which are not the on/off switch — that is the 'active' field: status-active = switched on AND served traffic in the last ~6 hours; status-not-active = switched off OR no traffic in the last ~6 hours, so active=true together with status-not-active is normal for an idle, not-yet-started or newly created campaign; status-finished (added alongside) = the campaign's delivery limits have ended it — end date passed, total limit reached or an action limit reached. 'hasTraffic' is the same ~6-hour traffic flag on its own. Traffic data is refreshed hourly. A deleted campaign has an empty array.

## Query params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `selfServRequest` | boolean | no | `false` | When true, returns a simplified self-serve response format instead of the full campaign details |
| `active` | boolean | no | `true` | When set, returns only active (true) or only inactive (false) campaigns; omit to return both |
| `labels` | array<string> | no | `premium` | Label names to filter by; a campaign carrying any of them is returned |
| `advertiserId` | integer | no | `1001` | Advertiser ID to restrict results to a single advertiser |
| `offset` | integer | no | `0` | Pagination offset over campaigns ordered by id (zero-based) |
| `limit` | integer | no | `100` | Maximum number of campaigns to return; omit for all |
| `fields` | array<string> | no | `id,name,active` | Return only these fields of each entity, comma-separated; id is always kept. A requested field no returned row carries is named in the X-Ignored-Fields response header |
| `filter` | object | no | `{"hasLimits": "true"}` | Keep only entities matching every key, e.g. filter[cpaOptimization]=true&filter[hasLimit]=true. Keys are the entity's on/off settings (active, enableTargeting, cpaOptimization, alwaysRedirect, ...) and a has<Relation> flag for each setting kept in rows of its own (hasLimit, hasPricing, hasFrequencyCapping, hasTrackingCode, hasPriceAdjustmentRules, hasLabels, hasBanners, ...), true when the relation holds a row; hasCapping, hasLimits and hasTargetingRules group the relations of their kind. An unknown key is a 400 that lists every valid key for the list. |

## Responses

- `200` — List of campaigns
- `400` — Bad request — invalid or missing parameters
- `401` — Authentication error
- `403` — Forbidden — insufficient permissions

## Example request

```bash
curl --request GET \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/campaigns.do?advertiserId=1001&active=true&selfServRequest=false&labels=premium' \
  --header 'X-Api-Key: YOUR_API_KEY'
```

Source: https://epom.com/ad-server/docs/api/campaigns/get-campaigns