Answer a reply
Answer a reply in the same thread, from the same mailbox, with files if needed. $0.03 when it goes out.
POST https://api.won.dev/v1/email/replies/{id}/reply
Sends your answer to a reply, in the same thread and from the same mailbox the conversation runs in, so the person sees one conversation with one sender. Their email is quoted underneath. Write as that sender would: plain text, no placeholders. Files such as a price list or a catalogue go in attachments. The text is checked as a campaign's texts are. Costs $0.03 when it goes out; nothing when it cannot be handed over. Someone who unsubscribed or bounced cannot be answered. The same request to the same reply within 24 hours is taken as a repeat: you get the first answer back and nothing is sent twice.
- Billing:
email_sent$0.03: one email handed to the mail server.
Parameters
id is part of the path. The others go in the JSON body. POST requests also take an Idempotency-Key header, see Sending a request twice.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Reply ID, such as rpl_1q8w3e5r4k2m9x7p. |
text | string | yes | Your answer, as plain text. |
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 | yes | 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. |
max_cost | number | no | Spending cap for this call in US dollars. If the call could cost more, it fails with budget_exceeded before anything is charged. |
dry_run | boolean | no | If true, only return the maximum cost of this call. Nothing runs, nothing is charged. Default: false. |
Response
With dry_run: true nothing is sent and data holds only the most the call can cost, see Dry runs. Errors are described in Errors.
| Field | Type | Description |
|---|---|---|
data | object | |
data.id | string | Message ID, such as msg_3e5r4k2m9x7p1q8w. |
data.campaign_id | string | |
data.recipient_id | string | |
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 and cost nothing. |
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.cost | number | What it cost, in US dollars. 0 after a refund. |
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 | What this call was charged, and the balance left. |
usage.unit | email_sent | email_sent_dedicated | email_capacity | email_dedicated_domain | What is counted. |
usage.records | integer | How many were returned and charged. |
usage.already_paid | integer | How many more were returned for free, because this organization paid for them in the last 30 days. |
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. |
Example
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"
}
]
}'{
"data": {
"id": "msg_9x7p1q8w3e5r4k2m",
"campaign_id": "cmp_7p1q8w3e5r4k2m9x",
"recipient_id": "rcp_9x7p1q8w3e5r4k2m",
"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,
"cost": 0.03,
"attachments": [
{
"filename": "price-list.pdf",
"content_type": "application/pdf",
"size": 182344
}
],
"sent_at": "2026-11-20T14:02:19.000Z"
},
"notice": null,
"usage": {
"unit": "email_sent",
"records": 1,
"already_paid": 0,
"cost": 0.03,
"balance": 48.05,
"replayed": false
}
}A test key (won_test_...) runs this in the sandbox: nothing is sent and nothing is charged.