# Rechazar correos

Source: https://won.dev/es/docs/email/messages-decline

`POST https://api.won.dev/v1/email/messages/decline`

Rechaza correos que esperan aprobación, o que fueron aprobados y aún no salieron: nunca salen (`skipped`), y sus destinatarios no reciben nada más de la campaña (`stopped`, motivo `declined`). Para enviar otra cosa en su lugar, cambia el correo con `PATCH /email/messages/{id}`. Una clave configurada para pedir aprobación no puede rechazar (`forbidden`). Gratis.

- **Cobro:** Gratis.

Una clave de prueba (`won_test_...`) ejecuta esto en el [sandbox](/es/docs/email#sandbox): no se envía ni se cobra nada.

## Parámetros [#parameters]

Los parámetros van en el cuerpo JSON. Las solicitudes `POST` también aceptan el encabezado `Idempotency-Key`; consulta [Enviar una solicitud dos veces](/es/docs/email#idempotency).

| Parámetro | Tipo | Obligatorio | Descripción (texto original de la API) |
| --- | --- | --- | --- |
| `message_ids` | string[] | sí | Up to 100 email IDs, such as `msg_3e5r4k2m9x7p1q8w`, from `GET /email/messages?status=pending_approval`. |

## Respuesta [#response]

Los errores se describen en [Errores](/es/docs/errors).

| Campo | Tipo | Descripción (texto original de la API) |
| --- | --- | --- |
| `data` | object[] | One result per ID, in the order given. |
| `data[].id` | string |  |
| `data[].done` | boolean | Whether this call changed it. |
| `data[].status` | `pending_approval` \| `approved` \| `sending` \| `sent` \| `bounced` \| `failed` \| `skipped` \| null | Its status now. Null for an ID this account has no email with, or one of the other kind of key. |
| `notice` | string \| null | A plain sentence when there is something to know about this answer. Null otherwise. |
| `usage` | object | Nothing is charged here. The balance, for reference. |
| `usage.cost` | number | What this call cost, in US dollars. |
| `usage.balance` | number | The balance left after this call, in US dollars. |
| `usage.replayed` | boolean | True when this is a repeat of a request from the last 24 hours. Repeats are free. |

## Ejemplo [#example]

```bash
curl https://api.won.dev/v1/email/messages/decline \
  -H "Authorization: Bearer $WON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "message_ids": [
    "msg_3e5r4k2m9x7p1q8w"
  ]
}'
```

```json
{
  "data": [
    {
      "id": "msg_3e5r4k2m9x7p1q8w",
      "done": true,
      "status": "skipped"
    }
  ],
  "notice": null,
  "usage": {
    "cost": 0,
    "balance": 48.08,
    "replayed": false
  }
}
```