# Responder a uma resposta

Source: https://won.dev/pt-BR/docs/email/replies-reply

`POST https://api.won.dev/v1/email/replies/{id}/reply`

Envia o seu retorno a uma resposta, na mesma conversa e da mesma caixa em que a conversa acontece, então a pessoa vê uma única conversa com um único remetente. O e-mail dela vai citado embaixo. Escreva como aquele remetente escreveria: texto simples, sem marcadores. Arquivos como uma tabela de preços ou um catálogo vão em `attachments`. O texto é conferido como os textos de uma campanha. É grátis, e não conta para os e-mails do dia: responder a uma resposta nunca é segurado. Não dá para responder a quem se descadastrou ou deu bounce. A mesma requisição para a mesma resposta em até 24 horas é tratada como repetição: você recebe a primeira resposta de volta e nada é enviado duas vezes.

- **Cobrança:** A chamada é grátis, e os e-mails também: eles saem dos domínios de envio do remetente, pagos por mês; veja [Domínios de envio](/pt-BR/docs/email#domains).

Uma chave de teste (`won_test_...`) roda isto no [sandbox](/pt-BR/docs/email#sandbox): nada é enviado e nada é cobrado.

## Parâmetros [#parameters]

`id` faz parte do caminho. Os demais vão no corpo JSON. Requisições `POST` também aceitam o cabeçalho `Idempotency-Key`; veja [Enviar uma requisição duas vezes](/pt-BR/docs/email#idempotency).

| Parâmetro | Tipo | Obrigatório | Descrição (texto original da API) |
| --- | --- | --- | --- |
| `id` | string | sim | Reply ID, such as `rpl_1q8w3e5r4k2m9x7p`. |
| `text` | string | sim | Your answer, as plain text. |
| `attachments` | object[] | não | Up to 3 files, 10 MB together: PDFs, pictures, office documents, CSV and text. Each needs `content` or `url`. |
| `attachments[].filename` | string | sim | 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 | não | The file, base64-encoded. Up to about 3 MB this way; pass `url` for a larger file. |
| `attachments[].url` | string | não | Instead of `content`: a public `https://` address we fetch the file from while the email is sent. |

## Resposta [#response]

Os erros estão descritos em [Erros](/pt-BR/docs/errors).

| Campo | Tipo | Descrição (texto original da API) |
| --- | --- | --- |
| `data` | object |  |
| `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 |  |
| `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. |

## Exemplo [#example]

```bash
curl https://api.won.dev/v1/email/replies/rpl_1q8w3e5r4k2m9x7p/reply \
  -H "Authorization: Bearer $WON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "Hi Dana,\n\nThanks. The price list is attached. Shall I send two samples?\n\nAlex",
  "attachments": [
    {
      "filename": "price-list.pdf",
      "url": "https://northwind-seating.example/price-list.pdf"
    }
  ]
}'
```

```json
{
  "data": {
    "id": "msg_9x7p1q8w3e5r4k2m",
    "campaign_id": "cmp_7p1q8w3e5r4k2m9x",
    "recipient_id": "rcp_9x7p1q8w3e5r4k2m",
    "from": "alex@northwindseating.example",
    "to": "dana.whitfield@harborline-imports.example",
    "kind": "reply",
    "step": null,
    "version": 1,
    "status": "sent",
    "subject": "Re: Office chairs for Harborline Imports",
    "opens": 0,
    "clicks": 0,
    "bounce_type": null,
    "attachments": [
      {
        "filename": "price-list.pdf",
        "content_type": "application/pdf",
        "size": 182344
      }
    ],
    "sent_at": "2026-11-20T14:02:19.000Z"
  },
  "notice": null,
  "usage": {
    "cost": 0,
    "balance": 48.08,
    "replayed": false
  }
}
```