---
title: "Campaign Targeting Preview Admin"
method: POST
path: "/admin/campaigns/{campaign_id}/targeting-preview"
tags: ["admin", "campaigns"]
---

# Campaign Targeting Preview Admin

`POST /admin/campaigns/{campaign_id}/targeting-preview`

## Request

- Base URL: `https://api-docs.upsmith.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.upsmith.com/admin/campaigns/{campaign_id}/targeting-preview`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Admin-scoped targeting preview.

Used by the internal-mcp ``preview_campaign_targeting`` tool (no body →
persisted state) and the admin rule editor (body ``rules`` → unsaved edit).
The org-scoped sibling requires ``context.organization``; MCP authenticates
with a service key and has no per-user org, so it needs this admin route.

The omitted-vs-empty ``rules`` distinction is preserved: no body forwards
no payload (persisted resolution), ``rules: []`` forwards an explicit empty
set (everyone), so neither is coerced into the other.

## Path parameters

- `campaign_id` string, required

## Query parameters

- `include_independent` boolean
- `apply_region` boolean

## Headers

- `organization-id` string, nullable
- `timezone` string
- `x-user-id` string, nullable
- `x-actor-email` string, nullable
- `x-request-source` string, nullable
- `x-operation-id` string, nullable
- `x-commit-message` string, nullable
- `x-confirmation-id` string, nullable
- `x-chat-id` string, nullable

## Request body

- CampaignTargetingPreviewBody: Optional body. Omit ``rules`` to evaluate the campaign's persisted state.
  - `rules` object[], nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

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