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
Cập nhật Quảng cáo
Tạm dừng, tiếp tục, lưu trữ hoặc xóa một quảng cáo Reddit bạn đã boost qua Ayrshare.
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."
}
Thay đổi trạng thái của một quảng cáo Reddit bạn đã tạo bằng Boost Bài đăng. Quảng cáo và chiến dịch mà Ayrshare tạo cho nó thay đổi cùng nhau.
DELETEDlưu trữ quảng cáo trên Reddit, giống nhưARCHIVED. Sau đó quảng cáo hiển thịadStatus: "ARCHIVED"trong Quảng cáo đã Boost khi phản hồi được lưu đệm của nó được làm mới (xemnextUpdate).- Một quảng cáo do hồ sơ khác boost sẽ trả về
code: 400. Một quảng cáo mà Ayrshare không có bản ghi vẫn có thể được tạm dừng, lưu trữ hoặc xóa; đặt nó thànhACTIVEsẽ trả vềcode: 400. - Nếu chiến dịch của quảng cáo cũng chứa các quảng cáo được tạo bên ngoài Ayrshare, chỉ quảng cáo này thay đổi. Để đặt nó thành
ACTIVE, chiến dịch phải đang hoạt động trong Reddit Ads, nếu không phản hồi làcode: 369. - Nếu thay đổi sang
ACTIVEkhông thành công và Reddit không thể xác nhận quảng cáo đã dừng lại, lỗi sẽ kèm mộtwarningrằng quảng cáo có thể đang chạy và chi tiêu, và quảng cáo hiển thịadStatus: "ACTIVE". Hãy kiểm tra quảng cáo và tạm dừng nếu cần. - Nếu bạn gửi yêu cầu nhanh hơn mức Reddit cho phép, phản hồi sẽ là
code: 364với HTTP 429.
Tham số Header
Tham số Body
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."
}