# Delete ad

> Delete one Meta ad.

Canonical: <https://www.tryadeli.com/docs/api/ads/delete-ad>

`DELETE https://app.tryadeli.com/api/v1/ads/ads/{adId}`

Authorization: `Bearer <API key>` — see [Authentication](https://www.tryadeli.com/docs/authentication)

**Meta Ads.** Deletes one ad, which stops its delivery immediately. It cannot be
undone; its ad set and campaign stay. The ad must belong to `adAccountId`;
otherwise the response is `404 object_not_found` and nothing is deleted.
Responds `204`.

**Path parameters**

| Name   | Type     | Required | Description                           |
| ------ | -------- | -------- | ------------------------------------- |
| `adId` | `string` | Yes      | A Meta ad id, from the campaign tree. |

**Query parameters**

| Name          | Type     | Required | Description                                      |
| ------------- | -------- | -------- | ------------------------------------------------ |
| `adAccountId` | `string` | Yes      | The ad account the ad belongs to.                |
| `accountId`   | `uuid`   |          | The Meta Ads account. Defaults to the profile's. |

## Request examples

**cURL**

```bash
curl -X DELETE "https://app.tryadeli.com/api/v1/ads/ads/120210000000000004?adAccountId=act_1234567890&accountId=00000000-0000-0000-0000-000000000000" \
  -H "Authorization: Bearer $ADELI_API_KEY"
```

**JavaScript**

```javascript
const response = await fetch("https://app.tryadeli.com/api/v1/ads/ads/120210000000000004?adAccountId=act_1234567890&accountId=00000000-0000-0000-0000-000000000000", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.ADELI_API_KEY}`,
  },
});
console.log(response.status); // 204: no body
```

**Python**

```python
import os

import requests

response = requests.delete(
    "https://app.tryadeli.com/api/v1/ads/ads/120210000000000004",
    headers={"Authorization": f"Bearer {os.environ['ADELI_API_KEY']}"},
    params={
        "adAccountId": "act_1234567890",
        "accountId": "00000000-0000-0000-0000-000000000000",
    },
)
print(response.status_code)  # 204: no body
```

## Responses

### 204 No Content

```text
(empty body)
```

### 404

```json
{
  "error": {
    "code": "object_not_found",
    "message": "That ad does not belong to this ad account",
    "details": { "object": "ad" }
  }
}
```
