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"。- 由其他 Profile推广的广告会返回
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."
}