---
title: "Create placement custom parameter targeting"
type: reference
method: POST
path: /rest-api/placement/{placementId}/targeting/custom/create.do
tag: "Targeting Rules"
---

# Create placement custom parameter targeting

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

Creates a custom parameter targeting rule for the specified placement. Supports three custom target types: EXPRESSION for boolean expressions (e.g., '($p1==1 || $p1=="a")'), VALUE for exact match, and SUBSTRING for partial match. When using VALUE or SUBSTRING types, the operation and parameter fields define the matching logic. Requires UPDATE permission on the placement and MANAGE_SUPPLY_PRE_TARGETING user permission.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `placementId` | integer | yes | `4001` | Unique numeric ID of the placement |

## Form params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `rule` | string | yes | `INCLUDE` | Targeting rule type — INCLUDE for whitelist or EXCLUDE for blacklist |
| `customValue` | string | yes | `premium_user` | Custom targeting value or expression (e.g., '($p1==1 \|\| $p1=="a") && $p2>=12') |
| `customType` | string | no | `VALUE` | Custom target type — EXPRESSION, VALUE, or SUBSTRING (optional) |
| `operation` | string | no | `EQUALS` | Matching operation — EQUALS, NOT_EQUALS, CONTAINS, or NOT_CONTAINS (optional) |
| `parameter` | string | no | `segment` | Parameter name for the operation value (optional) |

## Responses

- `200` — Success
- `400` — Invalid targeting value
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Placement not found
- `500` — Internal server error

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/placement/4001/targeting/custom/create.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'rule=INCLUDE' \
  --data-urlencode 'customValue=premium_user' \
  --data-urlencode 'customType=VALUE' \
  --data-urlencode 'operation=EQUALS' \
  --data-urlencode 'parameter=segment'
```

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