---
title: "Get preset domains by group"
type: reference
method: GET
path: /rest-api/preset-domain/domain/all-by-group.do
tag: "Targeting Rules"
---

# Get preset domains by group

`GET https://YOUR-NETWORK-DOMAIN/rest-api/preset-domain/domain/all-by-group.do`

Returns all domain entries belonging to the specified preset domain group. The response is a JSON array of domain objects each containing an id and domain value. The group must exist or a 404 error is returned. Requires PRESET_DOMAIN_GROUP_MANAGEMENT permission.

## Query params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `groupId` | integer | yes | `100` | Unique numeric ID of the preset domain group to retrieve domains for |

## Responses

- `200` — Success
- `400` — Missing required parameter
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Preset group not found
- `500` — Internal server error

## Example request

```bash
curl --request GET \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/preset-domain/domain/all-by-group.do?groupId=100' \
  --header 'X-Api-Key: YOUR_API_KEY'
```

Source: https://epom.com/ad-server/docs/api/targeting-rules/get-preset-domain-domain-all-by-group