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"
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);
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())
{
"status": "success",
"id": "8c1e2f3a-0000-4000-8000-000000000101",
"deleted": true
}
{
"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."
}
{
"action": "ads",
"status": "error",
"code": 369,
"message": "Unable to delete the audience. Please try again.",
"details": "Snapchat's reason"
}
Snapchat Ads
删除受众
按 ID 永久删除 Snapchat 广告账户中的受众细分,包括在 Ads Manager 中创建的细分。
DELETE
/
ads
/
snapchat
/
audiences
/
{id}
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"
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);
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())
{
"status": "success",
"id": "8c1e2f3a-0000-4000-8000-000000000101",
"deleted": true
}
{
"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."
}
{
"action": "ads",
"status": "error",
"code": 369,
"message": "Unable to delete the audience. Please try again.",
"details": "Snapchat's reason"
}
从 Snapchat 广告账户中删除受众细分。此操作不可恢复:该细分也会从 Ads Manager 中消失,定位它的正在投放的广告将不再触达这些人。
accountId指定的广告账户上的任何细分都可以删除,包括在 Ads Manager 中创建的细分。其他广告账户的细分,或已删除或未知的 ID,会返回带有code: 101的400,且不会删除任何内容。
请求头参数
路径参数
细分 ID,来自受众。
查询参数
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"
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);
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())
{
"status": "success",
"id": "8c1e2f3a-0000-4000-8000-000000000101",
"deleted": true
}
{
"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."
}
{
"action": "ads",
"status": "error",
"code": 369,
"message": "Unable to delete the audience. Please try again.",
"details": "Snapchat's reason"
}