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

# Create advertiser country targeting

`POST https://YOUR-NETWORK-DOMAIN/rest-api/advertiser/{advertiserId}/targeting/country/create.do`

Creates one or more country/geo targeting rules for the specified advertiser and enables targeting if it was previously disabled. Accepts an array of country codes. Returns the created targeting rules as a JSON array. Requires COUNTRY targeting permission and UPDATE permission on the advertiser.

## Path params

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

## Form params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `rule` | string | yes | `INCLUDE` | Targeting rule type: INCLUDE or EXCLUDE |
| `countryCode` | array<string> | yes | `US` | Array of ISO 3166-1 alpha-2 country codes to target (e.g., US, GB, DE) |

## Responses

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

## Example request

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

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