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

# Create advertiser blocked site targeting

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

Creates a blocked site targeting rule for the specified advertiser. Multiple site IDs can be provided as a comma-separated string. Duplicate sites that already exist as targets are silently skipped. Requires UPDATE permission on the advertiser and MANAGE_DEMAND_TARGETING user permission. A created target also switches the entity's targeting on, since targets take effect only while it is on. The answer lists the ids targeted now in 'created' and the ones that already were in 'alreadyTargeted'; an unknown or deleted id is refused and nothing is created.

## Path params

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

## Form params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `siteId` | string | yes | `201,202,203` | Comma-separated list of site IDs to block (e.g., '201,202,203') |
| `rule` | string | yes | `INCLUDE` | Targeting rule type — INCLUDE for whitelist or EXCLUDE for blacklist |

## Responses

- `200` — {success, created, alreadyTargeted}
- `400` — An unknown or deleted id
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Advertiser or site not found
- `500` — Internal server error

## Example request

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

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