curl \
-H "Authorization: Bearer API_KEY" \
-X DELETE "https://api.ayrshare.com/api/ads/instagram/audiences/23851234567890123?accountId=1234567890"
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/ads/instagram/audiences/23851234567890123?accountId=1234567890", {
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/instagram/audiences/23851234567890123?accountId=1234567890', headers=headers)
print(r.json())
{
"status": "success",
"id": "23851234567890123",
"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": "This audience cannot be deleted while lookalike audiences are built on it. Delete those lookalikes first."
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "id 23851234567890123 is not a custom audience of ad account 123456789."
}
{
"action": "ads",
"status": "error",
"code": 369,
"message": "Unable to delete the audience. Please try again.",
"details": "Meta's reason"
}
Instagram Ads
Audience हटाएँ
Instagram ad account से custom audience को id से स्थायी रूप से हटाएँ, Ads Manager में बनी audiences भी। पहले उस पर बनी lookalikes हटाएँ।
DELETE
/
ads
/
instagram
/
audiences
/
{id}
curl \
-H "Authorization: Bearer API_KEY" \
-X DELETE "https://api.ayrshare.com/api/ads/instagram/audiences/23851234567890123?accountId=1234567890"
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/ads/instagram/audiences/23851234567890123?accountId=1234567890", {
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/instagram/audiences/23851234567890123?accountId=1234567890', headers=headers)
print(r.json())
{
"status": "success",
"id": "23851234567890123",
"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": "This audience cannot be deleted while lookalike audiences are built on it. Delete those lookalikes first."
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "id 23851234567890123 is not a custom audience of ad account 123456789."
}
{
"action": "ads",
"status": "error",
"code": 369,
"message": "Unable to delete the audience. Please try again.",
"details": "Meta's reason"
}
Instagram ad account से custom audience हटाएँ। यह स्थायी है: audience Ads Manager से भी गायब हो जाती है, और उसे target करने वाला कोई भी चालू विज्ञापन उन लोगों तक पहुँचना बंद कर देता है।
- जिस audience पर lookalikes बनी हैं, उसे हटाया नहीं जा सकता। पहले उन lookalikes को हटाएँ।
accountIdसे बताए गए ad account की कोई भी custom audience हटाई जा सकती है, Ads Manager में बनाई गई audience भी। कोई भी अन्य idcode: 101वाला400लौटाता है।
हैडर पैरामीटर
पाथ पैरामीटर
Audience id, Audiences से।
क्वेरी पैरामीटर
curl \
-H "Authorization: Bearer API_KEY" \
-X DELETE "https://api.ayrshare.com/api/ads/instagram/audiences/23851234567890123?accountId=1234567890"
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/ads/instagram/audiences/23851234567890123?accountId=1234567890", {
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/instagram/audiences/23851234567890123?accountId=1234567890', headers=headers)
print(r.json())
{
"status": "success",
"id": "23851234567890123",
"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": "This audience cannot be deleted while lookalike audiences are built on it. Delete those lookalikes first."
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "id 23851234567890123 is not a custom audience of ad account 123456789."
}
{
"action": "ads",
"status": "error",
"code": 369,
"message": "Unable to delete the audience. Please try again.",
"details": "Meta's reason"
}