---
title: "Add advertiser ads.txt lines"
type: reference
method: POST
path: /rest-api/advertisers/{advertiserId}/ads-txt.do
tag: "Advertisers"
---

# Add advertiser ads.txt lines

`POST https://YOUR-NETWORK-DOMAIN/rest-api/advertisers/{advertiserId}/ads-txt.do`

Parses 'lines' the IAB ads.txt 1.1 way — blank lines and # comments skipped, variables kept — and appends what it adds to the advertiser's lines, each line once: the lines a demand partner that resells or runs its own tag asks publishers to carry. OWNERDOMAIN and MANAGERDOMAIN describe the site owner and are set only on the White Label page; CONTACT and SUBDOMAIN belong to the publisher's own file; a line with any of them is refused. When a line is malformed or refused nothing is stored and the answer carries success=false, invalidLines (1-based line numbers) and msg. Returns the advertiser's lines. Requires ENABLED level on the ADVERTISER_ADS_TXT permission and UPDATE permission on the advertiser.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `advertiserId` | integer | yes | `1001` | Unique numeric ID of the advertiser |

## Form params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `lines` | string | yes | `exchange.example, 7781, RESELLER, f08c47fec0942fa0` | The block as the partner gave it, one line per line |

## Responses

- `200` — Lines added, or refused with invalidLines
- `400` — Bad request — invalid or missing parameters
- `401` — Authentication error
- `403` — No ADVERTISER_ADS_TXT permission, or the advertiser is outside the caller's shares
- `404` — Advertiser not found

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/advertisers/1001/ads-txt.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'lines=exchange.example, 7781, RESELLER, f08c47fec0942fa0'
```

Source: https://epom.com/ad-server/docs/api/advertisers/post-advertisers-ads-txt