---
title: "Get site ads.txt lines"
type: reference
method: GET
path: /rest-api/sites/{siteId}/ads-txt.do
tag: "Sites"
---

# Get site ads.txt lines

`GET https://YOUR-NETWORK-DOMAIN/rest-api/sites/{siteId}/ads-txt.do`

Returns the ads.txt lines (app-ads.txt for an app) the publisher has to publish for this site, as one list ('lines') and grouped by why each is required ('groups'): NETWORK — the network's own line, named the way the network's OpenRTB supply chain names the site; on a site with an active header-bidding tag that carries a supply chain, the pair the tag sends (the White Label seller domain and the site's schainSellerId), plus the OpenRTB pair while an active DSP partner's banner runs on the site; DIRECT, or RESELLER when the site's schainSellerType is INTERMEDIARY — and the ads.txt lines set on the White Label page, whose MANAGERDOMAIN opens the file, and OWNERDOMAIN too on a site the network sells under its own name (nobody owns it, or the network's admin does); SITE — the site's own additional lines ('additional' lists them with their ids and, for a variable no partner may set, why it is not published in 'notPublished'); ADVERTISER — the lines of each demand partner (an advertiser that resells or runs its own tag) with an active banner linked to an active placement of the site. A line is listed once. 'headerBidding' lists each partner bidder in the site's active header-bidding tags with the ads.txt system it sells under ('system', null when the bidder is not a known one), whether a listed line already names that system ('covered') and whether the last check found every such line in the live file ('live': null when no line names the system or no check read the file; a line added since the check is not live until the next one). Also returns the last check of the publisher's live file, read at the root domain of the site URL: status (ALL_PRESENT, LINES_MISSING, NO_FILE, FETCH_FAILED, NO_DOMAIN), checkedAt, fileUrl, the missing lines, the bidders' systems the file has no record of ('missingSystems') and why the fetch failed ('error', in the caller's language). Requires ENABLED or READONLY level on the SITE_SUPPLY_CHAIN permission and VIEW permission on the site; a masked share is refused.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `siteId` | integer | yes | `5001` | Unique numeric ID of the site |

## Responses

- `200` — Lines and last check returned
- `400` — Bad request — invalid or missing parameters
- `401` — Authentication error
- `403` — No SITE_SUPPLY_CHAIN permission, or the site is outside the caller's shares or masked
- `404` — Site not found

## Example request

```bash
curl --request GET \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/sites/5001/ads-txt.do' \
  --header 'X-Api-Key: YOUR_API_KEY'
```

Source: https://epom.com/ad-server/docs/api/sites/get-sites-ads-txt