---
title: "Add an upstream macro preset"
type: reference
method: POST
path: /rest-api/upstream-macro-presets.do
tag: "Placements"
---

# Add an upstream macro preset

`POST https://YOUR-NETWORK-DOMAIN/rest-api/upstream-macro-presets.do`

Adds an upstream to the list video placements pick from. code, name and the macros are needed. Invalid values come back per field in errors (code, name, macros.clientIp, …); fields that were sent but not applied are listed in 'ignoredFields'. Requires the UPSTREAM_MACRO_PRESETS admin permission (Admin → Creatives & tags → Upstream macro presets).

## Body

A JSON body. An example, built from the field definitions:

```json
{
  "code": "ACME_SSAI",
  "name": "Acme SSAI",
  "source": "https://docs.acme.tv/ssai/macros",
  "asOf": "2026-11-04"
}
```

## Responses

- `200` — {preset, ignoredFields}
- `400` — Invalid body, each problem named in errors by field
- `401` — Authentication error
- `403` — Insufficient permissions, naming the missing one
- `409` — A preset with this code already exists

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/upstream-macro-presets.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "code": "ACME_SSAI",
  "name": "Acme SSAI",
  "source": "https://docs.acme.tv/ssai/macros",
  "asOf": "2026-11-04"
}'
```

Source: https://epom.com/ad-server/docs/api/placements/post-upstream-macro-presets