---
title: "Estimate audience size for a campaign targeting spec"
method: POST
path: "/api/admin/push-campaigns/preview"
tags: ["Admin Push Campaigns"]
---

# Estimate audience size for a campaign targeting spec

`POST /api/admin/push-campaigns/preview`

## Request

- Base URL: `https://api.rewritelifestyle.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.rewritelifestyle.ai/api/admin/push-campaigns/preview`
- Auth: HTTP bearer

Returns an upper-bound recipient count from our DB (filters on role, subscription_tier, is_founder, is_enrolled). Platform / app version filters are evaluated by OneSignal at send time and are not reflected in the count.

## Request body

- PreviewPushCampaignDto
  - `targeting` PushCampaignTargetingDto, required
    - `platforms` string[]: Restrict to platforms (OneSignal device_type). Empty = all.
    - `appVersion` string: App version, e.g. "2.4.1"
    - `appVersionOp` '=' | '!=' | '>' | '<' | '>=' | '<=': Comparison operator for appVersion. Default "=".
    - `role` string: Filter by user role tag (e.g. "client", "lead")
    - `subscriptionTier` string: Filter by subscription_tier tag
    - `isFounder` string: Filter by is_founder tag ("true" / "false")
    - `isEnrolled` string: Filter by is_enrolled tag ("true" / "false")
    - `includedSegments` string[]: OneSignal segment names (created in dashboard). Combined with filters via OR.

## Response `200`

- unknown

---

[API](https://skmtc.dev/rewritelifestyle/apis/rewrite-lifestyle-api.md) - [All operations](https://skmtc.dev/rewritelifestyle/apis/rewrite-lifestyle-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rewritelifestyle/apis/rewrite-lifestyle-api/revisions/28695827f27a?raw)
