---
title: "Upload preset domains"
type: reference
method: POST
path: /rest-api/preset-domain/group/upload-domains.do
tag: "Targeting Rules"
---

# Upload preset domains

`POST https://YOUR-NETWORK-DOMAIN/rest-api/preset-domain/group/upload-domains.do`

Bulk-imports domains into the specified preset domain group from an uploaded file. The file should contain one domain per line. A special DMCA zip file format is also supported for copyright-related domain lists. Returns a JSON object with import statistics including the number of processed records. Requires PRESET_DOMAIN_GROUP_MANAGEMENT permission. The action is recorded in the audit log.

## Query params

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

## Body

A multipart form: `file` (file).

## 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/group/upload-domains.do?groupId=100' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --form 'file=@data.csv'
```

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