> ## 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 o elimina un anuncio de Snapchat que impulsaste con Ayrshare, incluido cuándo se reanuda su campaña y cómo revisarlo tras un cambio fallido.

Pausa, reanuda o elimina un anuncio de Snapchat que creaste con [Impulsar publicación](https://www.ayrshare.com/docs/apis/ads/snapchat/boost-post.md).

<ul>
  <li>`paused` detiene el anuncio y su gasto. `deleted` elimina el anuncio en Snapchat.</li>
  <li>`active` reanuda el anuncio. Si la campaña del anuncio está en pausa y solo contiene este anuncio, la campaña también se reanuda.</li>
  <li>Un anuncio solo se ejecuta mientras su ad squad y su campaña están activos. Si el ad squad se pausó en Snapchat, o la campaña está en pausa y contiene otros anuncios, `active` devuelve `code: 369`. Reanúdalos primero en Snapchat Ads Manager.</li>
  <li>Snapchat no tiene estado archivado, por lo que `archived` devuelve `code: 101`.</li>
  <li>Un anuncio del que Ayrshare no tiene registro se puede pausar o eliminar, pero no establecer en `active`. Esa solicitud devuelve `code: 400`. Contacta con soporte indicando el ID del anuncio.</li>
  <li>Si `active` falla y Snapchat no puede confirmar que el anuncio vuelve a estar detenido, el error incluye un `warning`: el anuncio podría estar activo y generando gasto. Revísalo en Snapchat Ads Manager o envía `paused` de nuevo.</li>
  <li>Un `paused` o `deleted` fallido no tiene `warning`, pero el anuncio podría seguir ejecutándose. Revísalo en [Anuncios impulsados](https://www.ayrshare.com/docs/apis/ads/snapchat/get-boosted-ads.md) o en Snapchat Ads Manager, y vuelve a enviar el cambio.</li>
  <li>Para ver el estado actual de un anuncio, usa [Anuncios impulsados](https://www.ayrshare.com/docs/apis/ads/snapchat/get-boosted-ads.md).</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 Snapchat, el `id` que devolvió [Impulsar publicación](https://www.ayrshare.com/docs/apis/ads/snapchat/boost-post.md).

**status** `string` *required*

El nuevo estado: `active`, `paused` o `deleted`. No distingue mayúsculas de minúsculas.

```bash cURL theme={"system"}
curl \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-X PUT https://api.ayrshare.com/api/ads/snapchat/ads \
-d '{"adId": "c3a1e2d4-0000-4000-8000-0000000000ad", "status": "paused"}'
```

```json 200: Success theme={"system"}
{
  "status": "success",
  "adId": "c3a1e2d4-0000-4000-8000-0000000000ad",
  "requestedStatus": "PAUSED"
}
```

```json 400: Archived 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": "Status ARCHIVED is not supported on snapchat. Supported: ACTIVE, PAUSED, DELETED."
}
```

```json 400: Ad squad paused theme={"system"}
{
  "action": "ads",
  "status": "error",
  "code": 369,
  "message": "Unable to boost post. Please try again.",
  "details": "Snapchat ad squad e5f6a7b8-0000-4000-8000-0000000000sq is PAUSED. Resume the ad squad in Snapchat to run this ad."
}
```


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