---
title: "Remove an advertiser ads.txt line"
type: reference
method: POST
path: /rest-api/advertisers/{advertiserId}/ads-txt/{lineId}/delete.do
tag: "Advertisers"
---

# Remove an advertiser ads.txt line

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

Removes one stored line by its id and 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 |
| `lineId` | integer | yes | `42` | ID of the line, as the GET returns it |

## Responses

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

## Example request

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

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