> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# حذف جمهور

> احذف نهائيًا بالمعرّف شريحة جمهور من حساب إعلاني على Snapchat، بما فيها الشرائح المُنشأة في Ads Manager.

احذف شريحة جمهور من حساب إعلاني على Snapchat. الحذف نهائي: تختفي الشريحة من Ads Manager أيضًا، ويتوقف الإعلان قيد التشغيل الذي يستهدفها عن الوصول إلى هؤلاء الأشخاص.

<ul>
  <li>يمكن حذف أي شريحة في الحساب الإعلاني المحدد في `accountId`، بما في ذلك شريحة أُنشئت في Ads Manager. شريحة حساب إعلاني آخر، أو معرّف محذوف مسبقًا أو غير معروف، يُعيد `400` مع `code: 101`، ولا يُحذف أي شيء.</li>
</ul>

## معاملات الترويسة

**Authorization** `string` *required*

[API Key](https://www.ayrshare.com/docs/apis/overview.md#authorization) of the Primary Profile.

Format: `Authorization: Bearer API_KEY`
**Profile-Key** `string`

[Profile Key](https://www.ayrshare.com/docs/apis/overview.md#profile-key-format) of a User Profile.

Format: `Profile-Key: PROFILE_KEY`

## معاملات المسار

**id** `string` *required*

معرّف الشريحة، من [الجماهير](https://www.ayrshare.com/docs/apis/ads/snapchat/get-audiences.md).

## معاملات الاستعلام

**accountId** `string` *required*

الحساب الإعلاني الذي تنتمي إليه الشريحة.

```bash cURL theme={"system"}
curl \
-H "Authorization: Bearer API_KEY" \
-X DELETE "https://api.ayrshare.com/api/ads/snapchat/audiences/8c1e2f3a-0000-4000-8000-000000000101?accountId=5a0d1b2c-0000-4000-8000-000000000003"
```

```javascript JavaScript theme={"system"}
const API_KEY = "API_KEY";

fetch("https://api.ayrshare.com/api/ads/snapchat/audiences/8c1e2f3a-0000-4000-8000-000000000101?accountId=5a0d1b2c-0000-4000-8000-000000000003", {
      method: "DELETE",
      headers: {
        "Authorization": `Bearer ${API_KEY}`
      }
    })
      .then((res) => res.json())
      .then((json) => console.log(json))
      .catch(console.error);
```

```python Python theme={"system"}
import requests

headers = {'Authorization': 'Bearer API_KEY'}

r = requests.delete('https://api.ayrshare.com/api/ads/snapchat/audiences/8c1e2f3a-0000-4000-8000-000000000101?accountId=5a0d1b2c-0000-4000-8000-000000000003', headers=headers)

print(r.json())
```

```json 200: Success theme={"system"}
{
  "status": "success",
  "id": "8c1e2f3a-0000-4000-8000-000000000101",
  "deleted": true
}
```

```json 400: Not an audience of this account theme={"system"}
{
  "action": "request",
  "status": "error",
  "code": 101,
  "message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
  "details": "id 8c1e2f3a-0000-4000-8000-000000000101 is not an audience of ad account 5a0d1b2c-0000-4000-8000-000000000003."
}
```

```json 400: Snapchat refused the request theme={"system"}
{
  "action": "ads",
  "status": "error",
  "code": 369,
  "message": "Unable to delete the audience. Please try again.",
  "details": "Snapchat's reason"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.