# Enviar un correo suelto

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

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

Envía un correo fuera de la secuencia. Puede ser otra vez a alguien a quien una campaña ya le escribió (`recipient_id`), como la cotización que te pidió una semana después, o a un colega al que te remitió una respuesta (`reply_id` y `to`): alguien de la misma empresa que quien respondió, o una dirección que menciona su respuesta. Sale del buzón en el que va la conversación, con el mismo nombre. Sin `subject` va en el hilo del último correo; con uno, abre un hilo nuevo. Los archivos van en `attachments`. Es gratis, y cuenta para lo que los dominios del remitente pueden enviar hoy, junto con las campañas: pasado eso, falla con `daily_limit_reached`. No se le puede escribir a quien se dio de baja, rebotó o está en una lista de supresión, y alguien nuevo al que no te remitió ninguna respuesta va en una campaña: `POST /email/campaigns/{id}/recipients`. La misma solicitud dentro de 24 horas se toma como repetición: recibes la primera respuesta y no se envía nada dos veces.

- **Cobro:** La llamada es gratis, y los correos también: salen de los dominios de envío del remitente, que se pagan por mes; consulta [Dominios de envío](/es/docs/email#domains).

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) |
| --- | --- | --- | --- |
| `recipient_id` | string | no | Write again to this recipient, such as `rcp_9x7p1q8w3e5r4k2m`. They must have had an email of the campaign. |
| `reply_id` | string | no | Instead of `recipient_id`: write to someone this reply pointed to, such as `rpl_1q8w3e5r4k2m9x7p`. Needs `to`. |
| `to` | string | no | With `reply_id`: the colleague's email address. |
| `first_name` | string | no | With `reply_id`: the colleague's first name, for `{{first_name}}`. |
| `last_name` | string | no | With `reply_id`: the colleague's last name. |
| `subject` | string | no | The subject line of a new thread. Leave it out to write in the thread of the last email. |
| `text` | string | sí | The email, as plain text. Placeholders such as `{{first_name\|there}}` work as in a campaign. No signature block or unsubscribe line: every email ends with them. |
| `attachments` | object[] | no | Up to 3 files, 10 MB together: PDFs, pictures, office documents, CSV and text. Each needs `content` or `url`. |
| `attachments[].filename` | string | sí | The name the recipient sees, with its extension: `.pdf`, `.png`, `.jpg`, `.jpeg`, `.gif`, `.webp`, `.docx`, `.xlsx`, `.pptx`, `.doc`, `.xls`, `.ppt`, `.csv`, `.txt`. |
| `attachments[].content` | string | no | The file, base64-encoded. Up to about 3 MB this way; pass `url` for a larger file. |
| `attachments[].url` | string | no | Instead of `content`: a public `https://` address we fetch the file from while the email is sent. |

## Respuesta [#response]

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

| Campo | Tipo | Descripción (texto original de la API) |
| --- | --- | --- |
| `data` | object | The email, with who it went to. |
| `data.id` | string | Message ID, such as `msg_3e5r4k2m9x7p1q8w`. |
| `data.campaign_id` | string |  |
| `data.recipient_id` | string |  |
| `data.from` | string \| null | The address it went out from: a mailbox of the sender's domains. |
| `data.to` | string |  |
| `data.kind` | `step` \| `reply` \| `single` | `step` of the sequence, `reply` (your answer to a reply), or `single` (an email you sent on its own with `POST /email/messages`). |
| `data.step` | integer \| null | The step, counted from 1. Null for a reply or a single email. |
| `data.version` | integer | Which version of the step went out, counted from 1. |
| `data.status` | `sending` \| `sent` \| `bounced` \| `failed` \| `skipped` | `sent`, `bounced`, or `sending` for the seconds it takes. `failed` and `skipped` did not go out. |
| `data.subject` | string |  |
| `data.opens` | integer | Opens that look like a person's. Machines that fetch mail to scan it are left out. |
| `data.clicks` | integer |  |
| `data.bounce_type` | `hard` \| `soft` \| null |  |
| `data.attachments` | object[] | The files that went with it. |
| `data.attachments[].filename` | string |  |
| `data.attachments[].content_type` | string |  |
| `data.attachments[].size` | integer | In bytes. |
| `data.sent_at` | string \| null |  |
| `data.recipient` | object | Who it went to. A colleague a reply pointed to is added to the campaign, outside its sequence. |
| `data.recipient.id` | string | Recipient ID, such as `rcp_9x7p1q8w3e5r4k2m`. |
| `data.recipient.campaign_id` | string |  |
| `data.recipient.email` | string |  |
| `data.recipient.first_name` | string \| null |  |
| `data.recipient.last_name` | string \| null |  |
| `data.recipient.company` | string \| null |  |
| `data.recipient.country` | string \| null | ISO 3166-1 alpha-2, as given or as read off the address. |
| `data.recipient.contact_id` | string \| null | The person ID it was added by. |
| `data.recipient.status` | `verifying` \| `scheduled` \| `active` \| `replied` \| `completed` \| `bounced` \| `unsubscribed` \| `suppressed` \| `invalid` \| `stopped` | `verifying` while the address is checked, `scheduled` before the first email, `active` between emails. Final: `replied`, `completed` (every email sent, no answer), `bounced`, `unsubscribed`, `suppressed`, `invalid`, `stopped`. |
| `data.recipient.reason` | string \| null | Why, for `invalid`, `stopped`, `bounced` and `suppressed`. |
| `data.recipient.risky` | boolean | The address could not be confirmed: its domain accepts mail for any name. |
| `data.recipient.emails_sent` | integer |  |
| `data.recipient.next_send_at` | string \| null | When the next email is due at the earliest. |
| `data.recipient.last_sent_at` | string \| null |  |
| `data.recipient.metadata` | object | Your own keys and values, as you gave them. Empty when none were. |
| `data.recipient.created_at` | string | When it was added, as an ISO 8601 time in UTC. |
| `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 \
  -H "Authorization: Bearer $WON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "recipient_id": "rcp_9x7p1q8w3e5r4k2m",
  "text": "Hi Dana,\n\nAs promised, here is the quote for 40 chairs. It holds until the end of the month.\n\nAlex",
  "attachments": [
    {
      "filename": "quote-harborline.pdf",
      "url": "https://northwind-seating.example/q/2611.pdf"
    }
  ]
}'
```

```json
{
  "data": {
    "id": "msg_2k9x7p1q8w3e5r4m",
    "campaign_id": "cmp_7p1q8w3e5r4k2m9x",
    "recipient_id": "rcp_9x7p1q8w3e5r4k2m",
    "from": "alex@northwindseating.example",
    "to": "dana.whitfield@harborline-imports.example",
    "kind": "single",
    "step": null,
    "version": 1,
    "status": "sent",
    "subject": "Re: Office chairs for Harborline Imports",
    "opens": 0,
    "clicks": 0,
    "bounce_type": null,
    "attachments": [
      {
        "filename": "quote-harborline.pdf",
        "content_type": "application/pdf",
        "size": 96540
      }
    ],
    "sent_at": "2026-11-27T15:12:40.000Z",
    "recipient": {
      "id": "rcp_9x7p1q8w3e5r4k2m",
      "campaign_id": "cmp_7p1q8w3e5r4k2m9x",
      "email": "dana.whitfield@harborline-imports.example",
      "first_name": "Dana",
      "last_name": "Whitfield",
      "company": "Harborline Imports",
      "country": "US",
      "contact_id": null,
      "status": "active",
      "reason": null,
      "risky": false,
      "emails_sent": 1,
      "next_send_at": "2026-11-24T15:20:00.000Z",
      "last_sent_at": "2026-11-27T15:12:40.000Z",
      "metadata": {
        "crm_id": "lead_4471"
      },
      "created_at": "2026-11-18T14:03:10.000Z"
    }
  },
  "notice": null,
  "usage": {
    "cost": 0,
    "balance": 48.08,
    "replayed": false
  }
}
```