# Find buyers abroad and email them

Source: https://won.dev/docs/tutorials/find-buyers-and-email-them

This tutorial takes one product, finds 10 companies in the United States that import it, finds a buyer at each one with a verified work email, and sends them a two-email sequence from a sending domain of your own. Then it reads who answered. The same calls work for any product and any country with customs records: see [Country coverage](/docs/trade/countries).

**Before you start.** Run it once with a test key (`won_test_...`): every step works on sample data, cold email runs in a sandbox that sends nothing, and nothing is charged. With a live key, the data costs at most $0.40 and the sending domain about $28.80 for its first period. The domain is the main cost, and it then sends for every campaign of the sender, 45 emails a day. See [what the run costs](#cost).

## 1. Find the HS code [#hs-code]

Customs records file goods by HS code. Look the code up from the name of the product. Free.

```bash
curl "https://api.won.dev/v1/trade/hs-codes?q=sofa&limit=1" \
  -H "Authorization: Bearer $WON_API_KEY"
```

```json
{
  "data": [
    {
      "code": "940161",
      "description": "Seats (other than those of heading 9402), whether or not convertible into beds, and parts thereof > Other seats, with wooden frames > Upholstered",
      "parent": "9401"
    }
  ],
  "query": { "q": "sofa", "limit": 1 },
  "notice": null,
  "usage": { "cost": 0, "balance": 48.6, "replayed": false }
}
```

Pick the code whose description matches what you sell. A six-digit code is the same in every country. See [Find HS codes](/docs/trade/hs-codes-search).

## 2. See what the leads will cost [#dry-run]

`POST /trade/leads/find` ranks the importers of the code and finds a person to write to at each, in one call. Ask what 10 leads can cost before you run it:

```bash
curl https://api.won.dev/v1/trade/leads/find \
  -H "Authorization: Bearer $WON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "role": "importer",
  "hs_code": "940161",
  "importer_country": "US",
  "require": "person_email",
  "limit": 10,
  "dry_run": true
}'
```

The answer, cut to `data`:

```json
{
  "data": {
    "dry_run": true,
    "max_cost": 0.4,
    "breakdown": [
      { "unit": "trade_company", "max_records": 10, "unit_price": 0.01, "max_cost": 0.1 },
      { "unit": "person_email", "max_records": 10, "unit_price": 0.03, "max_cost": 0.3 }
    ]
  }
}
```

At most $0.40: $0.01 for each company and $0.03 for each contact. `require: "person_email"` keeps only companies where a person with a verified email was found, so every lead can go into a campaign.

## 3. Find the leads [#leads]

Send the same request without `dry_run`. Add `max_cost` so the call can never cost more than the preview said:

```bash
curl https://api.won.dev/v1/trade/leads/find \
  -H "Authorization: Bearer $WON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "role": "importer",
  "hs_code": "940161",
  "importer_country": "US",
  "require": "person_email",
  "limit": 10,
  "max_cost": 0.4
}'
```

The answer, cut to the first lead:

```json
{
  "data": [
    {
      "company": {
        "id": "co_8f3k2m9x4p1q",
        "name": "SAMPLE NORTHFIELD HOME FURNISHINGS INC",
        "country": "US",
        "shipments": 1840,
        "recorded_value_usd": 21480350.4,
        "website": "northfield-home.example"
      },
      "contacts": [
        {
          "id": "per_4m7q2x9k1c8d",
          "name": "Jordan Lee",
          "title": "Director of Global Sourcing",
          "seniority": "executive",
          "department": "purchasing",
          "email_status": "verified",
          "linkedin_url": "https://www.linkedin.com/in/sample-jordan-lee",
          "email": "jordan.lee@northfield-home.example"
        }
      ],
      "channels": null
    }
  ]
}
```

Keep each contact's `per_` ID: the campaign takes it as `contact_id`, with the name, company and country on file. A call looks at up to five times `limit` companies; `next_cursor` goes on from there, and `POST /tasks` finds up to 500 leads in the background. See [Find leads](/docs/trade/leads-find).

## 4. Register the sender [#sender]

A sender is the company the emails are for. Its name and postal address end every email, as the law asks. Register it once; every campaign of that company names it. Free.

```bash
curl https://api.won.dev/v1/email/senders \
  -H "Authorization: Bearer $WON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "company_name": "Northwind Seating Ltd",
  "address": "18 Harbour Road, Leeds LS1 4AP, United Kingdom",
  "website": "https://northwind-seating.example",
  "purpose": "We make upholstered sofas and write to furniture importers about our new range."
}'
```

The answer's `data.id`, such as `snd_4k2m9x7p1q8w3e5r`, is the `sender_id` of the next steps. To write to people in the EU, the UK or Canada, also declare your lawful basis there in `regions`. See [Register a sender](/docs/email/senders-create).

## 5. Get a sending domain [#domain]

The emails go out from a domain of the sender's own, with 3 mailboxes that were warmed up for weeks before you buy it. There is no DNS to set up. Ask for a quote first, without `confirm`:

```bash
curl https://api.won.dev/v1/email/domains \
  -H "Authorization: Bearer $WON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "sender_id": "snd_4k2m9x7p1q8w3e5r", "count": 1 }'
```

The quote gives `price` for the days up to the renewal date, `price_per_month` and how many are `in_stock`. Send it again with `"confirm": true` and `"max_cost"` set to the price to buy it. The domain is ready within minutes, which `GET /email/domains` and the `domain.ready` event tell you. It sends 15 emails on its first day and 45 a day after 5 days, more than this campaign needs. See [Sending domains](/docs/email#domains).

## 6. Preview the campaign [#preview]

Write the sequence and add the people by `contact_id`. A dry run checks the list and the texts and shows the first emails, and creates nothing:

```bash
curl https://api.won.dev/v1/email/campaigns \
  -H "Authorization: Bearer $WON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "sender_id": "snd_4k2m9x7p1q8w3e5r",
  "name": "US sofa importers",
  "steps": [
    {
      "subject": "Upholstered sofas for {{company}}",
      "body": "Hi {{first_name|there}},\n\nI saw that {{company}} imports upholstered sofas. We make them in Leeds, with wooden frames, and ship to the US in five weeks.\n\nWould a price list be useful?\n\n{{sender_first_name}}"
    },
    {
      "delay_days": 3,
      "body": "Hi {{first_name|there}},\n\nJust checking that my note reached the right person. Who looks after upholstery suppliers at {{company}}?\n\n{{sender_first_name}}"
    }
  ],
  "recipients": [
    { "contact_id": "per_4m7q2x9k1c8d", "company": "Northfield Home Furnishings" }
  ],
  "dry_run": true
}'
```

Customs records name a company as it was filed, often in capitals and with Inc or Ltd. Pass `company` with the name you would write yourself: what you pass wins over what is on file.

Read three parts of the answer before you go on:

- `recipients.results`: every person left out, and why, such as `suppressed` or `active_in_other_campaign`.
- `content.problems`: anything in the texts that would stop the campaign, such as a placeholder nobody has a value for.
- `preview` and `estimate`: the first emails as they will read, and how many days the campaign takes with the sender's domains.

The second step has no `subject`, so it goes out as a reply in the thread of the first email. Each email ends with the sender's name, address and an unsubscribe link. See [Create a campaign](/docs/email/campaigns-create) and [Before you send](/docs/tutorials/check-before-sending).

## 7. Start it [#start]

Send the same request with `"start": true` in place of `"dry_run": true`. Add an `Idempotency-Key` header, so that a retry after a lost answer does not create a second campaign:

```bash
curl https://api.won.dev/v1/email/campaigns \
  -H "Authorization: Bearer $WON_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: us-sofa-importers-1" \
  -d '{ ...the same body..., "start": true }'
```

The answer's `data.campaign.id`, such as `cmp_7p1q8w3e5r4k2m9x`, names the campaign from now on. Emails go out Monday to Friday, 9:00 to 17:00 in each recipient's own time zone, a few minutes apart, so ten people take a day or two, not seconds. Sending is free.

## 8. Read who answered [#replies]

Replies are read from the mailboxes every few minutes. A reply, a bounce or an unsubscribe ends the sequence for that person by itself, and everyone who wrote back has a conversation in the inbox, the same inbox the console shows. Ask for the interested ones:

```bash
curl "https://api.won.dev/v1/conversations?campaign_id=cmp_7p1q8w3e5r4k2m9x&intent=interested,question" \
  -H "Authorization: Bearer $WON_API_KEY"
```

The answer, cut to `data`:

```json
{
  "data": [
    {
      "id": "cnv_9x7p1q8w3e5r4k2m",
      "channel": "email",
      "folder": "inbox",
      "unread": true,
      "answered": false,
      "name": "Jordan Lee",
      "company": "Northfield Home Furnishings",
      "country": "US",
      "campaign": { "id": "cmp_7p1q8w3e5r4k2m9x", "name": "US sofa importers" },
      "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": "jordan.lee@northfield-home.example",
        "status": "replied",
        "reply_from": "jordan.lee@northfield-home.example",
        "subject": "Re: Upholstered sofas for Northfield Home Furnishings"
      }
    }
  ]
}
```

`GET /conversations/{id}` returns everything written with the person, oldest first. Answer with `POST /conversations/{id}/reply`: it goes out in the same thread, from the same mailbox, with the price list in `attachments` if you have one, and the conversation moves to `done`. To hear about replies as they come, poll `GET /events` with the `next_cursor` of your last call, or create a webhook: each `reply.received` carries its `conversation_id`. See [Replies](/docs/email#replies) and [Events and webhooks](/docs/email#events).

In the sandbox of a test key, nobody answers unless their address says so: add a recipient whose address starts with `reply@`, and a day between steps takes a minute.

## What the run costs [#cost]

With a live key, at most:

| Step                                 | Billed                                    | Most it costs |
| ------------------------------------ | ----------------------------------------- | ------------- |
| 1. Find the HS code                  | Free                                      | $0            |
| 2. Preview the leads                 | Free                                      | $0            |
| 3. Find 10 leads                     | `trade_company` × 10, `person_email` × 10 | $0.40         |
| 4. Register the sender               | Free                                      | $0            |
| 5. Buy a sending domain              | `email_domain_day` × 32                   | $28.80        |
| 6 to 8. Campaign, emails and replies | Free                                      | $0            |
| **Total**                            |                                           | **$29.20**    |

A lead without a contact is passed over and costs nothing, and a contact your organization paid for in the last 30 days comes back free. The first period of a domain runs to its renewal date, 15 to 45 days, so its price changes with the day you buy it; after that it costs $27 for 30 days until you cancel it. See [Pricing and billing](/docs/billing).

## Next [#next]

- Write to more importers: page the leads with `next_cursor`, or have [a task](/docs/tasks) find up to 500, and add them with [Add recipients](/docs/email/recipients-add).
- Pick the country before you pick the buyers: [Get market statistics](/docs/trade/stats-query) and [Brief a market](/docs/trade/markets-brief) compare the markets of a product.
- Write first to the importers who buy more than before: [Reach out on buying signals](/docs/tutorials/buying-signals).