Skip to Content
Won.dev

Send a single email

Write one email outside the sequence, with files if needed. $0.03 when it goes out.

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

Sends one email outside the sequence. Either again to someone a campaign has written to (recipient_id), such as the quote they asked for a week later, or to a colleague a reply pointed you to (reply_id and to): someone at the same company as the person who replied, or an address their reply names. It leaves from the mailbox the conversation runs in, under the same name. Without subject it goes in the thread of the last email; with one it starts a new thread. Files go in attachments. Costs $0.03 when it goes out; nothing when it cannot be handed over. It counts toward the account's emails for the day, together with the campaigns. People who unsubscribed, bounced or are on a suppression list cannot be written to, and someone new who no reply pointed to belongs in a campaign: POST /email/campaigns/{id}/recipients. The same request 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

Parameters go in the JSON body. POST requests also take an Idempotency-Key header, see Sending a request twice.

ParameterTypeRequiredDescription
recipient_idstringnoWrite again to this recipient, such as rcp_9x7p1q8w3e5r4k2m. They must have had an email of the campaign.
reply_idstringnoInstead of recipient_id: write to someone this reply pointed to, such as rpl_1q8w3e5r4k2m9x7p. Needs to.
tostringnoWith reply_id: the colleague's email address.
first_namestringnoWith reply_id: the colleague's first name, for {{first_name}}.
last_namestringnoWith reply_id: the colleague's last name.
subjectstringnoThe subject line of a new thread. Leave it out to write in the thread of the last email.
textstringyesThe 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.
attachmentsobject[]noUp to 3 files, 10 MB together: PDFs, pictures, office documents, CSV and text. Each needs content or url.
attachments[].filenamestringyesThe name the recipient sees, with its extension: .pdf, .png, .jpg, .jpeg, .gif, .webp, .docx, .xlsx, .pptx, .doc, .xls, .ppt, .csv, .txt.
attachments[].contentstringnoThe file, base64-encoded. Up to about 3 MB this way; pass url for a larger file.
attachments[].urlstringnoInstead of content: a public https:// address we fetch the file from while the email is sent.
max_costnumbernoSpending cap for this call in US dollars. If the call could cost more, it fails with budget_exceeded before anything is charged.
dry_runbooleannoIf 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.

FieldTypeDescription
dataobjectThe email, with who it went to.
data.idstringMessage ID, such as msg_3e5r4k2m9x7p1q8w.
data.campaign_idstring
data.recipient_idstring
data.tostring
data.kindstep | reply | singlestep of the sequence, reply (your answer to a reply), or single (an email you sent on its own with POST /email/messages).
data.stepinteger | nullThe step, counted from 1. Null for a reply or a single email.
data.versionintegerWhich version of the step went out, counted from 1.
data.statussending | sent | bounced | failed | skippedsent, bounced, or sending for the seconds it takes. failed and skipped did not go out and cost nothing.
data.subjectstring
data.opensintegerOpens that look like a person's. Machines that fetch mail to scan it are left out.
data.clicksinteger
data.bounce_typehard | soft | null
data.costnumberWhat it cost, in US dollars. 0 after a refund.
data.attachmentsobject[]The files that went with it.
data.attachments[].filenamestring
data.attachments[].content_typestring
data.attachments[].sizeintegerIn bytes.
data.sent_atstring | null
data.recipientobjectWho it went to. A colleague a reply pointed to is added to the campaign, outside its sequence.
data.recipient.idstringRecipient ID, such as rcp_9x7p1q8w3e5r4k2m.
data.recipient.campaign_idstring
data.recipient.emailstring
data.recipient.first_namestring | null
data.recipient.last_namestring | null
data.recipient.companystring | null
data.recipient.countrystring | nullISO 3166-1 alpha-2, as given or as read off the address.
data.recipient.contact_idstring | nullThe person ID it was added by.
data.recipient.statusverifying | scheduled | active | replied | completed | bounced | unsubscribed | suppressed | invalid | stoppedverifying 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.reasonstring | nullWhy, for invalid, stopped, bounced and suppressed.
data.recipient.riskybooleanThe address could not be confirmed: its domain accepts mail for any name.
data.recipient.emails_sentinteger
data.recipient.next_send_atstring | nullWhen the next email is due at the earliest.
data.recipient.last_sent_atstring | null
data.recipient.metadataobjectYour own keys and values, as you gave them. Empty when none were.
data.recipient.created_atstringWhen it was added, as an ISO 8601 time in UTC.
noticestring | nullA plain sentence when there is something to know about this answer. Null otherwise.
usageobjectWhat this call was charged, and the balance left.
usage.unitemail_sent | email_sent_dedicated | email_capacity | email_dedicated_domainWhat is counted.
usage.recordsintegerHow many were returned and charged.
usage.already_paidintegerHow many more were returned for free, because this organization paid for them in the last 30 days.
usage.costnumberWhat this call cost, in US dollars.
usage.balancenumberThe balance left after this call, in US dollars.
usage.replayedbooleanTrue when this is a repeat of a request from the last 24 hours. Repeats are free.

Example

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"
    }
  ]
}'
{
  "data": {
    "id": "msg_2k9x7p1q8w3e5r4m",
    "campaign_id": "cmp_7p1q8w3e5r4k2m9x",
    "recipient_id": "rcp_9x7p1q8w3e5r4k2m",
    "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,
    "cost": 0.03,
    "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": {
    "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.

On this page