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
Update Ad
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は、ARCHIVEDと同じくReddit上で広告をアーカイブします。キャッシュされた結果が更新されると(nextUpdateを参照)、ブーストされた広告ではadStatus: "ARCHIVED"と表示されます。- 別のプロフィールがブーストした広告には
code: 400が返されます。Ayrshareに記録のない広告は、一時停止、アーカイブ、削除はできますが、ACTIVEに設定するとcode: 400が返されます。 - 広告のキャンペーンにAyrshare以外で作成された広告も含まれている場合、変更されるのはこの広告のみです。
ACTIVEに設定するには、Reddit Adsでキャンペーンが有効になっている必要があります。そうでない場合はcode: 369が返されます。 ACTIVEへの変更が失敗し、Redditが広告の再停止を確認できない場合、エラーにwarningが含まれ、広告が配信中で費用が発生している可能性があることを警告します。広告はadStatus: "ACTIVE"と表示されます。広告を確認し、必要に応じて一時停止してください。- Redditが許可する頻度を超えてリクエストを送信すると、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."
}