curl -X PUT https://api.ayrshare.com/api/ads/reddit/ads \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-d '{
"adId": "2707300000000000001",
"status": "PAUSED"
}'
{
"status": "success",
"adId": "2707300000000000001",
"requestedStatus": "PAUSED"
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "Invalid status: STOPPED. Status must be one of ACTIVE, PAUSED, DELETED, ARCHIVED."
}
{
"action": "ads",
"status": "error",
"code": 369,
"message": "Unable to boost post. Please try again.",
"warning": "The status change failed, and reddit did not confirm that ad 2707300000000000001 is stopped. It may be live and spending. Check it on reddit or pause it."
}
Reddit Ads
विज्ञापन अपडेट करें
Ayrshare से boost किए गए Reddit ad को pause, resume, archive या delete करें।
PUT
/
ads
/
reddit
/
ads
curl -X PUT https://api.ayrshare.com/api/ads/reddit/ads \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-d '{
"adId": "2707300000000000001",
"status": "PAUSED"
}'
{
"status": "success",
"adId": "2707300000000000001",
"requestedStatus": "PAUSED"
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "Invalid status: STOPPED. Status must be one of ACTIVE, PAUSED, DELETED, ARCHIVED."
}
{
"action": "ads",
"status": "error",
"code": 369,
"message": "Unable to boost post. Please try again.",
"warning": "The status change failed, and reddit did not confirm that ad 2707300000000000001 is stopped. It may be live and spending. Check it on reddit or pause it."
}
Boost Post से बनाए गए Reddit ad का status बदलें। Ad और Ayrshare द्वारा उसके लिए बनाया गया campaign साथ-साथ बदलते हैं।
DELETEDReddit पर ad को archive करता है, बिल्कुलARCHIVEDकी तरह। उसके cached response के refresh होते ही (nextUpdateदेखें) Boosted Ads में उसमेंadStatus: "ARCHIVED"दिखता है।- किसी दूसरी profile द्वारा boost किए गए ad पर
code: 400लौटाया जाता है। जिस ad का Ayrshare के पास कोई record नहीं है, उसे pause, archive या delete किया जा सकता है; उसेACTIVEपर सेट करने परcode: 400लौटाया जाता है। - अगर ad के campaign में Ayrshare के बाहर बने ads भी हैं, तो सिर्फ़ यही ad बदलता है। इसे
ACTIVEपर सेट करने के लिए campaign का Reddit Ads में active होना ज़रूरी है, अन्यथाcode: 369लौटाया जाता है। - अगर
ACTIVEमें बदलाव विफल हो जाता है और Reddit यह पुष्टि नहीं कर पाता कि ad फिर से रुक गया है, तो error में एकwarningहोती है कि ad live हो सकता है और खर्च कर रहा हो सकता है, और ad मेंadStatus: "ACTIVE"दिखता है। इसकी जाँच करें, और आवश्यकता होने पर इसे pause करें। - यदि आप Reddit की अनुमति से अधिक तेज़ी से requests भेजते हैं, तो HTTP 429 के साथ
code: 364लौटाया जाता है।
हैडर पैरामीटर
बॉडी पैरामीटर
curl -X PUT https://api.ayrshare.com/api/ads/reddit/ads \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-d '{
"adId": "2707300000000000001",
"status": "PAUSED"
}'
{
"status": "success",
"adId": "2707300000000000001",
"requestedStatus": "PAUSED"
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "Invalid status: STOPPED. Status must be one of ACTIVE, PAUSED, DELETED, ARCHIVED."
}
{
"action": "ads",
"status": "error",
"code": 369,
"message": "Unable to boost post. Please try again.",
"warning": "The status change failed, and reddit did not confirm that ad 2707300000000000001 is stopped. It may be live and spending. Check it on reddit or pause it."
}