---
title: "Create campaign browser country targeting"
type: reference
method: POST
path: /rest-api/campaign/{campaignId}/targeting/browser-country/create.do
tag: "Targeting Rules"
---

# Create campaign browser country targeting

`POST https://YOUR-NETWORK-DOMAIN/rest-api/campaign/{campaignId}/targeting/browser-country/create.do`

Creates browser country targeting rules for the specified campaign. Multiple country codes can be provided, creating a separate targeting rule for each. Rules match the country resolved from the visitor's browser time zone instead of the IP location. Targeting is automatically enabled if it was previously disabled. Requires UPDATE permission on the campaign and MANAGE_DEMAND_TARGETING user permission.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `campaignId` | integer | yes | `1234` | Unique numeric ID of the campaign |

## Form params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `countryCode` | array<string> | yes | `US` | Array of ISO 3166-1 alpha-2 country codes to target |
| `rule` | string | yes | `INCLUDE` | Targeting rule type — INCLUDE for whitelist or EXCLUDE for blacklist |

## Responses

- `200` — Success
- `400` — Invalid country code
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Campaign not found
- `500` — Internal server error

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/campaign/1234/targeting/browser-country/create.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'countryCode=US' \
  --data-urlencode 'rule=INCLUDE'
```

Source: https://epom.com/ad-server/docs/api/targeting-rules/post-campaign-targeting-browser-country-create