---
title: "Count an audience before creating a campaign"
method: POST
path: "/v1/campaigns/audience-count"
tags: ["Campaigns"]
---

# Count an audience before creating a campaign

`POST /v1/campaigns/audience-count`

## Request

- Base URL: `https://api.volanea.com`
- URL: `https://api.volanea.com/v1/campaigns/audience-count`
- Auth: HTTP bearer

How many contacts the given targeting would reach right now — subscribed, non-suppressed, resolved exactly the way a real send resolves it. Powers the live recipient count in the campaign builder.

## Request body

- object
  - `audience` 'all' | 'segment' | 'filter'
  - `segmentId` string: Required when `audience` is `"segment"`.
  - `filter` SegmentConditions: Nested condition tree evaluated against contacts, their custom `data`, and their activity.
    - `logic` 'and' | 'or', required
    - `groups` object[], required
      - `filters` object[], required
        - `field` string, required: `email`, `subscribed`, `locale`, `createdAt`, `data.<key>`, `event.<name>`, `email.opened`, …
        - `operator` string, required: `equals`, `notEquals`, `contains`, `notContains`, `greaterThan`, `lessThan`, `exists`, `notExists`, `within`, `notWithin`, `triggered`, `notTriggered`, …
        - `value` union
          - string
          - number
          - boolean
        - `days` integer: Time window (days) for activity operators.

## Response `200`

The live recipient count.

- object
  - `count` integer, required

## Other responses

- `401`: Missing or invalid API key.
- `404`: Not found.
- `422`: Request validation failed (code `validation_error`, 422).

---

[API](https://skmtc.dev/volanea/apis/volanea-api.md) · [All operations](https://skmtc.dev/volanea/apis/volanea-api/llms.txt) · [OpenAPI document](https://skmtc.dev/volanea/apis/volanea-api/revisions/9e187ae84fda?raw)
