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 推廣的 Reddit 廣告。
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."
}
變更您透過推廣貼文建立的 Reddit 廣告的狀態。該廣告和 Ayrshare 為其建立的活動會一起變更。
DELETED會在 Reddit 上封存該廣告,效果與ARCHIVED相同。待其快取結果更新後(請參閱nextUpdate),該廣告在已推廣廣告中會顯示為adStatus: "ARCHIVED"。- 由其他個人檔案推廣的廣告會返回
code: 400。Ayrshare 沒有記錄的廣告可以暫停、封存或刪除;將其設為ACTIVE會返回code: 400。 - 如果該廣告的活動中也包含在 Ayrshare 以外建立的廣告,則只有此廣告會變更。若要將其設為
ACTIVE,該活動必須在 Reddit Ads 中處於啟用狀態,否則將返回code: 369。 - 如果變更為
ACTIVE失敗,且 Reddit 無法確認廣告已重新停止,錯誤中會包含warning,提示該廣告可能正在投放並產生花費,廣告會顯示adStatus: "ACTIVE"。請檢查該廣告,必要時將其暫停。 - 如果您發送請求的速度超過 Reddit 允許的頻率,將返回
code: 364及 HTTP 429。
請求頭參數
請求體參數
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."
}