# Cambiar conversaciones

Source: https://won.dev/es/docs/email/conversations-update-many

`PATCH https://api.won.dev/v1/conversations`

Marca hasta 50 conversaciones de una vez, como `PATCH /conversations/{id}` marca una: leídas o no leídas, resueltas o de vuelta en la bandeja de entrada. Cada ID tiene su propio resultado, en el orden dado: `updated` es false para un ID con el que la clave no tiene ninguna conversación y para una conversación en la que nadie contestó todavía, que no está en ninguna carpeta; las demás cambian igual. 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 `PATCH` 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) |
| --- | --- | --- | --- |
| `ids` | string[] | sí | Up to 50 conversation IDs. |
| `read` | boolean | no | `true` marks it read, `false` unread. |
| `done` | boolean | no | `true` files it under `done` and marks it read. `false` moves it back to the inbox, where it stays until it is answered or marked done again. |

## Respuesta [#response]

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

| Campo | Tipo | Descripción (texto original de la API) |
| --- | --- | --- |
| `data` | object[] | A result for each ID, in the order given. |
| `data[].id` | string | The ID as it was given. |
| `data[].updated` | boolean | Whether it was changed. False when the key has no conversation with it, or nobody wrote back in it yet. |
| `data[].conversation` | object \| null | The conversation as it is now. Null when it was not found. |
| `data[].conversation.id` | string | Conversation ID, such as `cnv_9x7p1q8w3e5r4k2m`. |
| `data[].conversation.channel` | `email` | Where it runs: `email` for now. What only a channel has is in the object of its name. |
| `data[].conversation.folder` | `inbox` \| `low` \| `done` \| null | `inbox` while its last reply waits for an answer, `low` when that reply needs nobody (an automatic answer, a no, an unsubscribe), `done` once it is answered or marked done. A reply that comes later takes it out of `done` again. Null while they have not written back: the folders hold the ones who did. |
| `data[].conversation.unread` | boolean | A reply came after it was last read. |
| `data[].conversation.answered` | boolean | The last word is yours: an answer or a single email went out after the last reply. False while they have not written back. |
| `data[].conversation.name` | string \| null | The person's name, when it is known. |
| `data[].conversation.company` | string \| null |  |
| `data[].conversation.country` | string \| null | ISO 3166-1 alpha-2. |
| `data[].conversation.campaign` | object | The campaign that wrote to them. |
| `data[].conversation.campaign.id` | string |  |
| `data[].conversation.campaign.name` | string |  |
| `data[].conversation.replies` | integer | Replies in it, automatic ones included. |
| `data[].conversation.last_reply` | object \| null | The reply it is about, which an answer goes to: the last one a person wrote, else the last automatic one. Null while they have not written back. |
| `data[].conversation.last_reply.id` | string | Reply ID, such as `rpl_1q8w3e5r4k2m9x7p`. |
| `data[].conversation.last_reply.intent` | `interested` \| `question` \| `not_interested` \| `wrong_person` \| `unsubscribe` \| `out_of_office` \| `other` | What it means. |
| `data[].conversation.last_reply.automated` | boolean | An automatic answer, such as an out-of-office note. |
| `data[].conversation.last_reply.text` | string | The start of its text, up to 300 characters. |
| `data[].conversation.last_reply.has_attachments` | boolean |  |
| `data[].conversation.last_reply.received_at` | string | When it arrived, as an ISO 8601 time in UTC. |
| `data[].conversation.activity_at` | string | The last reply, or the last answer when that is later; before a reply, the last email that went out, as an ISO 8601 time in UTC. |
| `data[].conversation.email` | object \| null | With `channel` `email`: what is particular to email. Null in other channels. |
| `data[].conversation.email.recipient_id` | string | The recipient, such as `rcp_9x7p1q8w3e5r4k2m`, to write to again with `POST /email/messages`. |
| `data[].conversation.email.address` | string | The address the campaign wrote to. |
| `data[].conversation.email.status` | `verifying` \| `scheduled` \| `active` \| `replied` \| `completed` \| `bounced` \| `unsubscribed` \| `suppressed` \| `invalid` \| `stopped` | Where their sequence stands, as a recipient's `status`: someone `unsubscribed`, `bounced`, `suppressed` or `invalid` cannot be written to. |
| `data[].conversation.email.reply_from` | string \| null | The address the last reply came from: another one when a colleague answered. Null while they have not written back. |
| `data[].conversation.email.subject` | string \| null | The subject of the last reply. Null while they have not written back. |
| `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 -X PATCH https://api.won.dev/v1/conversations \
  -H "Authorization: Bearer $WON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "ids": [
    "cnv_9x7p1q8w3e5r4k2m",
    "cnv_5r4k2m9x7p1q8w3e"
  ],
  "done": true
}'
```

```json
{
  "data": [
    {
      "id": "cnv_9x7p1q8w3e5r4k2m",
      "updated": true,
      "conversation": {
        "id": "cnv_9x7p1q8w3e5r4k2m",
        "channel": "email",
        "folder": "done",
        "unread": false,
        "answered": false,
        "name": "Dana Whitfield",
        "company": "Harborline Imports",
        "country": "US",
        "campaign": {
          "id": "cmp_7p1q8w3e5r4k2m9x",
          "name": "US chair importers, November"
        },
        "replies": 1,
        "last_reply": {
          "id": "rpl_1q8w3e5r4k2m9x7p",
          "intent": "interested",
          "automated": false,
          "text": "Hi, yes, please send the price list. We are reviewing suppliers for next quarter.",
          "has_attachments": false,
          "received_at": "2026-11-20T13:41:02.000Z"
        },
        "activity_at": "2026-11-20T13:41:02.000Z",
        "email": {
          "recipient_id": "rcp_9x7p1q8w3e5r4k2m",
          "address": "dana.whitfield@harborline-imports.example",
          "status": "replied",
          "reply_from": "dana.whitfield@harborline-imports.example",
          "subject": "Re: Office chairs for Harborline Imports"
        }
      }
    },
    {
      "id": "cnv_5r4k2m9x7p1q8w3e",
      "updated": false,
      "conversation": null
    }
  ],
  "notice": "This key has no conversation with the ID `cnv_5r4k2m9x7p1q8w3e`. Conversation IDs come from `GET /conversations`, and every recipient, reply and email names its own in `conversation_id`. A test key only sees the conversations of campaigns made with a test key.",
  "usage": {
    "cost": 0,
    "balance": 48.08,
    "replayed": false
  }
}
```