## Why List Campaigns?

Occasionally, you may wish to return a list of all current and active campaigns in your account. If you would like to use the Explorer, you may use your API key.

## API Syntax

When using the List Campaigns API endpoint it is important to understand the syntax required to make the request. Because the Kevel API is a RESTful API, there is a specific request format that must be followed to ensure the endpoint can process the request. The format is:

```plaintext
GET https://api.kevel.co/v1/campaign
```

Where:

- `GET` - the type of API request being made.
- `https://api.kevel.co` - the URL for the request.
- `v1` - the API version.
- `campaign` - the API endpoint being called.

### Parameters

- **isArchived**  
  boolean  
  If true, returns only archived flights

- **AdvertiserId**  
  int32  
  Returns only campaigns that belong to that advertiser ID.

# Response Structure

```json
{
  "page": 1,
  "items": [
    {
      "IsActive": false,
      "Flights": [],
      "FreqCapType": 0,
      "IsDeleted": false,
      "Price": 0,
      "IsArchived": false,
      "AdvertiserId": 12345,
      "Name": "Exploding Kittens",
      "Id": 123456,
      "StartDateISO": "2017-03-11T00:00:00.0000000"
    }
  ]
}
```

### Example cURL Requests

To show archived campaigns:

```bash
curl -X GET \
     -H "X-Adzerk-ApiKey:<APIKEY>" \
     https://api.kevel.co/v1/campaign?isArchived=true
```

To return campaigns from a specific advertiser:

```bash
curl -X GET \
     -H "X-Adzerk-ApiKey:<APIKEY>" \
     https://api.kevel.co/v1/campaign?AdvertiserId=12345
```
