> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Actualizar anuncio

> Pausa, reanuda, archiva o elimina un anuncio de Reddit que impulsaste a través de Ayrshare.

Cambia el estado de un anuncio de Reddit que creaste con [Impulsar publicación](https://www.ayrshare.com/docs/apis/ads/reddit/boost-post.md). El anuncio y la campaña que Ayrshare creó para él cambian juntos.

<ul>
  <li>`DELETED` archiva el anuncio en Reddit, igual que `ARCHIVED`. Después muestra `adStatus: "ARCHIVED"` en [Anuncios impulsados](https://www.ayrshare.com/docs/apis/ads/reddit/get-boosted-ads.md) cuando se actualiza su respuesta en caché (consulta `nextUpdate`).</li>
  <li>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 a `ACTIVE` responde con `code: 400`.</li>
  <li>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 es `code: 369`.</li>
  <li>Si un cambio a `ACTIVE` falla y Reddit no puede confirmar que el anuncio vuelve a estar detenido, el error incluye un `warning` que advierte que el anuncio podría estar activo y generando gasto, y el anuncio muestra `adStatus: "ACTIVE"`. Revísalo y, si es necesario, ponlo en pausa.</li>
  <li>Si envías solicitudes más rápido de lo que Reddit permite, la respuesta es `code: 364` con HTTP 429.</li>
</ul>

## Parámetros del encabezado

**Authorization** `string` *required*

[API Key](https://www.ayrshare.com/docs/apis/overview.md#authorization) of the Primary Profile.

Format: `Authorization: Bearer API_KEY`
**Profile-Key** `string`

[Profile Key](https://www.ayrshare.com/docs/apis/overview.md#profile-key-format) of a User Profile.

Format: `Profile-Key: PROFILE_KEY`

## Parámetros del cuerpo

**adId** `string` *required*

El ID del anuncio de Reddit, por ejemplo `2707300000000000001`.

**status** `string` *required*

`ACTIVE`, `PAUSED`, `ARCHIVED` o `DELETED`. En mayúsculas o minúsculas.

```bash cURL theme={"system"}
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"
  }'
```

```json 200: Success theme={"system"}
{
  "status": "success",
  "adId": "2707300000000000001",
  "requestedStatus": "PAUSED"
}
```

```json 400: Invalid status theme={"system"}
{
  "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."
}
```

```json 400: Resume failed, ad may be live theme={"system"}
{
  "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."
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.