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

# Create campaign blocked placement targeting

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

Creates blocked placement targeting rules for the specified campaign. Multiple placement IDs can be provided as a comma-separated string. Requires UPDATE permission on the campaign 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 |
|---|---|---|---|---|
| `campaignId` | integer | yes | `1234` | Unique numeric ID of the campaign |

## Form params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `placementId` | string | yes | `100,200,300` | Comma-separated placement IDs to block |
| `rule` | string | yes | `EXCLUDE` | Targeting rule type |

## Responses

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

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/campaign/1234/targeting/placement/create.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'placementId=100,200,300' \
  --data-urlencode 'rule=EXCLUDE'
```

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