---
title: "Add geo targeting to campaign"
method: POST
path: "/api/geo-targeting/campaigns/{campaignId}"
tags: ["Geo Targeting"]
---

# Add geo targeting to campaign

`POST /api/geo-targeting/campaigns/{campaignId}`

## Request

- Base URL: `https://docs.navistone.com` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.navistone.com/api/geo-targeting/campaigns/{campaignId}`
- Auth: API key in header `X-API-Key`
- TypeScript: <https://skmtc.dev/navistone/apis/zazmic-platform-api/docs/api/geo-targeting/campaigns/:campaignId/post.ts> (a function with typed inputs; its response is checked against the schema)

Add zip code or state-based targeting. Either zip OR state must be provided, not both. If zip is provided, optional radius in miles can be specified.

## Path parameters

- `campaignId` string, required

## Request body

- CreateGeoTargetingDto
  - `campaignId` string, required: Campaign ID
  - `zip` string: ZIP code for targeting (5-digit US postal code). Cannot be used with stateCode.
  - `radius` number: Radius in miles around the zip code center. Requires zip to be set.
  - `stateCode` string: State code (2 letters, e.g., CA, NY). Cannot be used with zip.
  - `suppress` boolean, required: Whether to suppress (exclude) this geo area. False means include only this area. Default is false.
  - `creativeId` number: Creative ID to associate with this geo targeting (Modern Postcard Creative ID)

## Response `201`

Geo targeting added

## Other responses

- `400`: Invalid input - both zip and state provided
- `401`: Unauthorized

---

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