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
Actualizar anuncio
Pausa, reanuda, archiva o elimina un anuncio de Reddit que impulsaste a través de 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."
}
Cambia el estado de un anuncio de Reddit que creaste con Impulsar publicación. El anuncio y la campaña que Ayrshare creó para él cambian juntos.
DELETEDarchiva el anuncio en Reddit, igual queARCHIVED. Después muestraadStatus: "ARCHIVED"en Anuncios impulsados cuando se actualiza su respuesta en caché (consultanextUpdate).- Un anuncio que impulsó otro perfil responde con
code: 400. Un anuncio del que Ayrshare no tiene registro se puede pausar, archivar o eliminar; cambiarlo aACTIVEresponde concode: 400. - Si la campaña del anuncio también contiene anuncios creados fuera de Ayrshare, solo cambia este anuncio. Para cambiarlo a
ACTIVE, la campaña debe estar activa en Reddit Ads; de lo contrario, la respuesta escode: 369. - Si un cambio a
ACTIVEfalla y Reddit no puede confirmar que el anuncio vuelve a estar detenido, el error incluye unwarningque advierte que el anuncio podría estar activo y generando gasto, y el anuncio muestraadStatus: "ACTIVE". Revísalo y, si es necesario, ponlo en pausa. - Si envías solicitudes más rápido de lo que Reddit permite, la respuesta es
code: 364con HTTP 429.
Parámetros del encabezado
Parámetros del cuerpo
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."
}