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
Atualizar anúncio
Pause, retome, arquive ou exclua um anúncio do Reddit que você impulsionou pela 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."
}
Altere o status de um anúncio do Reddit que você criou com Impulsionar publicação. O anúncio e a campanha que a Ayrshare criou para ele mudam juntos.
DELETEDarquiva o anúncio no Reddit, igual aARCHIVED. Depois ele mostraadStatus: "ARCHIVED"em Anúncios impulsionados assim que a resposta em cache for atualizada (vejanextUpdate).- Um anúncio que outro perfil impulsionou retorna
code: 400. Um anúncio do qual a Ayrshare não tem registro pode ser pausado, arquivado ou excluído; defini-lo comoACTIVEretornacode: 400. - Se a campanha do anúncio também contiver anúncios criados fora da Ayrshare, somente este anúncio muda. Para defini-lo como
ACTIVE, a campanha precisa estar ativa no Reddit Ads; caso contrário, a resposta écode: 369. - Se uma mudança para
ACTIVEfalhar e o Reddit não conseguir confirmar que o anúncio foi parado novamente, o erro inclui umwarningde que o anúncio pode estar no ar e gerando gastos, e o anúncio mostraadStatus: "ACTIVE". Verifique-o e pause-o, se necessário. - Se você enviar solicitações mais rápido do que o Reddit permite, a resposta será
code: 364com HTTP 429.
Parâmetros de cabeçalho
Parâmetros do corpo
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."
}