---
title: "List campaigns"
---

> Documentation Index
> Fetch the complete documentation index at: https://api.whyviral.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List campaigns

Path: WhyViral API › Campaigns

`GET /campaigns`

URL: `https://whyviral.ai/api/v1/campaigns`

A project’s campaigns, newest first, with their totals. Free.

## Authentication

Requires one of the following:

- `bearer`, http bearer, header `Authorization`
- `apiKeyHeader`, apiKey, in header, header `x-api-key`

## Query parameters

- `project` (`listCampaigns.query.project`; string, optional) — A project’s id or exact name; case is ignored. Leave it out for the project active in the app.

## Code samples

### cURL

```bash
curl --request GET \
  --url https://whyviral.ai/api/v1/campaigns \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://whyviral.ai/api/v1/campaigns';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://whyviral.ai/api/v1/campaigns"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

The campaigns.

#### Example

```json
{
  "object": "list",
  "project": {
    "id": "q17d3k9x2v8q1m4n6b0c5w7h2r9t3y8a",
    "name": "Crumbsheet"
  },
  "data": [
    {
      "id": "s17e2m8x4c9v0b3n5q7w1r6t2y8u4i0o",
      "object": "campaign",
      "name": "Holiday price lists",
      "status": "active",
      "required_terms": [
        "@crumbsheet",
        "#crumbsheet"
      ],
      "flag_undisclosed": true,
      "flag_competitors": true,
      "start_at": "2026-11-10T00:00:00.000Z",
      "start_day": "2026-11-10",
      "ended_at": null,
      "end_day": "2026-12-06",
      "expected_posts": 2,
      "creators_done": 1,
      "created_at": "2026-11-09T15:00:00.000Z",
      "creators": 3,
      "creators_posted": 2,
      "posts": 4,
      "views": 388000,
      "all_posts": 11,
      "alerts": 1,
      "last_read_at": "2026-11-17T06:30:00.000Z",
      "next_read_at": "2026-11-18T06:30:00.000Z"
    }
  ]
}
```

- `object` (`listCampaigns.response.200.object`; string, required)
- `project` (`listCampaigns.response.200.project`; object, required)
  - `id` (`listCampaigns.response.200.project.id`; string, required) — The project’s id.
  - `name` (`listCampaigns.response.200.project.name`; string, required) — Its name.
- `data` (`listCampaigns.response.200.data`; array of object, required)
  - `id` (`listCampaigns.response.200.data.id`; string, required) — The campaign’s id.
  - `object` (`listCampaigns.response.200.data.object`; string, required) — `"campaign"`.
  - `name` (`listCampaigns.response.200.data.name`; string, required) — Its name.
  - `status` (`listCampaigns.response.200.data.status`; string, required) — `active` or `ended`.
    - one of `"active"`, `"ended"`
  - `required_terms` (`listCampaigns.response.200.data.required_terms`; array of string, required) — The tags and handles a campaign post must carry.
  - `flag_undisclosed` (`listCampaigns.response.200.data.flag_undisclosed`; boolean, required) — Whether a campaign post without an ad disclosure raises an alert.
  - `flag_competitors` (`listCampaigns.response.200.data.flag_competitors`; boolean, required) — Whether a post that names a competitor does.
  - `start_at` (`listCampaigns.response.200.data.start_at`; any of, required) — The instant the campaign starts: midnight of `start_day` in its owner’s timezone. Posts since then are read.
    - any of the following: `string`, `null`
  - `start_day` (`listCampaigns.response.200.data.start_day`; string, required) — The start as the calendar day its owner picked, `YYYY-MM-DD`. Show this one: the UTC date of `start_at` can be the day before.
    - format: `date`
  - `ended_at` (`listCampaigns.response.200.data.ended_at`; any of, required) — When it was ended, else null.
    - any of the following: `string`, `null`
  - `end_day` (`listCampaigns.response.200.data.end_day`; any of, required) — Its last day, `YYYY-MM-DD` in its owner’s timezone; it ends by itself after a last read. Null without one.
    - any of the following: `string`, `null`
  - `expected_posts` (`listCampaigns.response.200.data.expected_posts`; any of, required) — Campaign posts each creator owes; null when none are expected.
    - any of the following: `integer`, `null`
  - `creators_done` (`listCampaigns.response.200.data.creators_done`; any of, required) — Creators with that many campaign posts; null when none are expected.
    - any of the following: `integer`, `null`
  - `created_at` (`listCampaigns.response.200.data.created_at`; any of, required) — When it was made.
    - any of the following: `string`, `null`
  - `creators` (`listCampaigns.response.200.data.creators`; integer, required) — Creators in the campaign.
    - minimum: `0`
  - `creators_posted` (`listCampaigns.response.200.data.creators_posted`; integer, required) — How many of them have a campaign post.
    - minimum: `0`
  - `posts` (`listCampaigns.response.200.data.posts`; integer, required) — Campaign posts found.
    - minimum: `0`
  - `views` (`listCampaigns.response.200.data.views`; integer, required) — Their views at the last read.
    - minimum: `0`
  - `all_posts` (`listCampaigns.response.200.data.all_posts`; integer, required) — Every post the creators published since the start.
    - minimum: `0`
  - `alerts` (`listCampaigns.response.200.data.alerts`; integer, required) — Posts that raised an alert.
    - minimum: `0`
  - `last_read_at` (`listCampaigns.response.200.data.last_read_at`; any of, required) — When the creators’ posts were last read.
    - any of the following: `string`, `null`
  - `next_read_at` (`listCampaigns.response.200.data.next_read_at`; any of, required) — When they are read next; null once it ended.
    - any of the following: `string`, `null`

### 400

`INVALID_REQUEST`: The body isn’t JSON, its `url` is missing or too long, or a parameter has a value it doesn’t take. `AMBIGUOUS_PROJECT`: Several of your projects share the name you sent; pass the project’s `id`.

#### Example

```json
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "The body isn’t JSON, its url is missing or too long, or a parameter has a value it doesn’t take."
  }
}
```

- `error` (`listCampaigns.response.400.error`; object, required) — Some codes add details, such as `cap`, `required` or `balance`.
  - `code` (`listCampaigns.response.400.error.code`; string, required)
    - one of `"INVALID_REQUEST"`, `"UNSUPPORTED_LINK"`, `"INVALID_PERIOD"`, `"AMBIGUOUS_PROJECT"`, `"INVALID_REPORT"`, `"CREATOR_NOT_SAVED"`, `"TOO_MANY_REPORTS"`, `"INVALID_API_KEY"`, `"INSUFFICIENT_CREDITS"`, `"ACCOUNT_DISABLED"`, `"NOT_FOUND"`, `"TRACKER_NOT_FOUND"`, `"MONTHLY_LIMIT"`, `"RATE_LIMITED"`, `"INTERNAL"`, `"SEARCH_UNAVAILABLE"`
  - `message` (`listCampaigns.response.400.error.message`; string, required) — What went wrong, in words.

### 401

`INVALID_API_KEY`: The key is missing, mistyped or revoked.

#### Example

```json
{
  "error": {
    "code": "INVALID_API_KEY",
    "message": "The key is missing, mistyped or revoked."
  }
}
```

- `error` (`listCampaigns.response.401.error`; object, required) — Some codes add details, such as `cap`, `required` or `balance`.
  - `code` (`listCampaigns.response.401.error.code`; string, required)
    - one of `"INVALID_REQUEST"`, `"UNSUPPORTED_LINK"`, `"INVALID_PERIOD"`, `"AMBIGUOUS_PROJECT"`, `"INVALID_REPORT"`, `"CREATOR_NOT_SAVED"`, `"TOO_MANY_REPORTS"`, `"INVALID_API_KEY"`, `"INSUFFICIENT_CREDITS"`, `"ACCOUNT_DISABLED"`, `"NOT_FOUND"`, `"TRACKER_NOT_FOUND"`, `"MONTHLY_LIMIT"`, `"RATE_LIMITED"`, `"INTERNAL"`, `"SEARCH_UNAVAILABLE"`
  - `message` (`listCampaigns.response.401.error.message`; string, required) — What went wrong, in words.

### 403

`ACCOUNT_DISABLED`: The key’s account is disabled.

#### Example

```json
{
  "error": {
    "code": "ACCOUNT_DISABLED",
    "message": "The key’s account is disabled."
  }
}
```

- `error` (`listCampaigns.response.403.error`; object, required) — Some codes add details, such as `cap`, `required` or `balance`.
  - `code` (`listCampaigns.response.403.error.code`; string, required)
    - one of `"INVALID_REQUEST"`, `"UNSUPPORTED_LINK"`, `"INVALID_PERIOD"`, `"AMBIGUOUS_PROJECT"`, `"INVALID_REPORT"`, `"CREATOR_NOT_SAVED"`, `"TOO_MANY_REPORTS"`, `"INVALID_API_KEY"`, `"INSUFFICIENT_CREDITS"`, `"ACCOUNT_DISABLED"`, `"NOT_FOUND"`, `"TRACKER_NOT_FOUND"`, `"MONTHLY_LIMIT"`, `"RATE_LIMITED"`, `"INTERNAL"`, `"SEARCH_UNAVAILABLE"`
  - `message` (`listCampaigns.response.403.error.message`; string, required) — What went wrong, in words.

### 404

`NOT_FOUND`: No read, project, creator, campaign or report like this on your account.

#### Example

```json
{
  "error": {
    "code": "NOT_FOUND",
    "message": "No read, project, creator, campaign or report like this on your account."
  }
}
```

- `error` (`listCampaigns.response.404.error`; object, required) — Some codes add details, such as `cap`, `required` or `balance`.
  - `code` (`listCampaigns.response.404.error.code`; string, required)
    - one of `"INVALID_REQUEST"`, `"UNSUPPORTED_LINK"`, `"INVALID_PERIOD"`, `"AMBIGUOUS_PROJECT"`, `"INVALID_REPORT"`, `"CREATOR_NOT_SAVED"`, `"TOO_MANY_REPORTS"`, `"INVALID_API_KEY"`, `"INSUFFICIENT_CREDITS"`, `"ACCOUNT_DISABLED"`, `"NOT_FOUND"`, `"TRACKER_NOT_FOUND"`, `"MONTHLY_LIMIT"`, `"RATE_LIMITED"`, `"INTERNAL"`, `"SEARCH_UNAVAILABLE"`
  - `message` (`listCampaigns.response.404.error.message`; string, required) — What went wrong, in words.

### 429

`RATE_LIMITED`: Too many new reads, data requests, searches or report links; wait the `Retry-After` header’s seconds.

#### Example

```json
{
  "error": {
    "code": "RATE_LIMITED",
    "message": "Too many new reads, data requests, searches or report links; wait the Retry-After header’s seconds."
  }
}
```

- `error` (`listCampaigns.response.429.error`; object, required) — Some codes add details, such as `cap`, `required` or `balance`.
  - `code` (`listCampaigns.response.429.error.code`; string, required)
    - one of `"INVALID_REQUEST"`, `"UNSUPPORTED_LINK"`, `"INVALID_PERIOD"`, `"AMBIGUOUS_PROJECT"`, `"INVALID_REPORT"`, `"CREATOR_NOT_SAVED"`, `"TOO_MANY_REPORTS"`, `"INVALID_API_KEY"`, `"INSUFFICIENT_CREDITS"`, `"ACCOUNT_DISABLED"`, `"NOT_FOUND"`, `"TRACKER_NOT_FOUND"`, `"MONTHLY_LIMIT"`, `"RATE_LIMITED"`, `"INTERNAL"`, `"SEARCH_UNAVAILABLE"`
  - `message` (`listCampaigns.response.429.error.message`; string, required) — What went wrong, in words.

### 500

`INTERNAL`: Something broke on our side; try again.

#### Example

```json
{
  "error": {
    "code": "INTERNAL",
    "message": "Something broke on our side; try again."
  }
}
```

- `error` (`listCampaigns.response.500.error`; object, required) — Some codes add details, such as `cap`, `required` or `balance`.
  - `code` (`listCampaigns.response.500.error.code`; string, required)
    - one of `"INVALID_REQUEST"`, `"UNSUPPORTED_LINK"`, `"INVALID_PERIOD"`, `"AMBIGUOUS_PROJECT"`, `"INVALID_REPORT"`, `"CREATOR_NOT_SAVED"`, `"TOO_MANY_REPORTS"`, `"INVALID_API_KEY"`, `"INSUFFICIENT_CREDITS"`, `"ACCOUNT_DISABLED"`, `"NOT_FOUND"`, `"TRACKER_NOT_FOUND"`, `"MONTHLY_LIMIT"`, `"RATE_LIMITED"`, `"INTERNAL"`, `"SEARCH_UNAVAILABLE"`
  - `message` (`listCampaigns.response.500.error.message`; string, required) — What went wrong, in words.


Source: https://api.whyviral.ai/api/campaigns/list/index.md
