---
title: "Count clients matching an audience and how many can receive marketing on the channel right now"
method: POST
path: "/api/v1/campaigns/audience-preview"
---

# Count clients matching an audience and how many can receive marketing on the channel right now

`POST /api/v1/campaigns/audience-preview`

## Request

- Base URL: `http://127.0.0.1:4310`
- URL: `http://127.0.0.1:4310/api/v1/campaigns/audience-preview`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `sfb_session`

## Request body

- object
  - `channel` 'email' | 'sms' | 'whatsapp'
  - `audience` object
    - `tag_ids` string[]
    - `service_ids` string[]
    - `location_ids` string[]
    - `last_visit_before` string, date
    - `last_visit_after` string, date
    - `spend_min_minor` integer
    - `spend_max_minor` integer

## Response `200`

OK

- object

## Other responses

- `400`: Validation error
- `401`: Unauthenticated
- `403`: Forbidden
- `404`: Not found
- `409`: Conflict or invalid state

---

[API](https://skmtc.dev/scalingfirm/apis/tsf-booking-api.md) · [All operations](https://skmtc.dev/scalingfirm/apis/tsf-booking-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scalingfirm/apis/tsf-booking-api/revisions/81704199cd37?raw)
