---
title: "Add preset domain to group"
type: reference
method: POST
path: /rest-api/preset-domain/domain/add.do
tag: "Targeting Rules"
---

# Add preset domain to group

`POST https://YOUR-NETWORK-DOMAIN/rest-api/preset-domain/domain/add.do`

Adds a single domain entry to the specified preset domain group. The domain value is validated and must be a syntactically valid domain name. The group must exist or a 404 error is returned. Returns the created domain object as JSON. Requires PRESET_DOMAIN_GROUP_MANAGEMENT permission. The action is recorded in the audit log.

## Form params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `groupId` | integer | yes | `100` | Unique numeric ID of the preset domain group to add the domain to |
| `domain` | string | yes | `example.com` | Domain name to add (must be a valid domain, e.g., example.com) |

## 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 POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/preset-domain/domain/add.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'groupId=100' \
  --data-urlencode 'domain=example.com'
```

Source: https://epom.com/ad-server/docs/api/targeting-rules/post-preset-domain-domain-add