---
title: "Get DMP segments"
type: reference
method: GET
path: /rest-api/targeting/dmp/{dmp}/segments.do
tag: "Targeting Rules"
---

# Get DMP segments

`GET https://YOUR-NETWORK-DOMAIN/rest-api/targeting/dmp/{dmp}/segments.do`

Returns one level of a DMP's segment tree: the top level, or the children of parentId. Each entry has id (the dmpSegmentId to send to the DMP create endpoints), title, and segment, which is false for a folder whose children are fetched with its id as parentId. Requires MANAGE_DEMAND_TARGETING or MANAGE_SUPPLY_PRE_TARGETING, TARGETING_DMP or PRETARGETING_DMP, and the DMP's own permission.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `dmp` | string | yes | `FIRST_PARTY` | DMP — enum name or numeric ID |

## Query params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `parentId` | integer | no | `477` | Optional parent segment ID; omit for the top level |

## Responses

- `200` — Success; empty when parentId is not a segment of this DMP
- `400` — Unknown DMP
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found — resource does not exist
- `500` — Internal server error

## Example request

```bash
curl --request GET \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/targeting/dmp/FIRST_PARTY/segments.do?parentId=477' \
  --header 'X-Api-Key: YOUR_API_KEY'
```

Source: https://epom.com/ad-server/docs/api/targeting-rules/get-targeting-dmp-segments