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

# Create zone custom parameter targeting

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

Creates a custom parameter targeting rule for the specified zone. Supports EXPRESSION, VALUE, and SUBSTRING custom types. Requires UPDATE permission on the zone and MANAGE_SUPPLY_PRE_TARGETING user permission.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `zoneId` | integer | yes | `200` | Unique numeric ID of the zone |

## 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` — Zone not found
- `500` — Internal server error

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/zone/200/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-zone-targeting-custom-create