---
title: "Remove a site ads.txt line"
type: reference
method: POST
path: /rest-api/sites/{siteId}/ads-txt/lines/{lineId}/delete.do
tag: "Sites"
---

# Remove a site ads.txt line

`POST https://YOUR-NETWORK-DOMAIN/rest-api/sites/{siteId}/ads-txt/lines/{lineId}/delete.do`

Removes one of the site's additional ads.txt lines by its id and returns the site's ads.txt view. Requires ENABLED level on the SITE_SUPPLY_CHAIN permission and UPDATE 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 |
| `lineId` | integer | yes | `42` | ID of the line, as the GET returns it under 'additional' |

## Responses

- `200` — Line removed
- `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, or the site has no line with that id

## Example request

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

Source: https://epom.com/ad-server/docs/api/sites/post-sites-ads-txt-lines-delete