{"openapi":"3.1.0","info":{"title":"Won.dev API","version":"1","description":"Trade data, enrichment, signals and cold email for developers and AI agents. Every paid call is billed by the results it returns: empty results, errors and repeats within 24 hours are free. Send `dry_run: true` to get the maximum cost first, and `max_cost` to cap a call. Agents can also call the API as tools from the MCP server at https://won.dev/mcp. The version is in the path: a change that could break a client only ever comes as a new version, and an operation that is going away says so with the `Deprecation` and `Sunset` headers at least 6 months before, see https://won.dev/docs/versioning."},"servers":[{"url":"https://api.won.dev/v1","description":"Live and test. A `won_live_` key works on real data. A `won_test_` key is the sandbox: it returns sample data, sends no email and is never charged."}],"externalDocs":{"url":"https://won.dev/docs"},"security":[{"apiKey":[]}],"paths":{"/trade/hs-codes":{"get":{"operationId":"trade_hs_codes_search","summary":"Find HS codes","description":"Finds the HS code of a product from a description in English (`office chair`), or lists the codes under a prefix (`9401`). Free. Call it first when you only know the product's name: every other trade endpoint is more precise with an `hs_code` than with `product` keywords. Six-digit codes are the same in every country; pass one as `hs_code` to the search endpoints.","tags":["trade"],"externalDocs":{"url":"https://won.dev/docs/trade/hs-codes-search"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"q","in":"query","required":true,"description":"A product in plain English, such as `office chair` or `led lamp`, or the first digits of a code, such as `9401`.","schema":{"type":"string","minLength":1,"maxLength":100},"example":"sofa"},{"name":"limit","in":"query","required":false,"description":"How many codes to return, 1 to 50.","schema":{"default":10,"type":"integer","minimum":1,"maximum":50},"example":2},{"name":"fields","in":"query","required":false,"description":"Pass `us_duty` to add the general US duty rate of every tariff line under each code.","schema":{"default":[],"maxItems":5,"type":"array","items":{"type":"string","maxLength":20}},"style":"form","explode":false}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"HS code, digits only: 2, 4 or 6 digits."},"description":{"type":"string","description":"Official description of the code."},"parent":{"description":"The code one level up. Null for a chapter.","type":["string","null"]},"us_duty":{"description":"US general duty rates of the tariff lines under this code.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Eight-digit US tariff line."},"description":{"type":"string","description":"Text of the tariff line."},"general":{"type":"string","description":"General (most-favored-nation) rate of duty, as published."}},"required":["code","description","general"],"additionalProperties":false}}},"required":["code","description","parent"],"additionalProperties":false},"description":"The best matches first."},"query":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The request as it was understood: country names as codes, the default dates filled in."},"notice":{"description":"A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","query","notice","usage"],"additionalProperties":false},"example":{"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"},{"code":"940171","description":"Seats (other than those of heading 9402), whether or not convertible into beds, and parts thereof > Other seats, with metal frames > Upholstered","parent":"9401"}],"query":{"q":"sofa","limit":2},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/trade/coverage":{"get":{"operationId":"trade_coverage_get","summary":"Check data coverage","description":"Says what exists for a country before you spend anything: whether shipment records are declared there for imports and for exports, whether they carry values, which dates they span, and whether official statistics can be queried. Free. A country without records of its own (`records: false`) still appears in searches, but only through the declarations of its partner countries, so its counts are incomplete. Without `country` it lists the countries with records of their own or official statistics, and `notice` counts the others.","tags":["trade"],"externalDocs":{"url":"https://won.dev/docs/trade/coverage-get"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"country","in":"query","required":false,"description":"The country to check. Leave it out to list all. An ISO code such as `US`, or an English name such as `United States`.","schema":{"type":"string","maxLength":80},"example":"United States"}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code, such as `US`."},"imports":{"type":"object","properties":{"records":{"description":"Whether shipment records declared in this country exist. Null when not known yet.","type":["boolean","null"]},"values":{"description":"Whether those records carry declared values. Null when not known yet.","type":["boolean","null"]},"earliest":{"description":"Date of the earliest record seen, `YYYY-MM-DD`.","type":["string","null"]},"latest":{"description":"Date of the latest record seen, `YYYY-MM-DD`.","type":["string","null"]},"note":{"description":"Something to know about these records, such as a gap or a late start.","type":["string","null"]}},"required":["records","values","earliest","latest","note"],"additionalProperties":false,"description":"Records of goods imported into the country."},"exports":{"type":"object","properties":{"records":{"description":"Whether shipment records declared in this country exist. Null when not known yet.","type":["boolean","null"]},"values":{"description":"Whether those records carry declared values. Null when not known yet.","type":["boolean","null"]},"earliest":{"description":"Date of the earliest record seen, `YYYY-MM-DD`.","type":["string","null"]},"latest":{"description":"Date of the latest record seen, `YYYY-MM-DD`.","type":["string","null"]},"note":{"description":"Something to know about these records, such as a gap or a late start.","type":["string","null"]}},"required":["records","values","earliest","latest","note"],"additionalProperties":false,"description":"Records of goods exported from the country."},"official":{"type":"object","properties":{"available":{"type":"boolean","description":"Whether official trade statistics can be queried."},"latest_month":{"description":"Latest month published, `YYYY-MM`, among the statistics fetched so far. The last six months of every country are fetched once a day, so it is null when its office published nothing in that time or has not answered yet.","type":["string","null"]},"mirror":{"description":"True when the country publishes no recent statistics of its own, and they are what its partners report about their trade with it.","type":"boolean"}},"required":["available","latest_month"],"additionalProperties":false,"description":"Official statistics with the country as importer or exporter."}},"required":["country","imports","exports","official"],"additionalProperties":false},"description":"One entry for each country."},"query":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The request as it was understood: country names as codes, the default dates filled in."},"notice":{"description":"A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","query","notice","usage"],"additionalProperties":false},"example":{"data":[{"country":"US","imports":{"records":true,"values":false,"earliest":"2021-01-01","latest":"2026-11-13","note":null},"exports":{"records":true,"values":false,"earliest":"2021-01-02","latest":"2026-09-30","note":null},"official":{"available":true,"latest_month":"2026-09"}}],"query":{"country":"US"},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/trade/companies/search":{"post":{"operationId":"trade_companies_search","summary":"Find buyers or suppliers","description":"Ranks the companies that import or export a product: buyers with `role: importer`, suppliers with `role: exporter`. Costs $0.01 for each company returned; an empty result is free. `shipments` counts customs records and `recorded_value_usd` sums only the records that declare a value, so neither is a market share: use `POST /trade/stats/query` for market size. `country` is where the goods were declared, not always where the company is registered. Rows of the same company are merged, so a page can hold fewer than `limit`. About one company in three has a `website`; `POST /trade/leads/find` and the contacts endpoint look the rest up. Next: `GET /trade/companies/{id}` for one company's profile, or `POST /trade/leads/find` to get this list with contacts in one call.","tags":["trade"],"externalDocs":{"url":"https://won.dev/docs/trade/companies-search"},"x-mode":"proxy","x-billing":"per result","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["importer","exporter"],"description":"`importer` returns the companies that buy the product: buyers. `exporter` returns the companies that sell it: suppliers."},"hs_code":{"description":"HS code, digits only, 6 to 10 digits. Six digits are the same in every country; a longer code is one country's own tariff line, matched by prefix. Find the code of a product with `GET /trade/hs-codes`.","type":"string","maxLength":20},"product":{"type":"string","minLength":2,"maxLength":100,"description":"Product keywords in English, such as `office chair`. A fuzzy match on the goods description. Use it when you do not know the HS code; an `hs_code` is more precise."},"importer_country":{"description":"Country the goods are imported into: an ISO code such as `US`, or an English name such as `United States`.","type":"string","maxLength":80},"exporter_country":{"description":"Country the goods are exported from: an ISO code such as `VN`, or an English name such as `Vietnam`.","type":"string","maxLength":80},"trading_with":{"type":"string","minLength":2,"maxLength":200,"description":"Only companies that trade with this one: its `co_` ID, or its name. With `role: importer` these are the buyers of that exporter, with `role: exporter` the suppliers of that importer. Either way it is matched by its name as it stands in the records, so companies that share the name count together."},"exclude_forwarders":{"default":true,"description":"Leave out freight forwarders and logistics companies, which stand on bills of lading in place of the real buyer or seller.","type":"boolean"},"sort":{"default":"shipments","description":"`shipments` ranks by number of records. `recorded_value` ranks by declared value; only records that carry a value count, so it favors routes whose exporting country publishes values.","type":"string","enum":["shipments","recorded_value"]},"since":{"description":"First day of the date range, `YYYY-MM-DD`. Default: the first day of the month 12 months before `until`.","type":"string","maxLength":10},"until":{"description":"Last day of the date range, `YYYY-MM-DD`. Default: up to the latest records.","type":"string","maxLength":10},"limit":{"default":10,"description":"How many results to return, 1 to 100. You pay for the results returned.","type":"integer","minimum":1,"maximum":100},"cursor":{"description":"To get the next page, pass `next_cursor` of the previous response back unchanged, with the same parameters.","type":"string","maxLength":200},"max_cost":{"description":"Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged.","type":"number","exclusiveMinimum":0},"dry_run":{"default":false,"description":"If true, only return the maximum cost of this call. Nothing runs, nothing is charged.","type":"boolean"}},"required":["role"],"additionalProperties":false},"example":{"role":"importer","hs_code":"940161","importer_country":"US","limit":2}}}},"responses":{"200":{"description":"The result. With `dry_run`, only the maximum cost.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Company ID, such as `co_8f3k2m9x4p1q`."},"name":{"type":"string","description":"Name as written on shipping documents."},"role":{"type":"string","enum":["importer","exporter"],"description":"The side it is on in these records."},"country":{"anyOf":[{"type":"string","description":"ISO 3166-1 alpha-2 country code, such as `US`."},{"type":"null"}],"description":"Country the company imports into or exports from in these records."},"shipments":{"type":"integer","description":"Number of shipment records. A count of records, not a market share: countries that publish every declaration are over-represented."},"recorded_value_usd":{"description":"Sum of the declared values of the records that have one, in US dollars. A lower bound: US bills of lading carry no value.","type":["number","null"]},"website":{"description":"Bare domain, such as `example.com`. Often null.","type":["string","null"]},"sample_product":{"description":"A goods description from one of its records.","type":["string","null"]}},"required":["id","name","role","country","shipments","recorded_value_usd","website","sample_product"],"additionalProperties":false},"description":"The results of this page."},"total":{"type":"integer","description":"How many results match in all. Use it to decide between paging on and narrowing the query."},"has_more":{"type":"boolean","description":"Whether more results follow this page."},"next_cursor":{"description":"Pass it as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"query":{"type":"object","properties":{"data_through":{"description":"Date of the latest record this query can see, `YYYY-MM-DD`. Records arrive weeks after a shipment, so recent months are incomplete.","type":["string","null"]}},"required":["data_through"],"additionalProperties":{},"description":"The request as it was understood: country names as codes, the default dates filled in. `data_through` says how recent the records behind the answer are."},"notice":{"description":"A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"unit":{"type":"string","enum":["trade_record","trade_company","trade_company_profile","trade_lookup","person_email","company_channels","trade_stats","trade_official_stats","market_search","market_listings","market_estimates"],"description":"What is counted."},"records":{"type":"integer","description":"How many were returned and charged."},"already_paid":{"type":"integer","description":"How many more were returned for free, because this organization paid for them in the last 30 days."},"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["unit","records","already_paid","cost","balance","replayed"],"additionalProperties":false,"description":"What this call was charged, and the balance left."}},"required":["data","total","has_more","next_cursor","query","notice","usage"],"additionalProperties":false},{"$ref":"#/components/schemas/DryRun"}]},"example":{"data":[{"id":"co_8f3k2m9x4p1q","name":"SAMPLE NORTHFIELD HOME FURNISHINGS INC","role":"importer","country":"US","shipments":1840,"recorded_value_usd":21480350.4,"website":"northfield-home.example","sample_product":"UPHOLSTERED SOFA WITH WOODEN FRAME, FABRIC COVER"},{"id":"co_3d9t6w1b7n5z","name":"SAMPLE HARBORSIDE SEATING CO","role":"importer","country":"US","shipments":962,"recorded_value_usd":9310772.15,"website":"harborside-seating.example","sample_product":"RECLINER SOFA SET, LEATHER, 3 SEATER"}],"total":4087,"has_more":true,"next_cursor":"cur_Zx81kQp4b2JtMW0uMXJ6ZzQ","query":{"role":"importer","hs_code":"940161","importer_country":"US","exclude_forwarders":true,"sort":"shipments","since":"2025-11-01","until":"2026-11-20","data_through":"2026-11-11"},"notice":null,"usage":{"unit":"trade_company","records":2,"already_paid":0,"cost":0.02,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/trade/shipments/search":{"post":{"operationId":"trade_shipments_search","summary":"Search shipment records","description":"Returns customs declarations and bills of lading, one record per shipment: who shipped what to whom, when, how much and through which ports. Costs $0.005 for each record returned; an empty result is free. Filter by product (`hs_code` or `product`), by one company (`importer` or `exporter`), or both. `value_usd` is null where the record declares none, as on US bills of lading. One shipment can appear twice, once in the importing country's records and once in the exporting country's: `reported_by` says whose record it is. A record that is on file twice is returned once, and with a company ID the records of other companies with the same name are left out, so a page can hold fewer than `limit`. Use `total` to decide between paging on and narrowing the query; to count or sum, use `POST /trade/stats/query` instead of paging.","tags":["trade"],"externalDocs":{"url":"https://won.dev/docs/trade/shipments-search"},"x-mode":"proxy","x-billing":"per result","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hs_code":{"description":"HS code, digits only, 6 to 10 digits. Six digits are the same in every country; a longer code is one country's own tariff line, matched by prefix. Find the code of a product with `GET /trade/hs-codes`.","type":"string","maxLength":20},"product":{"type":"string","minLength":2,"maxLength":100,"description":"Product keywords in English, such as `office chair`. A fuzzy match on the goods description. Use it when you do not know the HS code; an `hs_code` is more precise."},"importer":{"type":"string","minLength":2,"maxLength":200,"description":"Only shipments this company received: its `co_` ID, which matches exactly, or its name."},"exporter":{"type":"string","minLength":2,"maxLength":200,"description":"Only shipments this company sent: its `co_` ID, which matches exactly, or its name."},"importer_country":{"description":"Country the goods are imported into: an ISO code such as `US`, or an English name such as `United States`.","type":"string","maxLength":80},"exporter_country":{"description":"Country the goods are exported from: an ISO code such as `VN`, or an English name such as `Vietnam`.","type":"string","maxLength":80},"since":{"description":"First day of the date range, `YYYY-MM-DD`. Default: the first day of the month 12 months before `until`.","type":"string","maxLength":10},"until":{"description":"Last day of the date range, `YYYY-MM-DD`. Default: up to the latest records.","type":"string","maxLength":10},"sort":{"default":"date_desc","description":"`date_desc` returns the latest records first, `date_asc` the earliest.","type":"string","enum":["date_desc","date_asc"]},"fields":{"description":"The fields each shipment has, besides `id`. Default: date, importer, exporter, hs_code, description, quantity, quantity_unit, weight_kg, value_usd, origin_country, loading_port, unloading_port, transport, reported_by. Also available: unit_price_usd, incoterm, brand, bill_of_lading, description_full. `default` stands for the default set, so `default,unit_price_usd` adds one field and `date,importer` returns only those two.","maxItems":40,"type":"array","items":{"type":"string","maxLength":40}},"limit":{"default":10,"description":"How many results to return, 1 to 100. You pay for the results returned.","type":"integer","minimum":1,"maximum":100},"cursor":{"description":"To get the next page, pass `next_cursor` of the previous response back unchanged, with the same parameters.","type":"string","maxLength":200},"max_cost":{"description":"Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged.","type":"number","exclusiveMinimum":0},"dry_run":{"default":false,"description":"If true, only return the maximum cost of this call. Nothing runs, nothing is charged.","type":"boolean"}},"required":[],"additionalProperties":false},"example":{"hs_code":"940161","importer_country":"US","limit":1}}}},"responses":{"200":{"description":"The result. With `dry_run`, only the maximum cost.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Shipment ID, such as `shp_5k2m8x1q9d3f`."},"date":{"description":"Date of the record, `YYYY-MM-DD`.","type":["string","null"]},"importer":{"description":"The buyer on the record.","type":"object","properties":{"id":{"anyOf":[{"type":"string","description":"Company ID, such as `co_8f3k2m9x4p1q`."},{"type":"null"}],"description":"Company ID. Pass it to the company endpoints. Null when the party is not named."},"name":{"description":"Name as written on the record.","type":["string","null"]},"country":{"anyOf":[{"type":"string","description":"ISO 3166-1 alpha-2 country code, such as `US`."},{"type":"null"}]}},"required":["id","name","country"],"additionalProperties":false},"exporter":{"description":"The seller on the record.","type":"object","properties":{"id":{"anyOf":[{"type":"string","description":"Company ID, such as `co_8f3k2m9x4p1q`."},{"type":"null"}],"description":"Company ID. Pass it to the company endpoints. Null when the party is not named."},"name":{"description":"Name as written on the record.","type":["string","null"]},"country":{"anyOf":[{"type":"string","description":"ISO 3166-1 alpha-2 country code, such as `US`."},{"type":"null"}]}},"required":["id","name","country"],"additionalProperties":false},"hs_code":{"description":"HS code as declared, digits only.","type":["string","null"]},"description":{"description":"Goods description, at most 200 characters.","type":["string","null"]},"description_truncated":{"description":"Present and true when `description` was cut. Ask for `description_full`.","type":"boolean"},"quantity":{"description":"Quantity as declared, in `quantity_unit`.","type":["number","null"]},"quantity_unit":{"description":"Unit of `quantity` as declared.","type":["string","null"]},"weight_kg":{"description":"Weight in kilograms.","type":["number","null"]},"value_usd":{"description":"Declared value. Null when the record has none, as on US bills of lading.","type":["number","null"]},"origin_country":{"description":"Country of origin of the goods.","anyOf":[{"type":"string","description":"ISO 3166-1 alpha-2 country code, such as `US`."},{"type":"null"}]},"loading_port":{"description":"Port where the goods were loaded.","type":["string","null"]},"unloading_port":{"description":"Port where the goods were unloaded.","type":["string","null"]},"transport":{"description":"Mode of transport.","anyOf":[{"type":"string","enum":["sea","air","road","rail","other"]},{"type":"null"}]},"reported_by":{"anyOf":[{"type":"object","properties":{"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code, such as `US`."},"flow":{"type":"string","enum":["import","export"],"description":"Whether that country recorded it as an import or as an export."}},"required":["country","flow"],"additionalProperties":false,"description":"Whose customs declaration this record is. A US import can be recorded by a US bill of lading (`US`, `import`) and again by the exporter's declaration (`VN`, `export`)."},{"type":"null"}]},"unit_price_usd":{"description":"Declared value for one unit of `quantity`, in US dollars.","type":["number","null"]},"incoterm":{"description":"Trade term, such as `FOB` or `CIF`.","type":["string","null"]},"brand":{"description":"Brand named on the record.","type":["string","null"]},"bill_of_lading":{"description":"Bill of lading or declaration number, as on the customs record.","type":["string","null"]},"description_full":{"description":"The whole goods description, however long.","type":["string","null"]}},"required":["id"],"additionalProperties":false},"description":"The results of this page."},"total":{"type":"integer","description":"How many results match in all. Use it to decide between paging on and narrowing the query."},"has_more":{"type":"boolean","description":"Whether more results follow this page."},"next_cursor":{"description":"Pass it as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"query":{"type":"object","properties":{"data_through":{"description":"Date of the latest record this query can see, `YYYY-MM-DD`. Records arrive weeks after a shipment, so recent months are incomplete.","type":["string","null"]}},"required":["data_through"],"additionalProperties":{},"description":"The request as it was understood: country names as codes, the default dates filled in. `data_through` says how recent the records behind the answer are."},"notice":{"description":"A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"unit":{"type":"string","enum":["trade_record","trade_company","trade_company_profile","trade_lookup","person_email","company_channels","trade_stats","trade_official_stats","market_search","market_listings","market_estimates"],"description":"What is counted."},"records":{"type":"integer","description":"How many were returned and charged."},"already_paid":{"type":"integer","description":"How many more were returned for free, because this organization paid for them in the last 30 days."},"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["unit","records","already_paid","cost","balance","replayed"],"additionalProperties":false,"description":"What this call was charged, and the balance left."}},"required":["data","total","has_more","next_cursor","query","notice","usage"],"additionalProperties":false},{"$ref":"#/components/schemas/DryRun"}]},"example":{"data":[{"id":"shp_5k2m8x1q9d3f","date":"2026-11-11","importer":{"id":"co_8f3k2m9x4p1q","name":"SAMPLE NORTHFIELD HOME FURNISHINGS INC","country":"US"},"exporter":{"id":"co_2c7h5n0w6r8t","name":"SAMPLE DONG NAI COMFORT FURNITURE CO LTD","country":"VN"},"hs_code":"940161","description":"UPHOLSTERED SOFA WITH WOODEN FRAME, FABRIC COVER","quantity":291,"quantity_unit":"CTN","weight_kg":8115.4,"value_usd":null,"origin_country":"VN","loading_port":"Cat Lai","unloading_port":"Savannah, Georgia","transport":"sea","reported_by":{"country":"US","flow":"import"}}],"total":1165783,"has_more":true,"next_cursor":"cur_Qm93c2VyLTEuMXJ6ZzQ","query":{"hs_code":"940161","importer_country":"US","since":"2025-11-01","until":"2026-11-20","sort":"date_desc","data_through":"2026-11-11"},"notice":null,"usage":{"unit":"trade_record","records":1,"already_paid":0,"cost":0.005,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/trade/companies/lookup":{"get":{"operationId":"trade_companies_lookup","summary":"Look up a company","description":"Finds a company by name or by website and returns its ID, which every company endpoint takes. Costs $0.02 for a lookup that finds something, however many candidates come back; finding nothing is free. Names are matched as they appear on shipping documents, so one company can come back as several candidates with different countries or spellings: pick by `country` and `shipments`. A website only finds companies that a search has returned before; when it finds nothing, look the company up by name.","tags":["trade"],"externalDocs":{"url":"https://won.dev/docs/trade/companies-lookup"},"x-mode":"waterfall","x-billing":"per result","parameters":[{"name":"q","in":"query","required":true,"description":"A company name, such as `Acme Furniture`, or its website, such as `acme.com`.","schema":{"type":"string","minLength":2,"maxLength":200},"example":"northfield home furnishings"},{"name":"country","in":"query","required":false,"description":"Only companies in this country. An ISO code such as `US`, or an English name such as `United States`.","schema":{"type":"string","maxLength":80},"example":"US"},{"name":"limit","in":"query","required":false,"description":"How many candidates to return, 1 to 10.","schema":{"default":5,"type":"integer","minimum":1,"maximum":10}},{"name":"max_cost","in":"query","required":false,"description":"Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged.","schema":{"type":"number","exclusiveMinimum":0}},{"name":"dry_run","in":"query","required":false,"description":"If true, only return the maximum cost of this call. Nothing runs, nothing is charged.","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"The result. With `dry_run`, only the maximum cost.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Company ID, such as `co_8f3k2m9x4p1q`."},"name":{"type":"string","description":"Name as written on shipping documents."},"country":{"anyOf":[{"type":"string","description":"ISO 3166-1 alpha-2 country code, such as `US`."},{"type":"null"}],"description":"Where the company is, from its address when one is on file, otherwise the country of its records."},"website":{"description":"Bare domain, such as `example.com`. Often null.","type":["string","null"]},"shipments":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"All shipment records of the company, when known."},"last_shipment":{"description":"Date of its latest record, `YYYY-MM-DD`.","type":["string","null"]}},"required":["id","name","country","website","shipments","last_shipment"],"additionalProperties":false},"description":"The candidates, best match first."},"query":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The request as it was understood: country names as codes, the default dates filled in."},"notice":{"description":"A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"unit":{"type":"string","enum":["trade_record","trade_company","trade_company_profile","trade_lookup","person_email","company_channels","trade_stats","trade_official_stats","market_search","market_listings","market_estimates"],"description":"What is counted."},"records":{"type":"integer","description":"How many were returned and charged."},"already_paid":{"type":"integer","description":"How many more were returned for free, because this organization paid for them in the last 30 days."},"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["unit","records","already_paid","cost","balance","replayed"],"additionalProperties":false,"description":"What this call was charged, and the balance left."}},"required":["data","query","notice","usage"],"additionalProperties":false},{"$ref":"#/components/schemas/DryRun"}]},"example":{"data":[{"id":"co_8f3k2m9x4p1q","name":"SAMPLE NORTHFIELD HOME FURNISHINGS INC","country":"US","website":"northfield-home.example","shipments":1840,"last_shipment":"2026-11-11"}],"query":{"q":"northfield home furnishings","country":"US","limit":5},"notice":null,"usage":{"unit":"trade_lookup","records":1,"already_paid":0,"cost":0.02,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/trade/companies/{id}":{"get":{"operationId":"trade_companies_get","summary":"Get a company","description":"Returns one company: where it is, whether it imports or exports, a summary of its trade (shipment count, number of suppliers and buyers, HS codes, latest shipment) and the public channels on file. Costs $0.04. `include` adds parts in the same call, each billed by its own unit and only for what comes back: `partners` (its 10 largest suppliers, or buyers when it mainly exports; $0.01 each), `recent_shipments` (its 10 latest records; $0.005 each), `contacts` (up to 5 people in purchasing and management with a verified work email; $0.03 each) and `channels` (reads the company's website for shared mailboxes, phone numbers, WhatsApp and other messaging contacts, and social pages; when it has no website, or its website has none, the map listing and the social page that carry its name; $0.02 when they have any). A part that cannot be loaded is null and is not charged. When the trade source does not answer, the company still comes back with what is on file (its name, website and shipment count, in `trade`) and the profile is not charged. For other filters or more rows, call the partners, shipments and contacts endpoints of the company.","tags":["trade"],"externalDocs":{"url":"https://won.dev/docs/trade/companies-get"},"x-mode":"merge","x-billing":"per result","parameters":[{"name":"id","in":"path","required":true,"description":"Company ID, such as `co_8f3k2m9x4p1q`. Search results carry it; `GET /trade/companies/lookup?q=` finds it by name.","schema":{"type":"string","maxLength":40},"example":"co_8f3k2m9x4p1q"},{"name":"include","in":"query","required":false,"description":"Parts to add: `partners`, `recent_shipments`, `contacts`, `channels`. Each is billed by its own unit.","schema":{"default":[],"maxItems":4,"type":"array","items":{"type":"string","enum":["partners","recent_shipments","contacts","channels"]}},"example":["contacts"],"style":"form","explode":false},{"name":"max_cost","in":"query","required":false,"description":"Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged.","schema":{"type":"number","exclusiveMinimum":0}},{"name":"dry_run","in":"query","required":false,"description":"If true, only return the maximum cost of this call. Nothing runs, nothing is charged.","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"The result. With `dry_run`, only the maximum cost.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Company ID, such as `co_8f3k2m9x4p1q`."},"name":{"type":"string","description":"Name as written on shipping documents."},"country":{"anyOf":[{"type":"string","description":"ISO 3166-1 alpha-2 country code, such as `US`."},{"type":"null"}],"description":"Where the company is: the country its address names, otherwise the country of its records. It can differ from the `country` of search results, which is where its goods were declared."},"type":{"anyOf":[{"type":"string","enum":["importer","exporter","both"]},{"type":"null"}],"description":"Whether it imports, exports or both, by its records."},"website":{"description":"Bare domain, such as `example.com`. Null when not known.","type":["string","null"]},"address":{"description":"Address as on its records.","type":["string","null"]},"channels":{"type":"object","properties":{"emails":{"type":"array","items":{"type":"string"},"description":"Shared addresses such as `info@` and `sales@`."},"phones":{"type":"array","items":{"type":"string"},"description":"Phone numbers the company publishes: in E.164, such as `+4952112340`, when the country can be told, else as printed. Fax numbers are left out."},"messaging":{"type":"array","items":{"type":"object","properties":{"app":{"type":"string","enum":["whatsapp","wechat","zalo","line","skype","telegram"]},"value":{"type":"string","description":"A number in E.164 for WhatsApp, else the ID or number as printed."}},"required":["app","value"],"additionalProperties":false},"description":"WhatsApp, WeChat, Zalo, LINE, Skype and Telegram contacts the company gives."},"social":{"type":"object","properties":{"linkedin":{"type":["string","null"]},"facebook":{"type":["string","null"]},"twitter":{"type":["string","null"]},"instagram":{"type":["string","null"]},"youtube":{"type":["string","null"]},"tiktok":{"type":["string","null"]},"pinterest":{"type":["string","null"]}},"required":["linkedin","facebook","twitter","instagram","youtube","tiktok","pinterest"],"additionalProperties":false,"description":"Links to its public pages. Null where none is known."}},"required":["emails","phones","messaging","social"],"additionalProperties":false,"description":"Ways to reach the company that it publishes itself. People are in `contacts`."},"trade":{"anyOf":[{"type":"object","properties":{"shipments":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"All shipment records of the company."},"suppliers":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Number of distinct suppliers."},"buyers":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Number of distinct buyers."},"hs_codes":{"type":"array","items":{"type":"string"},"description":"HS codes it trades, digits only."},"last_shipment":{"description":"Date of its latest record, `YYYY-MM-DD`.","type":["string","null"]}},"required":["shipments","suppliers","buyers","hs_codes","last_shipment"],"additionalProperties":false},{"type":"null"}],"description":"Null when no trade summary is known yet."},"partners":{"description":"With `include=partners`: the largest trading partners of the last 12 months. `role` says whether they are suppliers or buyers.","anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Company ID, such as `co_8f3k2m9x4p1q`."},"name":{"type":"string","description":"Name as written on shipping documents."},"role":{"type":"string","enum":["supplier","buyer"],"description":"What it is to the company asked about."},"country":{"anyOf":[{"type":"string","description":"ISO 3166-1 alpha-2 country code, such as `US`."},{"type":"null"}]},"shipments":{"type":"integer","description":"Number of shipment records. A count of records, not a market share: countries that publish every declaration are over-represented."},"recorded_value_usd":{"description":"Sum of the declared values of the records that have one, in US dollars. A lower bound: US bills of lading carry no value.","type":["number","null"]},"share":{"description":"This partner's part of the company's records in the same direction, from 0 to 1. Shows how concentrated its suppliers or buyers are.","type":["number","null"]},"website":{"description":"Bare domain, such as `example.com`. Often null.","type":["string","null"]},"sample_product":{"description":"A goods description from one of its records.","type":["string","null"]}},"required":["id","name","role","country","shipments","recorded_value_usd","share","website","sample_product"],"additionalProperties":false}},{"type":"null"}]},"recent_shipments":{"description":"With `include=recent_shipments`: the latest records of the last 12 months.","anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Shipment ID, such as `shp_5k2m8x1q9d3f`."},"date":{"description":"Date of the record, `YYYY-MM-DD`.","type":["string","null"]},"importer":{"description":"The buyer on the record.","type":"object","properties":{"id":{"anyOf":[{"type":"string","description":"Company ID, such as `co_8f3k2m9x4p1q`."},{"type":"null"}],"description":"Company ID. Pass it to the company endpoints. Null when the party is not named."},"name":{"description":"Name as written on the record.","type":["string","null"]},"country":{"anyOf":[{"type":"string","description":"ISO 3166-1 alpha-2 country code, such as `US`."},{"type":"null"}]}},"required":["id","name","country"],"additionalProperties":false},"exporter":{"description":"The seller on the record.","type":"object","properties":{"id":{"anyOf":[{"type":"string","description":"Company ID, such as `co_8f3k2m9x4p1q`."},{"type":"null"}],"description":"Company ID. Pass it to the company endpoints. Null when the party is not named."},"name":{"description":"Name as written on the record.","type":["string","null"]},"country":{"anyOf":[{"type":"string","description":"ISO 3166-1 alpha-2 country code, such as `US`."},{"type":"null"}]}},"required":["id","name","country"],"additionalProperties":false},"hs_code":{"description":"HS code as declared, digits only.","type":["string","null"]},"description":{"description":"Goods description, at most 200 characters.","type":["string","null"]},"description_truncated":{"description":"Present and true when `description` was cut. Ask for `description_full`.","type":"boolean"},"quantity":{"description":"Quantity as declared, in `quantity_unit`.","type":["number","null"]},"quantity_unit":{"description":"Unit of `quantity` as declared.","type":["string","null"]},"weight_kg":{"description":"Weight in kilograms.","type":["number","null"]},"value_usd":{"description":"Declared value. Null when the record has none, as on US bills of lading.","type":["number","null"]},"origin_country":{"description":"Country of origin of the goods.","anyOf":[{"type":"string","description":"ISO 3166-1 alpha-2 country code, such as `US`."},{"type":"null"}]},"loading_port":{"description":"Port where the goods were loaded.","type":["string","null"]},"unloading_port":{"description":"Port where the goods were unloaded.","type":["string","null"]},"transport":{"description":"Mode of transport.","anyOf":[{"type":"string","enum":["sea","air","road","rail","other"]},{"type":"null"}]},"reported_by":{"anyOf":[{"type":"object","properties":{"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code, such as `US`."},"flow":{"type":"string","enum":["import","export"],"description":"Whether that country recorded it as an import or as an export."}},"required":["country","flow"],"additionalProperties":false,"description":"Whose customs declaration this record is. A US import can be recorded by a US bill of lading (`US`, `import`) and again by the exporter's declaration (`VN`, `export`)."},{"type":"null"}]},"unit_price_usd":{"description":"Declared value for one unit of `quantity`, in US dollars.","type":["number","null"]},"incoterm":{"description":"Trade term, such as `FOB` or `CIF`.","type":["string","null"]},"brand":{"description":"Brand named on the record.","type":["string","null"]},"bill_of_lading":{"description":"Bill of lading or declaration number, as on the customs record.","type":["string","null"]},"description_full":{"description":"The whole goods description, however long.","type":["string","null"]}},"required":["id"],"additionalProperties":false}},{"type":"null"}]},"contacts":{"description":"With `include=contacts`: people to approach, each with a verified work email.","anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Person ID, such as `per_4m7q2x9k1c8d`: the same in every endpoint for the same full name at the same company. Kept for your account for 90 days after it was last returned, with the email: pass it as `contact_id` to add the person to a campaign."},"name":{"description":"Full name.","type":["string","null"]},"title":{"description":"Job title.","type":["string","null"]},"seniority":{"anyOf":[{"type":"string","enum":["owner","c_level","executive","manager","senior","staff"]},{"type":"null"}],"description":"Level, read from the title."},"department":{"anyOf":[{"type":"string","enum":["purchasing","sales","management","operations","marketing","finance","engineering","quality","it","hr","legal"]},{"type":"null"}],"description":"Department, read from the title."},"email":{"type":"string","description":"Work email on the company's own domain."},"email_status":{"type":"string","enum":["verified","risky"],"description":"`verified`: the mailbox exists. `risky`: the domain accepts every address, so the mailbox cannot be confirmed."},"linkedin_url":{"description":"The person's LinkedIn profile, when known.","type":["string","null"]},"other_email":{"description":"Another email address listed for the person. Often on the company's domain too, but it can be a private address, and it is not verified.","type":["string","null"]},"phones":{"description":"Phone numbers listed for the person: a direct line, a mobile or the company's switchboard. Not verified.","type":"array","items":{"type":"string"}}},"required":["id","name","title","seniority","department","email","email_status","linkedin_url"],"additionalProperties":false}},{"type":"null"}]}},"required":["id","name","country","type","website","address","channels","trade"],"additionalProperties":false,"description":"The company, with the parts asked for in `include`."},"query":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The request as it was understood: country names as codes, the default dates filled in."},"notice":{"description":"A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"breakdown":{"type":"array","items":{"type":"object","properties":{"unit":{"type":"string","enum":["trade_record","trade_company","trade_company_profile","trade_lookup","person_email","company_channels","trade_stats","trade_official_stats","market_search","market_listings","market_estimates"],"description":"What is counted."},"records":{"type":"integer","description":"How many were returned and charged."},"already_paid":{"type":"integer","description":"How many more were returned for free, because this organization paid for them in the last 30 days."},"cost":{"type":"number","description":"What they cost, in US dollars."}},"required":["unit","records","already_paid","cost"],"additionalProperties":false},"description":"Every billing unit that came back, charged or not. Empty when nothing did."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","breakdown","balance","replayed"],"additionalProperties":false,"description":"What this call was charged, and the balance left."}},"required":["data","query","notice","usage"],"additionalProperties":false},{"$ref":"#/components/schemas/DryRun"}]},"example":{"data":{"id":"co_8f3k2m9x4p1q","name":"SAMPLE NORTHFIELD HOME FURNISHINGS INC","country":"US","type":"importer","website":"northfield-home.example","address":"1200 Sample Parkway, Charlotte, NC 28202, United States","channels":{"emails":["info@northfield-home.example","sales@northfield-home.example"],"phones":["+15550100142"],"messaging":[{"app":"whatsapp","value":"+15550100142"}],"social":{"linkedin":"https://www.linkedin.com/company/northfield-home","facebook":null,"twitter":null,"instagram":null,"youtube":null,"tiktok":null,"pinterest":null}},"trade":{"shipments":1840,"suppliers":3,"buyers":0,"hs_codes":["940161","940171","940190"],"last_shipment":"2026-11-11"},"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"}]},"query":{"id":"co_8f3k2m9x4p1q","include":["contacts"]},"notice":null,"usage":{"cost":0.07,"breakdown":[{"unit":"trade_company_profile","records":1,"already_paid":0,"cost":0.04},{"unit":"person_email","records":1,"already_paid":0,"cost":0.03}],"balance":48.01,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/trade/companies/{id}/shipments":{"get":{"operationId":"trade_companies_shipments","summary":"List a company's shipments","description":"Returns the shipment records of one company: what it bought with `role=importer` (the default), what it sold with `role=exporter`. Costs $0.005 for each record returned; an empty result is free. The same records as `POST /trade/shipments/search` with the company as a filter, matched by ID. Narrow with `hs_code`, countries and dates. To see whom it trades with, ranked, use `GET /trade/companies/{id}/partners` instead of reading records.","tags":["trade"],"externalDocs":{"url":"https://won.dev/docs/trade/companies-shipments"},"x-mode":"proxy","x-billing":"per result","parameters":[{"name":"id","in":"path","required":true,"description":"Company ID, such as `co_8f3k2m9x4p1q`. Search results carry it; `GET /trade/companies/lookup?q=` finds it by name.","schema":{"type":"string","maxLength":40},"example":"co_8f3k2m9x4p1q"},{"name":"role","in":"query","required":false,"description":"`importer`: the shipments the company received. `exporter`: the shipments it sent.","schema":{"default":"importer","type":"string","enum":["importer","exporter"]}},{"name":"hs_code","in":"query","required":false,"description":"HS code, digits only, 6 to 10 digits. Six digits are the same in every country; a longer code is one country's own tariff line, matched by prefix. Find the code of a product with `GET /trade/hs-codes`.","schema":{"type":"string","maxLength":20}},{"name":"product","in":"query","required":false,"description":"Product keywords in English, such as `office chair`. A fuzzy match on the goods description. Use it when you do not know the HS code; an `hs_code` is more precise.","schema":{"type":"string","minLength":2,"maxLength":100}},{"name":"importer_country","in":"query","required":false,"description":"Country the goods are imported into: an ISO code such as `US`, or an English name such as `United States`.","schema":{"type":"string","maxLength":80}},{"name":"exporter_country","in":"query","required":false,"description":"Country the goods are exported from: an ISO code such as `VN`, or an English name such as `Vietnam`.","schema":{"type":"string","maxLength":80}},{"name":"since","in":"query","required":false,"description":"First day of the date range, `YYYY-MM-DD`. Default: the first day of the month 12 months before `until`.","schema":{"type":"string","maxLength":10}},{"name":"until","in":"query","required":false,"description":"Last day of the date range, `YYYY-MM-DD`. Default: up to the latest records.","schema":{"type":"string","maxLength":10}},{"name":"sort","in":"query","required":false,"description":"`date_desc` returns the latest records first, `date_asc` the earliest.","schema":{"default":"date_desc","type":"string","enum":["date_desc","date_asc"]}},{"name":"fields","in":"query","required":false,"description":"The fields each shipment has, besides `id`. Default: date, importer, exporter, hs_code, description, quantity, quantity_unit, weight_kg, value_usd, origin_country, loading_port, unloading_port, transport, reported_by. Also available: unit_price_usd, incoterm, brand, bill_of_lading, description_full. `default` stands for the default set, so `default,unit_price_usd` adds one field and `date,importer` returns only those two.","schema":{"maxItems":40,"type":"array","items":{"type":"string","maxLength":40}},"style":"form","explode":false},{"name":"limit","in":"query","required":false,"description":"How many results to return, 1 to 100. You pay for the results returned.","schema":{"default":10,"type":"integer","minimum":1,"maximum":100},"example":1},{"name":"cursor","in":"query","required":false,"description":"To get the next page, pass `next_cursor` of the previous response back unchanged, with the same parameters.","schema":{"type":"string","maxLength":200}},{"name":"max_cost","in":"query","required":false,"description":"Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged.","schema":{"type":"number","exclusiveMinimum":0}},{"name":"dry_run","in":"query","required":false,"description":"If true, only return the maximum cost of this call. Nothing runs, nothing is charged.","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"The result. With `dry_run`, only the maximum cost.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Shipment ID, such as `shp_5k2m8x1q9d3f`."},"date":{"description":"Date of the record, `YYYY-MM-DD`.","type":["string","null"]},"importer":{"description":"The buyer on the record.","type":"object","properties":{"id":{"anyOf":[{"type":"string","description":"Company ID, such as `co_8f3k2m9x4p1q`."},{"type":"null"}],"description":"Company ID. Pass it to the company endpoints. Null when the party is not named."},"name":{"description":"Name as written on the record.","type":["string","null"]},"country":{"anyOf":[{"type":"string","description":"ISO 3166-1 alpha-2 country code, such as `US`."},{"type":"null"}]}},"required":["id","name","country"],"additionalProperties":false},"exporter":{"description":"The seller on the record.","type":"object","properties":{"id":{"anyOf":[{"type":"string","description":"Company ID, such as `co_8f3k2m9x4p1q`."},{"type":"null"}],"description":"Company ID. Pass it to the company endpoints. Null when the party is not named."},"name":{"description":"Name as written on the record.","type":["string","null"]},"country":{"anyOf":[{"type":"string","description":"ISO 3166-1 alpha-2 country code, such as `US`."},{"type":"null"}]}},"required":["id","name","country"],"additionalProperties":false},"hs_code":{"description":"HS code as declared, digits only.","type":["string","null"]},"description":{"description":"Goods description, at most 200 characters.","type":["string","null"]},"description_truncated":{"description":"Present and true when `description` was cut. Ask for `description_full`.","type":"boolean"},"quantity":{"description":"Quantity as declared, in `quantity_unit`.","type":["number","null"]},"quantity_unit":{"description":"Unit of `quantity` as declared.","type":["string","null"]},"weight_kg":{"description":"Weight in kilograms.","type":["number","null"]},"value_usd":{"description":"Declared value. Null when the record has none, as on US bills of lading.","type":["number","null"]},"origin_country":{"description":"Country of origin of the goods.","anyOf":[{"type":"string","description":"ISO 3166-1 alpha-2 country code, such as `US`."},{"type":"null"}]},"loading_port":{"description":"Port where the goods were loaded.","type":["string","null"]},"unloading_port":{"description":"Port where the goods were unloaded.","type":["string","null"]},"transport":{"description":"Mode of transport.","anyOf":[{"type":"string","enum":["sea","air","road","rail","other"]},{"type":"null"}]},"reported_by":{"anyOf":[{"type":"object","properties":{"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code, such as `US`."},"flow":{"type":"string","enum":["import","export"],"description":"Whether that country recorded it as an import or as an export."}},"required":["country","flow"],"additionalProperties":false,"description":"Whose customs declaration this record is. A US import can be recorded by a US bill of lading (`US`, `import`) and again by the exporter's declaration (`VN`, `export`)."},{"type":"null"}]},"unit_price_usd":{"description":"Declared value for one unit of `quantity`, in US dollars.","type":["number","null"]},"incoterm":{"description":"Trade term, such as `FOB` or `CIF`.","type":["string","null"]},"brand":{"description":"Brand named on the record.","type":["string","null"]},"bill_of_lading":{"description":"Bill of lading or declaration number, as on the customs record.","type":["string","null"]},"description_full":{"description":"The whole goods description, however long.","type":["string","null"]}},"required":["id"],"additionalProperties":false},"description":"The results of this page."},"total":{"type":"integer","description":"How many results match in all. Use it to decide between paging on and narrowing the query."},"has_more":{"type":"boolean","description":"Whether more results follow this page."},"next_cursor":{"description":"Pass it as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"query":{"type":"object","properties":{"data_through":{"description":"Date of the latest record this query can see, `YYYY-MM-DD`. Records arrive weeks after a shipment, so recent months are incomplete.","type":["string","null"]}},"required":["data_through"],"additionalProperties":{},"description":"The request as it was understood: country names as codes, the default dates filled in. `data_through` says how recent the records behind the answer are."},"notice":{"description":"A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"unit":{"type":"string","enum":["trade_record","trade_company","trade_company_profile","trade_lookup","person_email","company_channels","trade_stats","trade_official_stats","market_search","market_listings","market_estimates"],"description":"What is counted."},"records":{"type":"integer","description":"How many were returned and charged."},"already_paid":{"type":"integer","description":"How many more were returned for free, because this organization paid for them in the last 30 days."},"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["unit","records","already_paid","cost","balance","replayed"],"additionalProperties":false,"description":"What this call was charged, and the balance left."}},"required":["data","total","has_more","next_cursor","query","notice","usage"],"additionalProperties":false},{"$ref":"#/components/schemas/DryRun"}]},"example":{"data":[{"id":"shp_5k2m8x1q9d3f","date":"2026-11-11","importer":{"id":"co_8f3k2m9x4p1q","name":"SAMPLE NORTHFIELD HOME FURNISHINGS INC","country":"US"},"exporter":{"id":"co_2c7h5n0w6r8t","name":"SAMPLE DONG NAI COMFORT FURNITURE CO LTD","country":"VN"},"hs_code":"940161","description":"UPHOLSTERED SOFA WITH WOODEN FRAME, FABRIC COVER","quantity":291,"quantity_unit":"CTN","weight_kg":8115.4,"value_usd":null,"origin_country":"VN","loading_port":"Cat Lai","unloading_port":"Savannah, Georgia","transport":"sea","reported_by":{"country":"US","flow":"import"}}],"total":1840,"has_more":true,"next_cursor":"cur_Tm9ydGhmaWVsZC4xcnpn","query":{"id":"co_8f3k2m9x4p1q","role":"importer","since":"2025-11-01","until":"2026-11-20","sort":"date_desc","data_through":"2026-11-11"},"notice":null,"usage":{"unit":"trade_record","records":1,"already_paid":0,"cost":0.005,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/trade/companies/{id}/partners":{"get":{"operationId":"trade_companies_partners","summary":"List a company's trading partners","description":"Ranks the companies one company trades with: its suppliers with `role=supplier` (the default), its buyers with `role=buyer`. Costs $0.01 for each partner returned; an empty result is free. `share` is the partner's part of the company's records in that direction, from 0 to 1: a few large shares mean the company depends on few suppliers or buyers. Use it to find a competitor's suppliers, or the other customers of your own supplier. Every row has an ID for the company endpoints. Partners are found by the company's name as it stands in the records, so for a company with a common name the list can include partners of a namesake.","tags":["trade"],"externalDocs":{"url":"https://won.dev/docs/trade/companies-partners"},"x-mode":"proxy","x-billing":"per result","parameters":[{"name":"id","in":"path","required":true,"description":"Company ID, such as `co_8f3k2m9x4p1q`. Search results carry it; `GET /trade/companies/lookup?q=` finds it by name.","schema":{"type":"string","maxLength":40},"example":"co_8f3k2m9x4p1q"},{"name":"role","in":"query","required":false,"description":"`supplier`: the companies it buys from. `buyer`: the companies it sells to.","schema":{"default":"supplier","type":"string","enum":["supplier","buyer"]},"example":"supplier"},{"name":"hs_code","in":"query","required":false,"description":"HS code, digits only, 6 to 10 digits. Six digits are the same in every country; a longer code is one country's own tariff line, matched by prefix. Find the code of a product with `GET /trade/hs-codes`.","schema":{"type":"string","maxLength":20}},{"name":"since","in":"query","required":false,"description":"First day of the date range, `YYYY-MM-DD`. Default: the first day of the month 12 months before `until`.","schema":{"type":"string","maxLength":10}},{"name":"until","in":"query","required":false,"description":"Last day of the date range, `YYYY-MM-DD`. Default: up to the latest records.","schema":{"type":"string","maxLength":10}},{"name":"sort","in":"query","required":false,"description":"Rank by number of records, or by declared value.","schema":{"default":"shipments","type":"string","enum":["shipments","recorded_value"]}},{"name":"limit","in":"query","required":false,"description":"How many results to return, 1 to 100. You pay for the results returned.","schema":{"default":10,"type":"integer","minimum":1,"maximum":100},"example":2},{"name":"cursor","in":"query","required":false,"description":"To get the next page, pass `next_cursor` of the previous response back unchanged, with the same parameters.","schema":{"type":"string","maxLength":200}},{"name":"max_cost","in":"query","required":false,"description":"Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged.","schema":{"type":"number","exclusiveMinimum":0}},{"name":"dry_run","in":"query","required":false,"description":"If true, only return the maximum cost of this call. Nothing runs, nothing is charged.","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"The result. With `dry_run`, only the maximum cost.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Company ID, such as `co_8f3k2m9x4p1q`."},"name":{"type":"string","description":"Name as written on shipping documents."},"role":{"type":"string","enum":["supplier","buyer"],"description":"What it is to the company asked about."},"country":{"anyOf":[{"type":"string","description":"ISO 3166-1 alpha-2 country code, such as `US`."},{"type":"null"}]},"shipments":{"type":"integer","description":"Number of shipment records. A count of records, not a market share: countries that publish every declaration are over-represented."},"recorded_value_usd":{"description":"Sum of the declared values of the records that have one, in US dollars. A lower bound: US bills of lading carry no value.","type":["number","null"]},"share":{"description":"This partner's part of the company's records in the same direction, from 0 to 1. Shows how concentrated its suppliers or buyers are.","type":["number","null"]},"website":{"description":"Bare domain, such as `example.com`. Often null.","type":["string","null"]},"sample_product":{"description":"A goods description from one of its records.","type":["string","null"]}},"required":["id","name","role","country","shipments","recorded_value_usd","share","website","sample_product"],"additionalProperties":false},"description":"The results of this page."},"total":{"type":"integer","description":"How many results match in all. Use it to decide between paging on and narrowing the query."},"has_more":{"type":"boolean","description":"Whether more results follow this page."},"next_cursor":{"description":"Pass it as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"query":{"type":"object","properties":{"data_through":{"description":"Date of the latest record this query can see, `YYYY-MM-DD`. Records arrive weeks after a shipment, so recent months are incomplete.","type":["string","null"]}},"required":["data_through"],"additionalProperties":{},"description":"The request as it was understood: country names as codes, the default dates filled in. `data_through` says how recent the records behind the answer are."},"notice":{"description":"A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"unit":{"type":"string","enum":["trade_record","trade_company","trade_company_profile","trade_lookup","person_email","company_channels","trade_stats","trade_official_stats","market_search","market_listings","market_estimates"],"description":"What is counted."},"records":{"type":"integer","description":"How many were returned and charged."},"already_paid":{"type":"integer","description":"How many more were returned for free, because this organization paid for them in the last 30 days."},"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["unit","records","already_paid","cost","balance","replayed"],"additionalProperties":false,"description":"What this call was charged, and the balance left."}},"required":["data","total","has_more","next_cursor","query","notice","usage"],"additionalProperties":false},{"$ref":"#/components/schemas/DryRun"}]},"example":{"data":[{"id":"co_2c7h5n0w6r8t","name":"SAMPLE DONG NAI COMFORT FURNITURE CO LTD","role":"supplier","country":"VN","shipments":1325,"recorded_value_usd":18240118.6,"website":"dongnai-comfort.example","sample_product":"UPHOLSTERED SOFA WITH WOODEN FRAME, FABRIC COVER","share":0.5421},{"id":"co_4e6g8j0k2m4n","name":"SAMPLE SELANGOR UPHOLSTERY SDN BHD","role":"supplier","country":"MY","shipments":688,"recorded_value_usd":6120440.9,"website":"selangor-upholstery.example","sample_product":"RECLINER SOFA SET, LEATHER, 3 SEATER","share":0.2815}],"total":3,"has_more":true,"next_cursor":"cur_UGFydG5lcnMuMXJ6ZzQ","query":{"id":"co_8f3k2m9x4p1q","role":"supplier","sort":"shipments","since":"2025-11-01","until":"2026-11-20","data_through":"2026-11-11"},"notice":null,"usage":{"unit":"trade_company","records":2,"already_paid":0,"cost":0.02,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/trade/companies/{id}/contacts":{"get":{"operationId":"trade_companies_contacts","summary":"Find contacts at a company","description":"Finds the people to approach at a company, each with a work email on the company's own domain that passed verification. Costs $0.03 for each contact returned; finding nobody is free. Sources are tried in a fixed order, cheapest first, and the search stops when there are `limit` contacts; it answers within about 20 seconds. Without filters it looks for purchasing and management first, which is whom a seller approaches; to reach a supplier ask for `department=sales`. When `query.resolution.exhausted` is true there is no point in asking again. Contacts need the company's website: when none is known and none can be confirmed, the list is empty and `notice` says so; pass the website as `domain` if you know it, or get its shared mailboxes with `GET /trade/companies/{id}?include=channels`.","tags":["trade"],"externalDocs":{"url":"https://won.dev/docs/trade/companies-contacts"},"x-mode":"waterfall","x-billing":"per result","parameters":[{"name":"id","in":"path","required":true,"description":"Company ID, such as `co_8f3k2m9x4p1q`. Search results carry it; `GET /trade/companies/lookup?q=` finds it by name.","schema":{"type":"string","maxLength":40},"example":"co_8f3k2m9x4p1q"},{"name":"seniority","in":"query","required":false,"description":"Only people of these levels: `owner`, `c_level`, `executive` (VP, director, head), `manager`, `senior` (a senior individual role, such as Senior Buyer), `staff` (any other role). Default: any level.","schema":{"default":[],"maxItems":6,"type":"array","items":{"type":"string","enum":["owner","c_level","executive","manager","senior","staff"]}},"style":"form","explode":false},{"name":"department","in":"query","required":false,"description":"Only people in these departments. Default: `purchasing` and `management` first, which is whom a seller approaches. To reach a supplier, ask for `sales`.","schema":{"default":[],"maxItems":11,"type":"array","items":{"type":"string","enum":["purchasing","sales","management","operations","marketing","finance","engineering","quality","it","hr","legal"]}},"example":["purchasing"],"style":"form","explode":false},{"name":"min_email_status","in":"query","required":false,"description":"`verified` (default) returns only mailboxes that were confirmed to exist. `risky` also returns addresses on domains that accept every address, which cannot be confirmed. Same price.","schema":{"default":"verified","type":"string","enum":["verified","risky"]}},{"name":"domain","in":"query","required":false,"description":"The company's website, such as `example.com`, when you know it and we do not. Contacts are only returned with an email on this domain.","schema":{"type":"string","maxLength":253}},{"name":"limit","in":"query","required":false,"description":"How many contacts to return, 1 to 25. You pay for the contacts returned.","schema":{"default":5,"type":"integer","minimum":1,"maximum":25},"example":1},{"name":"max_cost","in":"query","required":false,"description":"Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged.","schema":{"type":"number","exclusiveMinimum":0}},{"name":"dry_run","in":"query","required":false,"description":"If true, only return the maximum cost of this call. Nothing runs, nothing is charged.","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"The result. With `dry_run`, only the maximum cost.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Person ID, such as `per_4m7q2x9k1c8d`: the same in every endpoint for the same full name at the same company. Kept for your account for 90 days after it was last returned, with the email: pass it as `contact_id` to add the person to a campaign."},"name":{"description":"Full name.","type":["string","null"]},"title":{"description":"Job title.","type":["string","null"]},"seniority":{"anyOf":[{"type":"string","enum":["owner","c_level","executive","manager","senior","staff"]},{"type":"null"}],"description":"Level, read from the title."},"department":{"anyOf":[{"type":"string","enum":["purchasing","sales","management","operations","marketing","finance","engineering","quality","it","hr","legal"]},{"type":"null"}],"description":"Department, read from the title."},"email":{"type":"string","description":"Work email on the company's own domain."},"email_status":{"type":"string","enum":["verified","risky"],"description":"`verified`: the mailbox exists. `risky`: the domain accepts every address, so the mailbox cannot be confirmed."},"linkedin_url":{"description":"The person's LinkedIn profile, when known.","type":["string","null"]},"other_email":{"description":"Another email address listed for the person. Often on the company's domain too, but it can be a private address, and it is not verified.","type":["string","null"]},"phones":{"description":"Phone numbers listed for the person: a direct line, a mobile or the company's switchboard. Not verified.","type":"array","items":{"type":"string"}}},"required":["id","name","title","seniority","department","email","email_status","linkedin_url"],"additionalProperties":false},"description":"The best people to approach first."},"query":{"type":"object","properties":{"domain":{"description":"The website the contacts were looked for on: `domain` when it was given, otherwise the company's own. Null when none is known.","type":["string","null"]},"resolution":{"type":"object","properties":{"mode":{"type":"string","const":"waterfall"},"steps_tried":{"type":"integer","description":"How many sources were tried, in order, cheapest first."},"exhausted":{"type":"boolean","description":"True when every source was tried: asking again will not find more. False when the search stopped early (enough was found, a source did not answer, or time ran out), so asking again can find more."}},"required":["mode","steps_tried","exhausted"],"additionalProperties":false,"description":"How the result was found."}},"required":["domain","resolution"],"additionalProperties":{},"description":"The request as it was understood, with the website that was searched and how the contacts were found."},"notice":{"description":"A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"unit":{"type":"string","enum":["trade_record","trade_company","trade_company_profile","trade_lookup","person_email","company_channels","trade_stats","trade_official_stats","market_search","market_listings","market_estimates"],"description":"What is counted."},"records":{"type":"integer","description":"How many were returned and charged."},"already_paid":{"type":"integer","description":"How many more were returned for free, because this organization paid for them in the last 30 days."},"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["unit","records","already_paid","cost","balance","replayed"],"additionalProperties":false,"description":"What this call was charged, and the balance left."}},"required":["data","query","notice","usage"],"additionalProperties":false},{"$ref":"#/components/schemas/DryRun"}]},"example":{"data":[{"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"}],"query":{"id":"co_8f3k2m9x4p1q","department":["purchasing"],"domain":"northfield-home.example","min_email_status":"verified","limit":1,"resolution":{"mode":"waterfall","steps_tried":3,"exhausted":false}},"notice":null,"usage":{"unit":"person_email","records":1,"already_paid":0,"cost":0.03,"balance":48.05,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/trade/leads/find":{"post":{"operationId":"trade_leads_find","summary":"Find leads","description":"Returns buyers (`role: importer`) or suppliers (`role: exporter`) of a product together with a way to reach each one, in one call: it ranks the companies like `POST /trade/companies/search`, finds each one's website, and looks for the people to approach with a verified work email. You pay only for the leads returned: $0.01 for the company plus $0.03 for each contact, or $0.01 plus $0.02 for a lead that only has the shared mailboxes, phone numbers and messaging contacts of its website, such as a WhatsApp number, or for a company without a website, of the map listing and the social page that carry its name. Companies with no way to reach them are passed over and cost nothing. It walks the ranked list in order, looks at up to five times `limit` companies and works for up to 45 seconds; `query.scanned` says how many it looked at, `query.passed_over` why the ones without a lead gave none, and `next_cursor` continues after the last one. With `require: person_email` only companies with a contact are returned. At most 10 leads per call: page with `next_cursor` for more, or have `POST /tasks` find up to 500 in the background.","tags":["trade"],"externalDocs":{"url":"https://won.dev/docs/trade/leads-find"},"x-mode":"composite","x-billing":"per result","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["importer","exporter"],"description":"`importer` returns the companies that buy the product: buyers. `exporter` returns the companies that sell it: suppliers."},"hs_code":{"description":"HS code, digits only, 6 to 10 digits. Six digits are the same in every country; a longer code is one country's own tariff line, matched by prefix. Find the code of a product with `GET /trade/hs-codes`.","type":"string","maxLength":20},"product":{"type":"string","minLength":2,"maxLength":100,"description":"Product keywords in English, such as `office chair`. A fuzzy match on the goods description. Use it when you do not know the HS code; an `hs_code` is more precise."},"importer_country":{"description":"Country the goods are imported into: an ISO code such as `US`, or an English name such as `United States`.","type":"string","maxLength":80},"exporter_country":{"description":"Country the goods are exported from: an ISO code such as `VN`, or an English name such as `Vietnam`.","type":"string","maxLength":80},"trading_with":{"type":"string","minLength":2,"maxLength":200,"description":"Only companies that trade with this one: its `co_` ID, or its name. With `role: importer` these are the buyers of that exporter, with `role: exporter` the suppliers of that importer. Either way it is matched by its name as it stands in the records, so companies that share the name count together."},"exclude_forwarders":{"default":true,"description":"Leave out freight forwarders and logistics companies, which stand on bills of lading in place of the real buyer or seller.","type":"boolean"},"sort":{"default":"shipments","description":"`shipments` ranks by number of records. `recorded_value` ranks by declared value; only records that carry a value count, so it favors routes whose exporting country publishes values.","type":"string","enum":["shipments","recorded_value"]},"since":{"description":"First day of the date range, `YYYY-MM-DD`. Default: the first day of the month 12 months before `until`.","type":"string","maxLength":10},"until":{"description":"Last day of the date range, `YYYY-MM-DD`. Default: up to the latest records.","type":"string","maxLength":10},"seniority":{"default":[],"description":"Only people of these levels: `owner`, `c_level`, `executive` (VP, director, head), `manager`, `senior` (a senior individual role, such as Senior Buyer), `staff` (any other role). Default: any level.","maxItems":6,"type":"array","items":{"type":"string","enum":["owner","c_level","executive","manager","senior","staff"]}},"department":{"default":[],"description":"Only people in these departments. Default: `purchasing` and `management` first, which is whom a seller approaches. To reach a supplier, ask for `sales`.","maxItems":11,"type":"array","items":{"type":"string","enum":["purchasing","sales","management","operations","marketing","finance","engineering","quality","it","hr","legal"]}},"min_email_status":{"default":"verified","description":"`verified` (default) returns only mailboxes that were confirmed to exist. `risky` also returns addresses on domains that accept every address, which cannot be confirmed. Same price.","type":"string","enum":["verified","risky"]},"contacts_per_company":{"default":1,"description":"The most contacts to return for each company, 1 to 3.","type":"integer","minimum":1,"maximum":3},"require":{"default":"any_contact","description":"`any_contact` (default): every lead has the best way to reach the company that was found, a person's email if there is one, otherwise the shared mailboxes, phone numbers and messaging contacts of its website. `person_email`: only companies where a person with a verified email was found.","type":"string","enum":["any_contact","person_email"]},"limit":{"default":5,"description":"How many results to return, 1 to 10. You pay for the results returned.","type":"integer","minimum":1,"maximum":10},"cursor":{"description":"To get the next page, pass `next_cursor` of the previous response back unchanged, with the same parameters.","type":"string","maxLength":200},"max_cost":{"description":"Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged.","type":"number","exclusiveMinimum":0},"dry_run":{"default":false,"description":"If true, only return the maximum cost of this call. Nothing runs, nothing is charged.","type":"boolean"}},"required":["role"],"additionalProperties":false},"example":{"role":"importer","hs_code":"940161","importer_country":"US","limit":2}}}},"responses":{"200":{"description":"The result. With `dry_run`, only the maximum cost.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"company":{"type":"object","properties":{"id":{"type":"string","description":"Company ID, such as `co_8f3k2m9x4p1q`."},"name":{"type":"string","description":"Name as written on shipping documents."},"country":{"anyOf":[{"type":"string","description":"ISO 3166-1 alpha-2 country code, such as `US`."},{"type":"null"}],"description":"Country the company imports into or exports from in these records."},"shipments":{"type":"integer","description":"Number of shipment records. A count of records, not a market share: countries that publish every declaration are over-represented."},"recorded_value_usd":{"description":"Sum of the declared values of the records that have one, in US dollars. A lower bound: US bills of lading carry no value.","type":["number","null"]},"website":{"description":"Bare domain, such as `example.com`. Often null.","type":["string","null"]}},"required":["id","name","country","shipments","recorded_value_usd","website"],"additionalProperties":false,"description":"The buyer or supplier, as in the company search."},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Person ID, such as `per_4m7q2x9k1c8d`: the same in every endpoint for the same full name at the same company. Kept for your account for 90 days after it was last returned, with the email: pass it as `contact_id` to add the person to a campaign."},"name":{"description":"Full name.","type":["string","null"]},"title":{"description":"Job title.","type":["string","null"]},"seniority":{"anyOf":[{"type":"string","enum":["owner","c_level","executive","manager","senior","staff"]},{"type":"null"}],"description":"Level, read from the title."},"department":{"anyOf":[{"type":"string","enum":["purchasing","sales","management","operations","marketing","finance","engineering","quality","it","hr","legal"]},{"type":"null"}],"description":"Department, read from the title."},"email":{"type":"string","description":"Work email on the company's own domain."},"email_status":{"type":"string","enum":["verified","risky"],"description":"`verified`: the mailbox exists. `risky`: the domain accepts every address, so the mailbox cannot be confirmed."},"linkedin_url":{"description":"The person's LinkedIn profile, when known.","type":["string","null"]},"other_email":{"description":"Another email address listed for the person. Often on the company's domain too, but it can be a private address, and it is not verified.","type":["string","null"]},"phones":{"description":"Phone numbers listed for the person: a direct line, a mobile or the company's switchboard. Not verified.","type":"array","items":{"type":"string"}}},"required":["id","name","title","seniority","department","email","email_status","linkedin_url"],"additionalProperties":false},"description":"People to approach, each with a verified work email. Empty when none was found."},"channels":{"anyOf":[{"type":"object","properties":{"emails":{"type":"array","items":{"type":"string"},"description":"Shared addresses such as `info@` and `sales@`."},"phones":{"type":"array","items":{"type":"string"},"description":"Phone numbers the company publishes: in E.164, such as `+4952112340`, when the country can be told, else as printed. Fax numbers are left out."},"messaging":{"type":"array","items":{"type":"object","properties":{"app":{"type":"string","enum":["whatsapp","wechat","zalo","line","skype","telegram"]},"value":{"type":"string","description":"A number in E.164 for WhatsApp, else the ID or number as printed."}},"required":["app","value"],"additionalProperties":false},"description":"WhatsApp, WeChat, Zalo, LINE, Skype and Telegram contacts the company gives."},"social":{"type":"object","properties":{"linkedin":{"type":["string","null"]},"facebook":{"type":["string","null"]},"twitter":{"type":["string","null"]},"instagram":{"type":["string","null"]},"youtube":{"type":["string","null"]},"tiktok":{"type":["string","null"]},"pinterest":{"type":["string","null"]}},"required":["linkedin","facebook","twitter","instagram","youtube","tiktok","pinterest"],"additionalProperties":false,"description":"Links to its public pages. Null where none is known."}},"required":["emails","phones","messaging","social"],"additionalProperties":false},{"type":"null"}],"description":"The shared mailboxes, phone numbers, messaging contacts and social pages on the company's website, or for a company without one, on the map listing and the social page that carry its name, when no person was found. Null when `contacts` has someone."}},"required":["company","contacts","channels"],"additionalProperties":false},"description":"The leads, in the order of the ranked list."},"total":{"type":"integer","description":"How many companies the ranked list has in all."},"has_more":{"type":"boolean","description":"Whether the ranked list goes on after the last company looked at."},"next_cursor":{"description":"Pass it as `cursor` to go on after the last company that was looked at.","type":["string","null"]},"query":{"type":"object","properties":{"data_through":{"description":"Date of the latest record this query can see, `YYYY-MM-DD`. Records arrive weeks after a shipment, so recent months are incomplete.","type":["string","null"]},"scanned":{"type":"integer","description":"How many companies of the ranked list were looked at for this page."},"passed_over":{"type":"object","properties":{"no_website":{"type":"integer","description":"No website is known, so nobody could be looked for."},"nobody":{"type":"integer","description":"Every contact source was asked and none had anyone to approach."},"incomplete":{"type":"integer","description":"A contact source did not answer, or time ran out before every source was asked. Asking again later may find someone there."}},"required":["no_website","nobody","incomplete"],"additionalProperties":false,"description":"Why the companies that were looked at without a lead were passed over."}},"required":["data_through","scanned","passed_over"],"additionalProperties":{},"description":"The request as it was understood, with the default dates filled in. `scanned` says how many companies were looked at for this page, `passed_over` why the ones without a lead gave none, and `data_through` how recent the records are."},"notice":{"description":"A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"breakdown":{"type":"array","items":{"type":"object","properties":{"unit":{"type":"string","enum":["trade_record","trade_company","trade_company_profile","trade_lookup","person_email","company_channels","trade_stats","trade_official_stats","market_search","market_listings","market_estimates"],"description":"What is counted."},"records":{"type":"integer","description":"How many were returned and charged."},"already_paid":{"type":"integer","description":"How many more were returned for free, because this organization paid for them in the last 30 days."},"cost":{"type":"number","description":"What they cost, in US dollars."}},"required":["unit","records","already_paid","cost"],"additionalProperties":false},"description":"Every billing unit that came back, charged or not. Empty when nothing did."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","breakdown","balance","replayed"],"additionalProperties":false,"description":"What this call was charged, and the balance left."}},"required":["data","total","has_more","next_cursor","query","notice","usage"],"additionalProperties":false},{"$ref":"#/components/schemas/DryRun"}]},"example":{"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},{"company":{"id":"co_3d9t6w1b7n5z","name":"SAMPLE HARBORSIDE SEATING CO","country":"US","shipments":962,"recorded_value_usd":9310772.15,"website":"harborside-seating.example"},"contacts":[],"channels":{"emails":["info@harborside-seating.example","sales@harborside-seating.example"],"phones":["+15550100142"],"messaging":[{"app":"whatsapp","value":"+15550100142"}],"social":{"linkedin":"https://www.linkedin.com/company/harborside-seating","facebook":null,"twitter":null,"instagram":null,"youtube":null,"tiktok":null,"pinterest":null}}}],"total":4087,"has_more":true,"next_cursor":"cur_TGVhZHMtMi4xcnpnNA","query":{"role":"importer","hs_code":"940161","importer_country":"US","exclude_forwarders":true,"sort":"shipments","since":"2025-11-01","until":"2026-11-20","min_email_status":"verified","contacts_per_company":1,"require":"any_contact","limit":2,"scanned":2,"passed_over":{"no_website":0,"nobody":0,"incomplete":0},"data_through":"2026-11-11"},"notice":null,"usage":{"cost":0.07,"breakdown":[{"unit":"trade_company","records":2,"already_paid":0,"cost":0.02},{"unit":"person_email","records":1,"already_paid":0,"cost":0.03},{"unit":"company_channels","records":1,"already_paid":0,"cost":0.02}],"balance":48.01,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/trade/stats/query":{"post":{"operationId":"trade_stats_query","summary":"Get market statistics","description":"Sizes a market and shows where it is and how it moves: totals, the countries on both sides and a month-by-month series, for a product or for one company. The answer keeps two kinds of numbers apart. `records` counts our shipment records and sums their declared values: good for trends and for one company's buying rhythm, but not a market total, because coverage differs by country and US bills of lading carry no value. `official` is what the statistics offices publish: use it for market size and country shares. It exists when an `hs_code` is given and the query names the importing or the exporting country, for more than 200 countries and territories: the country's own statistics where it publishes them, and otherwise what its partners report about their trade with it, marked `mirror`. It trails the current month by about two months for the United States, the EU and the United Kingdom, and often by longer elsewhere. `coverage.recorded_value_share` says how much of the official value the recorded values stand for. Costs $0.10 for a query with results, or $0.02 when only `official` is asked for or found; no result is free. Months marked `partial` are still filling up: do not read them as a drop. The range can span up to 36 months.","tags":["trade"],"externalDocs":{"url":"https://won.dev/docs/trade/stats-query"},"x-mode":"merge","x-billing":"per result","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hs_code":{"description":"HS code, digits only. 6 to 10 digits for shipment records. Official statistics alone (`basis: [\"official\"]`) also take a 2-digit chapter or a 4-digit heading, such as `9401`.","type":"string","maxLength":20},"product":{"type":"string","minLength":2,"maxLength":100,"description":"Product keywords in English, such as `office chair`. A fuzzy match on the goods description. Use it when you do not know the HS code; an `hs_code` is more precise."},"company":{"type":"string","minLength":2,"maxLength":200,"description":"Only the records of this company: its `co_` ID, or its name. Shows what one buyer or seller trades over time. Needs `role`. An ID with no `hs_code`, `product` or country, over the last 12 months (the default range), counts the company itself by its ID. Otherwise it is matched by its name as it stands in the records, so companies that share the name count together. `records.company_match` says which. Official statistics do not exist by company."},"role":{"description":"With `company`: count what it imports, or what it exports.","type":"string","enum":["importer","exporter"]},"importer_country":{"description":"Country the goods are imported into: an ISO code such as `US`, or an English name such as `United States`. `EU` is the European Union as a whole, in official statistics only.","type":"string","maxLength":80},"exporter_country":{"description":"Country the goods are exported from: an ISO code such as `VN`, or an English name such as `Vietnam`. `EU` is the European Union as a whole, in official statistics only.","type":"string","maxLength":80},"since":{"description":"First day of the date range, `YYYY-MM-DD`. Default: the first day of the month 12 months before `until`.","type":"string","maxLength":10},"until":{"description":"Last day of the date range, `YYYY-MM-DD`. Default: up to the latest records.","type":"string","maxLength":10},"basis":{"default":["records","official"],"description":"Which numbers to return. Default: both. `official` alone is cheaper and answers from official statistics only.","minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["records","official"]}},"top":{"default":20,"description":"How many countries each breakdown lists, 1 to 50.","type":"integer","minimum":1,"maximum":50},"max_cost":{"description":"Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged.","type":"number","exclusiveMinimum":0},"dry_run":{"default":false,"description":"If true, only return the maximum cost of this call. Nothing runs, nothing is charged.","type":"boolean"}},"required":[],"additionalProperties":false},"example":{"hs_code":"940161","importer_country":"US"}}}},"responses":{"200":{"description":"The result. With `dry_run`, only the maximum cost.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"type":"object","properties":{"records":{"anyOf":[{"type":"object","properties":{"shipments":{"type":"integer","description":"Number of shipment records. A count of records, not a market share: countries that publish every declaration are over-represented."},"recorded_value_usd":{"description":"Sum of the declared values of the records that have one, in US dollars. A lower bound: US bills of lading carry no value.","type":["number","null"]},"by_importer_country":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code, such as `US`."},"shipments":{"type":"integer","description":"Number of shipment records. A count of records, not a market share: countries that publish every declaration are over-represented."}},"required":["country","shipments"],"additionalProperties":false}},{"type":"null"}],"description":"Records by importing country, largest first. Null when it could not be loaded."},"by_exporter_country":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code, such as `US`."},"shipments":{"type":"integer","description":"Number of shipment records. A count of records, not a market share: countries that publish every declaration are over-represented."}},"required":["country","shipments"],"additionalProperties":false}},{"type":"null"}],"description":"Records by exporting country, largest first. Null when it could not be loaded."},"by_month":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string","description":"`YYYY-MM`"},"shipments":{"type":"integer","description":"Shipment records of the month."},"recorded_value_usd":{"description":"Declared value of the month's records that have one, in US dollars.","type":["number","null"]},"partial":{"type":"boolean","description":"True when the month is not complete yet. Do not read it as a drop."}},"required":["month","shipments","recorded_value_usd","partial"],"additionalProperties":false},"description":"One entry for each month of the range, oldest first."},"company_match":{"description":"With `company`: how its records were found. `id` counts the company itself, by its ID, over the last 12 months. `name` matches its name as it stands in the records, so companies that share the name count together.","type":"string","enum":["id","name"]}},"required":["shipments","recorded_value_usd","by_importer_country","by_exporter_country","by_month"],"additionalProperties":false},{"type":"null"}],"description":"Counts and declared values of our shipment records. Not official trade totals."},"official":{"anyOf":[{"type":"object","properties":{"reporter":{"type":"string","description":"Country whose statistics these are, or `EU`."},"flow":{"type":"string","enum":["import","export"],"description":"Whether these are the reporter's imports or its exports."},"period":{"type":"object","properties":{"since":{"type":"string","description":"`YYYY-MM`"},"until":{"type":"string","description":"`YYYY-MM`"}},"required":["since","until"],"additionalProperties":false,"description":"The first and the last month the numbers cover."},"value_usd":{"type":"number","description":"Trade value of the period, in US dollars."},"value_basis":{"type":"string","enum":["customs","cif","fob"],"description":"How `value_usd` is valued: customs value, cost-insurance-freight or free on board."},"cif_value_usd":{"description":"For US imports: the value including insurance and freight.","type":["number","null"]},"quantity":{"description":"Quantity of the period, where the office measures one in a single unit for every partner and month. Left out otherwise.","type":["number","null"]},"quantity_unit":{"description":"Unit of `quantity`: `u` items, `kg`, `l`, `m2`, `pairs` and so on.","type":["string","null"]},"unit_value_usd":{"description":"`value_usd` divided by `quantity`: the average price of one unit.","type":["number","null"]},"by_partner_country":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code, such as `US`."},"value_usd":{"type":"number","description":"Trade value with this country, in US dollars."},"share":{"type":"number","description":"This country's part of everything the reporter imports or exports of the product in the period, from 0 to 1."}},"required":["country","value_usd","share"],"additionalProperties":false},"description":"The partner countries, largest first."},"by_month":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string","description":"`YYYY-MM`"},"value_usd":{"type":"number","description":"Trade value of the month, in US dollars."},"partial":{"description":"True while more partners can still add their numbers for the month. Do not read it as a drop.","type":"boolean"}},"required":["month","value_usd"],"additionalProperties":false},"description":"One entry for each published month, oldest first."},"missing_months":{"description":"Months inside `period` the office published nothing for, of any product: they are missing from `by_month` and from `value_usd`, not months without trade. Left out when none are.","type":"array","items":{"type":"string"}},"stopped_reporting":{"description":"With `mirror`: partners whose numbers stop for six months or more while the others go on, most likely because they have published nothing since, or publish late. The months after their `last_month` look lower than the trade was. Left out when none did.","type":"array","items":{"type":"object","properties":{"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code, such as `US`."},"last_month":{"type":"string","description":"The last month with its numbers, `YYYY-MM`."},"share":{"type":"number","description":"Its part of `value_usd`, from 0 to 1, all of it from before it stopped."}},"required":["country","last_month","share"],"additionalProperties":false}},"mirror":{"description":"True when the reporter publishes no recent statistics of its own and these numbers add up what its partners report about their trade with it: their imports from it at CIF for its exports, their exports to it at FOB for its imports. Partners that publish nothing are missing, so it is a lower bound.","type":"boolean"},"source":{"type":"string","const":"official_statistics","description":"Marks these numbers as official statistics."}},"required":["reporter","flow","period","value_usd","value_basis","by_partner_country","by_month","source"],"additionalProperties":false},{"type":"null"}],"description":"Official trade statistics. Use these for market size and country shares."},"coverage":{"type":"object","properties":{"recorded_value_share":{"description":"Recorded value divided by the official value for the same months. Shows how much of real trade the recorded values stand for.","type":["number","null"]}},"required":["recorded_value_share"],"additionalProperties":false,"description":"How the two kinds of numbers compare."}},"required":["records","official","coverage"],"additionalProperties":false,"description":"The statistics, one part for each kind of number."},"query":{"type":"object","properties":{"data_through":{"description":"Date of the latest record this query can see, `YYYY-MM-DD`. Records arrive weeks after a shipment, so recent months are incomplete.","type":["string","null"]}},"required":["data_through"],"additionalProperties":{},"description":"The request as it was understood: country names as codes, the default dates filled in. `data_through` says how recent the records behind the answer are."},"notice":{"description":"A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"unit":{"type":"string","enum":["trade_record","trade_company","trade_company_profile","trade_lookup","person_email","company_channels","trade_stats","trade_official_stats","market_search","market_listings","market_estimates"],"description":"What is counted."},"records":{"type":"integer","description":"How many were returned and charged."},"already_paid":{"type":"integer","description":"How many more were returned for free, because this organization paid for them in the last 30 days."},"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["unit","records","already_paid","cost","balance","replayed"],"additionalProperties":false,"description":"What this call was charged, and the balance left."}},"required":["data","query","notice","usage"],"additionalProperties":false},{"$ref":"#/components/schemas/DryRun"}]},"example":{"data":{"records":{"shipments":1165783,"recorded_value_usd":2620186000,"by_importer_country":[{"country":"US","shipments":1021440}],"by_exporter_country":[{"country":"VN","shipments":932019},{"country":"MY","shipments":104871},{"country":"MX","shipments":58330}],"by_month":[{"month":"2026-07","shipments":118420,"recorded_value_usd":251340118.2,"partial":false},{"month":"2026-08","shipments":121077,"recorded_value_usd":259871402.75,"partial":false},{"month":"2026-09","shipments":126295,"recorded_value_usd":270019576.35,"partial":false},{"month":"2026-10","shipments":98114,"recorded_value_usd":204118330.1,"partial":true},{"month":"2026-11","shipments":5526,"recorded_value_usd":3393700.19,"partial":true}]},"official":{"reporter":"US","flow":"import","period":{"since":"2025-11","until":"2026-09"},"value_usd":4813000000,"value_basis":"customs","cif_value_usd":5102000000,"by_partner_country":[{"country":"VN","value_usd":2888000000,"share":0.6},{"country":"MX","value_usd":722000000,"share":0.15},{"country":"CN","value_usd":481000000,"share":0.1}],"by_month":[{"month":"2026-07","value_usd":428000000},{"month":"2026-08","value_usd":417000000},{"month":"2026-09","value_usd":401000000}],"source":"official_statistics"},"coverage":{"recorded_value_share":0.6321}},"query":{"hs_code":"940161","importer_country":"US","since":"2025-11-01","until":"2026-11-20","basis":["records","official"],"top":20,"data_through":"2026-11-11"},"notice":null,"usage":{"unit":"trade_stats","records":1,"already_paid":0,"cost":0.1,"balance":47.98,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/trade/markets/brief":{"post":{"operationId":"trade_markets_brief","summary":"Brief a market","description":"Shows the demand for a product in up to 10 countries, from what they import, what people search for and what they buy. `official` is what the statistics offices publish about each country's imports of the HS code: the last 12 months against the 12 before, where the goods come from, and each month of two years. Where the country publishes nothing recent itself, it adds up what its partners report; a partner that stopped reporting and a month that was not published are named, and `comparable_change_12m` leaves stopped partners out of both years, so missing numbers do not read as a fall. `shipments`, when asked for, is our shipment records of the last 12 months and how much of the official value they see, to tell where importers can be found; for a country our records have few months of, it counts the country's own import declarations instead, without values or origins (`counts_only`). `search` is the monthly searches on Google of the words people use for the product, in the country's own languages: the last 12 months with the peak and the low month, the terms by share, and, for many countries, several years of the main terms, to tell a trend from a season. Without `terms`, the terms are found for you; `data.terms` lists them. `marketplace` is the first page of the country's Amazon store for `product`: the price range in the local currency, what the listings say about sales in the past month, and the listings that sell the most. `estimates`, when asked for, is the market sizes that market research pages publish for the product in the country, each with its link, in US dollars, and held against the country's imports and exports of the HS code: a size more than 10 times the imports of a country that keeps most of them, or under a fifth of them, is marked, and sizes of the same market more than 3 times apart are a `conflict`. Without `hs_code`, the six-digit code whose description best matches `product` is used, and `data.hs_code` says which, with the other codes that match nearly as well in `alternatives`. Costs $0.10 for each country with shipment records, or $0.02 for one with official statistics or shipment counts only, $0.15 for each country with search data, $0.03 for each country with listings and $0.05 for each country with market sizes; a country with nothing found is free, and the same searches of the same terms, a store page that has not changed, or the same market sizes, are free again for 30 days. Searches are a measure of interest, not of sales, and `bought_last_month` is a floor from the first page only. It takes up to about a minute and a half. Next: `POST /trade/companies/search` with the `hs_code` and a country for its importers.","tags":["trade"],"externalDocs":{"url":"https://won.dev/docs/trade/markets-brief"},"x-mode":"waterfall","x-billing":"per result","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"product":{"type":"string","minLength":2,"maxLength":80,"description":"The product in English, such as `ice machine`. The marketplaces are searched for it, and the search terms people use for it are found from it."},"hs_code":{"description":"The HS code of `official` and `shipments`, and of the trade `estimates` are held against, 6 to 10 digits, such as `841869`. Official statistics use its first six digits. Default: the six-digit code whose description best matches `product`.","type":"string","maxLength":20},"countries":{"description":"The countries to brief, 1 to 10. Each one is charged on its own.","minItems":1,"maxItems":10,"type":"array","items":{"description":"A country to brief. An ISO code such as `US`, or an English name such as `United States`.","type":"string","maxLength":80}},"terms":{"description":"Your own search terms, in any language and script, such as `[\"ice machine\", \"ماكينة ثلج\"]`, up to 30. Default: `product` and the terms people in these countries use for it.","minItems":1,"maxItems":30,"type":"array","items":{"type":"string","minLength":2,"maxLength":80}},"sections":{"default":["official","search","marketplace"],"description":"Which parts to return. Default: `official`, `search` and `marketplace`. Add `shipments` for our shipment records, which show where importers can be found, and `estimates` for the market sizes web pages publish.","minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["official","shipments","search","marketplace","estimates"]}},"marketplace_query":{"description":"What to search the marketplaces for, when it is not `product`, such as a narrower `ice maker 15 kg`.","type":"string","minLength":2,"maxLength":100},"max_cost":{"description":"Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged.","type":"number","exclusiveMinimum":0},"dry_run":{"default":false,"description":"If true, only return the maximum cost of this call. Nothing runs, nothing is charged.","type":"boolean"}},"required":["product","countries"],"additionalProperties":false},"example":{"product":"ice machine","countries":["SA"],"sections":["official","shipments","search","marketplace","estimates"]}}}},"responses":{"200":{"description":"The result. With `dry_run`, only the maximum cost.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"type":"object","properties":{"product":{"type":"string"},"hs_code":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"},"origin":{"type":"string","enum":["given","matched"],"description":"`given`: the `hs_code` asked for. `matched`: the HS code whose description best matches `product`; pass `hs_code` when it is not the right one."},"alternatives":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"}},"required":["code","description"],"additionalProperties":false},"description":"Other six-digit codes that match `product` nearly as well, best first: check them before reading the numbers, and pass one as `hs_code` when it fits better. Empty when `hs_code` was given."}},"required":["code","description","origin","alternatives"],"additionalProperties":false},{"type":"null"}],"description":"The HS code of `official` and `shipments`, and of the trade `estimates` are held against. Null when none of them is asked for, or no HS code matches `product`."},"terms":{"type":"array","items":{"type":"object","properties":{"term":{"type":"string"},"language":{"description":"ISO 639-1 code of the term's language, such as `ar`, when known.","type":["string","null"]}},"required":["term","language"],"additionalProperties":false},"description":"The search terms that were asked: `terms` as given, or the ones suggested for the product."},"countries":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","description":"ISO code."},"official":{"anyOf":[{"type":"object","properties":{"basis":{"type":"string","enum":["own","partners"],"description":"`own`: the country's own statistics. `partners`: what its partners report about their exports to it, because it publishes no recent statistics of its own. Partners that publish nothing are missing, so it is a lower bound."},"value_basis":{"type":"string","enum":["customs","cif","fob"],"description":"How the values are valued: customs value, cost-insurance-freight or free on board."},"period":{"type":"object","properties":{"since":{"type":"string","description":"`YYYY-MM`"},"until":{"type":"string","description":"`YYYY-MM`"}},"required":["since","until"],"additionalProperties":false,"description":"The first and the last month the numbers cover."},"imports_12m_usd":{"type":"number","description":"Imports of the 12 months up to `period.until`, in US dollars. A month in `missing_months` adds nothing."},"prior_12m_usd":{"description":"Imports of the 12 months before those. Null when they are not all published, or a month of either year is missing.","type":["number","null"]},"change_12m":{"description":"`imports_12m_usd` over `prior_12m_usd`, minus 1: `-0.3` is 30% less.","type":["number","null"]},"comparable_change_12m":{"description":"With `stopped_reporting`: the same change without those partners in either year, which is the change of the trade reported all along. Read it instead of `change_12m`.","type":["number","null"]},"partial_months":{"type":"integer","description":"How many of the last 12 months are still filling up as late reports arrive. While they are, `change_12m` reads lower than it will be."},"top_origins":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","description":"ISO code."},"value_usd":{"type":"number"},"share":{"type":"number","description":"Its part of all imports of `period`, 0 to 1."}},"required":["country","value_usd","share"],"additionalProperties":false},"description":"Up to 5 countries the imports come from, largest first, over `period`."},"by_month":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string","description":"`YYYY-MM`"},"value_usd":{"type":"number"},"partial":{"description":"True while late reports can still add to it.","type":"boolean"}},"required":["month","value_usd"],"additionalProperties":false},"description":"Imports of each published month, oldest first."},"missing_months":{"description":"Months the country published no statistics for at all: missing, not months without trade.","type":"array","items":{"type":"string","description":"`YYYY-MM`"}},"stopped_reporting":{"description":"With `partners`: partners whose numbers stop while the others go on, most likely because they have published nothing since, or publish late. The months after look lower than the trade was.","type":"array","items":{"type":"object","properties":{"country":{"type":"string","description":"ISO code."},"last_month":{"type":"string","description":"The last month with its numbers."},"share":{"type":"number","description":"Its part of all imports of `period`, 0 to 1."}},"required":["country","last_month","share"],"additionalProperties":false}}},"required":["basis","value_basis","period","imports_12m_usd","prior_12m_usd","change_12m","partial_months","top_origins","by_month"],"additionalProperties":false},{"type":"null"}],"description":"What the statistics offices publish about the country's imports of the HS code. Null when not asked for, without an HS code, or when nothing is published."},"shipments":{"anyOf":[{"type":"object","properties":{"basis":{"type":"string","enum":["own","partners"],"description":"`own`: records declared in the country. `partners`: the country declares none, so these are the export records of its partners that name it, and they are incomplete."},"period":{"type":"object","properties":{"since":{"type":"string","description":"`YYYY-MM`"},"until":{"type":"string","description":"`YYYY-MM`"}},"required":["since","until"],"additionalProperties":false,"description":"The first and the last month the numbers cover."},"shipments":{"type":"integer","description":"Shipment records of the country's imports in `period`."},"recorded_value_usd":{"description":"Declared value of the records that have one, in US dollars.","type":["number","null"]},"value_share":{"description":"Recorded value over the official imports of the same months: how much of the trade the records see. Null without both.","type":["number","null"]},"top_origins":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","description":"ISO code."},"shipments":{"type":"integer"}},"required":["country","shipments"],"additionalProperties":false},"description":"Up to 5 countries the recorded shipments come from, most first. Empty with `counts_only`."},"by_month":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string","description":"`YYYY-MM`"},"shipments":{"type":"integer"}},"required":["month","shipments"],"additionalProperties":false},"description":"Each month of `period`. Where the records stop rather than the trade, `notice` says so."},"counts_only":{"type":"boolean","description":"True when the records are the country's own declarations, counted without being read, because our main records have few months of them: then there are no values and no origins."}},"required":["basis","period","shipments","recorded_value_usd","value_share","top_origins","by_month","counts_only"],"additionalProperties":false},{"type":"null"}],"description":"Shipment records of the country's imports of the HS code in the 12 whole months before this one. Null when not asked for, without an HS code, or when there are none."},"search":{"anyOf":[{"type":"object","properties":{"searches_12m":{"type":"integer","description":"Searches of the last 12 months, all terms together. A term that is a close variant of another is counted once."},"by_month":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string","description":"`YYYY-MM`"},"searches":{"type":"integer"}},"required":["month","searches"],"additionalProperties":false},"description":"Searches of each of the last 12 months, all terms together, oldest first."},"peak_month":{"type":"string","description":"The month with the most searches, `YYYY-MM`."},"low_month":{"type":"string","description":"The month with the fewest searches, `YYYY-MM`."},"peak_to_low":{"description":"Searches of the peak month over those of the low month: 1 is no season, 3 is a strong one. Null when the low month had none.","type":["number","null"]},"terms":{"type":"array","items":{"type":"object","properties":{"term":{"type":"string"},"searches_12m":{"type":"integer"},"share":{"type":"number","description":"Its part of `searches_12m`, 0 to 1."},"variants":{"type":"array","items":{"type":"string"},"description":"Other terms asked that the search engine counts as this one, with the same numbers. They are not counted again."}},"required":["term","searches_12m","share","variants"],"additionalProperties":false},"description":"The terms people searched, most searched first. Terms nobody searched are left out."},"history":{"anyOf":[{"type":"object","properties":{"terms":{"type":"array","items":{"type":"string"},"description":"The most searched terms, which the history adds up."},"by_year":{"type":"array","items":{"type":"object","properties":{"year":{"type":"integer"},"searches":{"type":"integer"},"complete":{"type":"boolean","description":"False when the year has fewer than 12 months of data."}},"required":["year","searches","complete"],"additionalProperties":false},"description":"Searches of each year, oldest first."},"change_12m":{"description":"Searches of the last 12 months over the 12 before, minus 1: `-0.28` is 28% fewer. Null without two full years.","type":["number","null"]}},"required":["terms","by_year","change_12m"],"additionalProperties":false},{"type":"null"}],"description":"Several years of searches of the main terms, to tell a trend from a season. Null where no history is kept for the country."},"data_through":{"type":"string","description":"The last month of the numbers, `YYYY-MM`."}},"required":["searches_12m","by_month","peak_month","low_month","peak_to_low","terms","history","data_through"],"additionalProperties":false},{"type":"null"}],"description":"What people search for. Null when not asked for, or when nothing was found."},"marketplace":{"anyOf":[{"type":"object","properties":{"store":{"type":"string","description":"The country's store that answered, such as `amazon.sa`."},"query":{"type":"string","description":"What the store was searched for."},"results":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"How many products the store lists for the query in all, when it says."},"read":{"type":"integer","description":"How many listings of the first page were read."},"price":{"anyOf":[{"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 code of the prices."},"median":{"type":"number"},"p25":{"type":"number","description":"A quarter of the listings cost less than this."},"p75":{"type":"number","description":"A quarter of the listings cost more than this."},"median_usd":{"description":"The median in US dollars: at the peg for a currency pegged to the dollar, otherwise at the latest monthly average rate. Null when no rate is published for the currency.","type":["number","null"]},"listings":{"type":"integer","description":"How many listings the prices are from."},"left_out":{"type":"integer","description":"Listings priced under a quarter of the median of all, left out as likely accessories or parts."}},"required":["currency","median","p25","p75","median_usd","listings","left_out"],"additionalProperties":false},{"type":"null"}],"description":"The price range of the listings. Null when fewer than 3 show a price."},"bought_last_month":{"anyOf":[{"type":"object","properties":{"at_least":{"type":"integer","description":"The counts the store prints, added up: a floor, not a total."},"listings":{"type":"integer","description":"How many listings say how many were bought."}},"required":["at_least","listings"],"additionalProperties":false},{"type":"null"}],"description":"What the listings of the first page say about recent sales. Null when none say."},"top":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"price":{"description":"The price, in `currency`.","type":["number","null"]},"currency":{"description":"ISO 4217 code.","type":["string","null"]},"ratings":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"How many ratings it has."},"bought_last_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"At least this many were bought in the past month, as the store says. Null when it does not."},"url":{"type":["string","null"]}},"required":["title","price","currency","ratings","bought_last_month","url"],"additionalProperties":false},"description":"Up to 5 listings that sell the most, by recent sales and then by ratings."}},"required":["store","query","results","read","price","bought_last_month","top"],"additionalProperties":false},{"type":"null"}],"description":"What the country's main marketplace sells. Null when not asked for, when the country has no store we read, or when it listed nothing."},"estimates":{"anyOf":[{"type":"object","properties":{"figures":{"type":"array","items":{"type":"object","properties":{"figure":{"type":"string","description":"The size as the page writes it, such as `USD 101.25 million`."},"value_usd":{"description":"The size in US dollars, the middle of a range. Null for a currency we do not convert.","type":["number","null"]},"year":{"type":"integer","description":"The year the size is for."},"market":{"type":"string","description":"The market it is the size of, as the page names it."},"scope":{"anyOf":[{"type":"string","enum":["same","wider","narrower"]},{"type":"null"}],"description":"Its market against `product`: `same`, a `wider` one that includes it, or a `narrower` part of it. Null when it cannot be told."},"publisher":{"description":"Who published the size, such as a research firm. Null when the page does not say.","type":["string","null"]},"url":{"type":"string","description":"The page that gives it."},"times_imports":{"description":"`value_usd` over `imports_usd`. Null without both.","type":["number","null"]},"check":{"type":"string","enum":["consistent","too_high","too_low","unchecked"],"description":"Against the country's trade. `consistent`: between a fifth of its imports and 10 times them, or a `wider` market above that, or a `narrower` one below. `too_high` or `too_low`: outside that, in a country that exports under half of what it imports, so most imports stay and its market cannot be far from them. `unchecked`: outside that where the country exports more, so much may be made there or passed on, or where its trade or the value is not known."}},"required":["figure","value_usd","year","market","scope","publisher","url","times_imports","check"],"additionalProperties":false},"description":"Market sizes that market research pages publish for the product in the country, of the last 5 years, most recent first. Each is unverified: one page's number, which `check` holds against trade."},"imports_usd":{"description":"A year of the country's official imports of the HS code, which the sizes are held against: the larger of the latest 12 months and the 12 before, since the latest months of many countries fill up late. Null without an HS code or statistics.","type":["number","null"]},"exports_usd":{"description":"A year of its official exports of the HS code, the larger of the same two, asked for only when a size is far from the imports, to tell whether most imports stay. Null otherwise, or when not known.","type":["number","null"]},"agreement":{"anyOf":[{"type":"string","enum":["close","conflict"]},{"type":"null"}],"description":"Of the figures for the `same` market that are not `too_high` or `too_low`: `close` when the largest is at most 3 times the smallest, `conflict` when it is more. Null with fewer than two."}},"required":["figures","imports_usd","exports_usd","agreement"],"additionalProperties":false},{"type":"null"}],"description":"Market sizes that web pages publish, held against the country's trade. Null when not asked for, or when none was found."}},"required":["country","official","shipments","search","marketplace","estimates"],"additionalProperties":false},"description":"One entry for each country, in the order asked."}},"required":["product","hs_code","terms","countries"],"additionalProperties":false,"description":"The brief, one entry for each country."},"query":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The request as it was understood: country names as codes, the default dates filled in."},"notice":{"description":"A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"breakdown":{"type":"array","items":{"type":"object","properties":{"unit":{"type":"string","enum":["trade_record","trade_company","trade_company_profile","trade_lookup","person_email","company_channels","trade_stats","trade_official_stats","market_search","market_listings","market_estimates"],"description":"What is counted."},"records":{"type":"integer","description":"How many were returned and charged."},"already_paid":{"type":"integer","description":"How many more were returned for free, because this organization paid for them in the last 30 days."},"cost":{"type":"number","description":"What they cost, in US dollars."}},"required":["unit","records","already_paid","cost"],"additionalProperties":false},"description":"Every billing unit that came back, charged or not. Empty when nothing did."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","breakdown","balance","replayed"],"additionalProperties":false,"description":"What this call was charged, and the balance left."}},"required":["data","query","notice","usage"],"additionalProperties":false},{"$ref":"#/components/schemas/DryRun"}]},"example":{"data":{"product":"ice machine","hs_code":{"code":"841869","description":"Refrigerators, freezers and other refrigerating or freezing equipment, electric or other; heat pumps, other than the air conditioning machines of heading 8415; parts thereof > Other refrigerating or freezing equipment; heat pumps > Other","origin":"matched","alternatives":[]},"terms":[{"term":"ice machine","language":null},{"term":"ماكينة ثلج","language":"ar"},{"term":"صانعة ثلج","language":"ar"}],"countries":[{"country":"SA","official":{"basis":"partners","value_basis":"fob","period":{"since":"2024-10","until":"2026-09"},"imports_12m_usd":192702701,"prior_12m_usd":274385528,"change_12m":-0.2977,"comparable_change_12m":-0.221,"partial_months":10,"top_origins":[{"country":"IT","value_usd":154139116,"share":0.33},{"country":"DE","value_usd":51379705,"share":0.11},{"country":"US","value_usd":42037941,"share":0.09},{"country":"TR","value_usd":32696176,"share":0.07},{"country":"CN","value_usd":27000000,"share":0.0578}],"by_month":[{"month":"2024-10","value_usd":19399057},{"month":"2024-11","value_usd":17656709},{"month":"2024-12","value_usd":19206987},{"month":"2025-01","value_usd":20990493},{"month":"2025-02","value_usd":21511825},{"month":"2025-03","value_usd":24694698},{"month":"2025-04","value_usd":26327291},{"month":"2025-05","value_usd":27164167},{"month":"2025-06","value_usd":27438553},{"month":"2025-07","value_usd":26587958},{"month":"2025-08","value_usd":22856314},{"month":"2025-09","value_usd":20551476},{"month":"2025-10","value_usd":13624081},{"month":"2025-11","value_usd":12400419},{"month":"2025-12","value_usd":13489189,"partial":true},{"month":"2026-01","value_usd":14741757,"partial":true},{"month":"2026-02","value_usd":15107892,"partial":true},{"month":"2026-03","value_usd":17343243,"partial":true},{"month":"2026-04","value_usd":18489824,"partial":true},{"month":"2026-05","value_usd":19077567,"partial":true},{"month":"2026-06","value_usd":19270270,"partial":true},{"month":"2026-07","value_usd":18672892,"partial":true},{"month":"2026-08","value_usd":16052135,"partial":true},{"month":"2026-09","value_usd":14433432,"partial":true}],"stopped_reporting":[{"country":"CN","last_month":"2024-12","share":0.0578}]},"shipments":{"basis":"partners","period":{"since":"2025-11","until":"2026-10"},"shipments":586,"recorded_value_usd":7034000,"value_share":0.0365,"top_origins":[{"country":"CN","shipments":212},{"country":"IT","shipments":88},{"country":"TR","shipments":61},{"country":"AE","shipments":40},{"country":"DE","shipments":33}],"by_month":[{"month":"2025-11","shipments":52},{"month":"2025-12","shipments":47},{"month":"2026-01","shipments":55},{"month":"2026-02","shipments":49},{"month":"2026-03","shipments":51},{"month":"2026-04","shipments":44},{"month":"2026-05","shipments":50},{"month":"2026-06","shipments":48},{"month":"2026-07","shipments":53},{"month":"2026-08","shipments":46},{"month":"2026-09","shipments":47},{"month":"2026-10","shipments":44}],"counts_only":false},"search":{"searches_12m":230140,"by_month":[{"month":"2025-11","searches":9900},{"month":"2025-12","searches":8180},{"month":"2026-01","searches":9050},{"month":"2026-02","searches":11200},{"month":"2026-03","searches":14800},{"month":"2026-04","searches":19600},{"month":"2026-05","searches":25300},{"month":"2026-06","searches":28900},{"month":"2026-07","searches":30100},{"month":"2026-08","searches":27400},{"month":"2026-09","searches":24700},{"month":"2026-10","searches":21010}],"peak_month":"2026-07","low_month":"2025-12","peak_to_low":3.68,"terms":[{"term":"ماكينة ثلج","searches_12m":101260,"share":0.44,"variants":[]},{"term":"صانعة ثلج","searches_12m":75950,"share":0.33,"variants":[]},{"term":"ice machine","searches_12m":52930,"share":0.23,"variants":["ice machines"]}],"history":{"terms":["ماكينة ثلج","صانعة ثلج","ice machine"],"by_year":[{"year":2021,"searches":87000,"complete":true},{"year":2022,"searches":128400,"complete":true},{"year":2023,"searches":176900,"complete":true},{"year":2024,"searches":235200,"complete":true},{"year":2025,"searches":196300,"complete":true},{"year":2026,"searches":160500,"complete":false}],"change_12m":-0.28},"data_through":"2026-10"},"marketplace":{"store":"amazon.sa","query":"ice machine","results":2715,"read":48,"price":{"currency":"SAR","median":356,"p25":270,"p75":702,"median_usd":94.93,"listings":40,"left_out":8},"bought_last_month":{"at_least":850,"listings":9},"top":[{"title":"Countertop ice maker, 12 kg a day, self-cleaning","price":279.99,"currency":"SAR","ratings":1840,"bought_last_month":400,"url":"https://www.amazon.sa/dp/EXAMPLE0001"},{"title":"Portable ice machine, 9 bullet ice cubes in 6 minutes","price":329,"currency":"SAR","ratings":960,"bought_last_month":200,"url":"https://www.amazon.sa/dp/EXAMPLE0002"}]},"estimates":{"figures":[{"figure":"USD 101.25 million","value_usd":101250000,"year":2025,"market":"Ice maker market","scope":"same","publisher":"Example Research","url":"https://example.com/reports/saudi-arabia-ice-maker-market","times_imports":0.369,"check":"consistent"},{"figure":"$4.15 billion","value_usd":4150000000,"year":2024,"market":"Commercial ice makers and ice machines market","scope":"same","publisher":null,"url":"https://example.com/pulse/saudi-arabia-commercial-ice-machines-market","times_imports":15.1,"check":"too_high"},{"figure":"USD 350 million","value_usd":350000000,"year":2024,"market":"Granular ice makers market","scope":"narrower","publisher":null,"url":"https://example.com/pulse/saudi-arabia-granular-ice-makers-market","times_imports":1.28,"check":"consistent"}],"imports_usd":274385528,"exports_usd":9850000,"agreement":null}}]},"query":{"product":"ice machine","countries":["SA"],"sections":["official","shipments","search","marketplace","estimates"]},"notice":"`official` and `shipments` are for HS 841869, the code whose description best matches `product` (see `data.hs_code`). Pass `hs_code` if it is not the right one. Saudi Arabia publishes no recent statistics of its own, so `official` adds up what partners report. Partners that publish nothing are missing, so it is a lower bound. China reported nothing after 2024-12 in the partners' numbers for Saudi Arabia, most likely because it has published nothing since, or publishes late, so the months after look lower than the trade was: read `comparable_change_12m`, which leaves it out of both years. Months marked `partial` in `official` still grow as late reports arrive, so `change_12m` reads lower than it will be. Saudi Arabia declares no shipment records, so `shipments` are the export records of partners that name it, and incomplete. `estimates` are what market research pages publish: unverified, often far apart, and sometimes for a wider or a narrower market (`scope`). Read `check` and `agreement` before using one. Some market sizes published for Saudi Arabia are more than 10 times the imports of the HS code, or under a fifth of them, though most of what is imported stays: `check` marks them as unlikely.","usage":{"cost":0.33,"breakdown":[{"unit":"trade_stats","records":1,"already_paid":0,"cost":0.1},{"unit":"market_search","records":1,"already_paid":0,"cost":0.15},{"unit":"market_listings","records":1,"already_paid":0,"cost":0.03},{"unit":"market_estimates","records":1,"already_paid":0,"cost":0.05}],"balance":47.67,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/enrich/companies/search":{"post":{"operationId":"enrich_companies_search","summary":"Search companies","description":"Lists the companies that fit a profile: an industry, where the headquarters are, how many people work there, and the software their website runs. Returns each company's name and website, the companies where we know the most people first, with `total` for the size of the market. Costs $0.002 for each company returned; none is free. Every website is checked to be a company's own: marketplaces, social networks and mail providers are left out, so a page can hold fewer than `limit`. To find importers or exporters of a product, use `POST /trade/companies/search` instead, which reads customs records. Next: `POST /enrich/companies/find` for a company's profile, `POST /enrich/people/search` for its people, and `POST /enrich/companies/website/read` for the contacts its website gives.","tags":["enrich"],"externalDocs":{"url":"https://won.dev/docs/enrich/companies-search"},"x-mode":"proxy","x-billing":"per result","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"industry":{"description":"Industries, in your words or by name: `furniture` stands for every industry with that word (its makers, wholesalers and retailers), a full name such as `Furniture and Home Furnishings Manufacturing` for that one alone. Names are LinkedIn's. Up to 5; `query.industry` says which names were searched.","minItems":1,"maxItems":5,"type":"array","items":{"type":"string","minLength":2,"maxLength":120}},"country":{"description":"Where the headquarters are: ISO codes such as `DE`, or English names. Up to 10.","minItems":1,"maxItems":10,"type":"array","items":{"description":"Where the headquarters are. An ISO code such as `US`, or an English name such as `United States`.","type":"string","maxLength":80}},"size":{"description":"How many people work there, as the company states it: any of `1-10`, `11-50`, `51-200`, `201-500`, `501-1000`, `1001-5000`, `5001-10000`, `10001+`.","minItems":1,"maxItems":8,"type":"array","items":{"type":"string","enum":["1-10","11-50","51-200","201-500","501-1000","1001-5000","5001-10000","10001+"]}},"technology":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"description":"Software the company's website runs, such as `Shopify`, `WooCommerce` or `HubSpot`: companies with any of them. Up to 10. Give it with an `industry` or a `size`."},"exclude_domains":{"description":"Websites to leave out, such as the companies already in your CRM. Up to 100.","maxItems":100,"type":"array","items":{"description":"A website to leave out.","type":"string","maxLength":253}},"limit":{"default":25,"description":"How many results to return, 1 to 100. You pay for the results returned.","type":"integer","minimum":1,"maximum":100},"cursor":{"description":"To get the next page, pass `next_cursor` of the previous response back unchanged, with the same parameters.","type":"string","maxLength":200},"max_cost":{"description":"Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged.","type":"number","exclusiveMinimum":0},"dry_run":{"default":false,"description":"If true, only return the maximum cost of this call. Nothing runs, nothing is charged.","type":"boolean"}},"required":[],"additionalProperties":false},"example":{"industry":["furniture"],"country":["US"],"size":["51-200","201-500"],"limit":3}}}},"responses":{"200":{"description":"The result. With `dry_run`, only the maximum cost.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Company name."},"domain":{"type":"string","description":"Its website, such as `example.com`. Pass it as `domain` to the company and people endpoints."}},"required":["name","domain"],"additionalProperties":false},"description":"The companies of this page."},"total":{"type":"integer","description":"How many companies match in all. Use it to size a market, or to decide between paging on and narrowing the search."},"has_more":{"type":"boolean","description":"Whether more companies follow this page."},"next_cursor":{"description":"Pass it as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"query":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The request as it was understood: country names as codes, the default dates filled in."},"notice":{"description":"A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"unit":{"type":"string","enum":["person_record","person_profile","person_email","person_phone","email_verification","company_listing","company_record","company_channels","company_technologies","company_funding","company_news","company_lookalikes","job_posting"],"description":"What is counted."},"records":{"type":"integer","description":"How many were returned and charged."},"already_paid":{"type":"integer","description":"How many more were returned for free, because this organization paid for them in the last 30 days."},"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["unit","records","already_paid","cost","balance","replayed"],"additionalProperties":false,"description":"What this call was charged, and the balance left."}},"required":["data","total","has_more","next_cursor","query","notice","usage"],"additionalProperties":false},{"$ref":"#/components/schemas/DryRun"}]},"example":{"data":[{"name":"SAMPLE Northfield Home Furnishings","domain":"northfield-home.example"},{"name":"SAMPLE Harborside Seating Co","domain":"harborside-seating.example"},{"name":"SAMPLE Pine & Loom Interiors","domain":"pineandloom.example"}],"total":1874,"has_more":true,"next_cursor":"cur_Qm4tR2x9LpZ0aWl1Lm1xNHo","query":{"industry":["Furniture","Furniture and Home Furnishings Manufacturing","Household and Institutional Furniture Manufacturing","Office Furniture and Fixtures Manufacturing","Retail Furniture and Home Furnishings","Reupholstery and Furniture Repair","Wholesale Furniture and Home Furnishings"],"country":["US"],"size":["51-200","201-500"],"limit":3},"notice":null,"usage":{"unit":"company_listing","records":3,"already_paid":0,"cost":0.006,"balance":48.994,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/enrich/companies/find":{"post":{"operationId":"enrich_companies_find","summary":"Enrich a company","description":"Returns a company's profile from its website, its name, its LinkedIn page or a work email: what it does, its industry, headcount, founding year, headquarters and LinkedIn page. Costs $0.01 when a profile is found; finding none is free. Asked by website, a company filed under another website (a namesake, or a parent) is not returned. `include` adds parts in the same call, each billed by its own unit and only when it has something: `channels` (the shared mailboxes, phone numbers, WhatsApp and other messaging contacts, and social pages its website publishes; $0.02), `technologies` (what its website runs on; $0.02), `funding` (its funding rounds and investors; $0.03), `news` (up to 10 recent articles mainly about it; $0.03), `jobs` (its 10 newest job postings and how many are open; $0.003 each) and `similar` (up to 10 companies like it; $0.03). The parts need the website: without one, it is taken from the profile. A part that cannot be loaded is null and is not charged. `channels` is the way to reach a small company that lists no people. For more job postings or a filter by title, use `POST /enrich/companies/jobs/search`; for its people, `POST /enrich/people/search`.","tags":["enrich"],"externalDocs":{"url":"https://won.dev/docs/enrich/companies-find"},"x-mode":"merge","x-billing":"per result","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"description":"The company's website, such as `example.com`.","type":"string","maxLength":253},"company_id":{"type":"string","maxLength":40,"description":"A company ID from the trade data API, such as `co_8f3k2m9x4p1q`, instead of `domain`: the company's website on record is used."},"name":{"description":"The company's name, when you do not know its website. Less exact than `domain`.","type":"string","minLength":2,"maxLength":200},"linkedin_url":{"description":"The company's LinkedIn page, such as `https://www.linkedin.com/company/acme`.","type":"string","maxLength":300},"email":{"description":"A work email at the company, such as `jane@example.com`. Its domain is the company's website.","type":"string","maxLength":254},"include":{"default":[],"description":"Parts to add: `channels`, `technologies`, `funding`, `news`, `jobs`, `similar`. Each is billed by its own unit.","maxItems":6,"type":"array","items":{"type":"string","enum":["channels","technologies","funding","news","jobs","similar"]}},"max_cost":{"description":"Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged.","type":"number","exclusiveMinimum":0},"dry_run":{"default":false,"description":"If true, only return the maximum cost of this call. Nothing runs, nothing is charged.","type":"boolean"}},"required":[],"additionalProperties":false},"example":{"domain":"northfield-home.example","include":["channels","jobs"]}}}},"responses":{"200":{"description":"The result. With `dry_run`, only the maximum cost.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"type":"object","properties":{"company":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","description":"Company name."},"domain":{"description":"Its website, such as `example.com`.","type":["string","null"]},"description":{"description":"What the company does, in its own words.","type":["string","null"]},"industry":{"description":"Its industry, by LinkedIn's name for it when it has one, such as `Furniture and Home Furnishings Manufacturing`, as the `industry` of `POST /enrich/companies/search` takes it. Null when not known.","type":["string","null"]},"employees":{"description":"Headcount range: `1-10`, `11-50`, `51-200`, `201-500`, `501-1000`, `1001-5000`, `5001-10000` or `10001+`, as the `size` of `POST /enrich/companies/search` takes it. Null when not known.","type":["string","null"]},"founded":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Year it was founded."},"location":{"description":"Where its headquarters are.","type":["string","null"]},"linkedin_url":{"description":"Its LinkedIn page.","type":["string","null"]}},"required":["name","domain","description","industry","employees","founded","location","linkedin_url"],"additionalProperties":false},{"type":"null"}],"description":"The profile. Null when none was found."},"channels":{"description":"With `include: [\"channels\"]`: how its website says to reach it.","anyOf":[{"type":"object","properties":{"emails":{"type":"array","items":{"type":"string"},"description":"Shared addresses such as `info@` and `sales@`."},"phones":{"type":"array","items":{"type":"string"},"description":"Phone numbers the company publishes: in E.164, such as `+4952112340`, when the country can be told, else as printed. Fax numbers are left out."},"messaging":{"type":"array","items":{"type":"object","properties":{"app":{"type":"string","enum":["whatsapp","wechat","zalo","line","skype","telegram"]},"value":{"type":"string","description":"A number in E.164 for WhatsApp, else the ID or number as printed."}},"required":["app","value"],"additionalProperties":false},"description":"WhatsApp, WeChat, Zalo, LINE, Skype and Telegram contacts the company gives."},"social":{"type":"object","properties":{"linkedin":{"type":["string","null"]},"facebook":{"type":["string","null"]},"twitter":{"type":["string","null"]},"instagram":{"type":["string","null"]},"youtube":{"type":["string","null"]},"tiktok":{"type":["string","null"]},"pinterest":{"type":["string","null"]}},"required":["linkedin","facebook","twitter","instagram","youtube","tiktok","pinterest"],"additionalProperties":false,"description":"Links to its public pages. Null where none is known."}},"required":["emails","phones","messaging","social"],"additionalProperties":false},{"type":"null"}]},"technologies":{"description":"With `include: [\"technologies\"]`: what its website runs on.","anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"categories":{"type":"array","items":{"type":"string"},"description":"Such as `CMS` or `Analytics`."},"website":{"description":"The technology's own website.","type":["string","null"]}},"required":["name","categories","website"],"additionalProperties":false}},{"type":"null"}]},"funding":{"description":"With `include: [\"funding\"]`: its funding rounds, newest first.","anyOf":[{"type":"array","items":{"type":"object","properties":{"date":{"description":"Date it was announced, `YYYY-MM-DD`.","type":["string","null"]},"stage":{"description":"Such as `Seed` or `Series B`.","type":["string","null"]},"amount_usd":{"description":"Money raised, in US dollars.","type":["number","null"]},"valuation_usd":{"description":"Valuation, in US dollars, when it was made public.","type":["number","null"]},"lead_investors":{"type":"array","items":{"type":"string"},"description":"The investors who led the round."},"investors":{"type":"array","items":{"type":"string"},"description":"Every investor named, the leads included."}},"required":["date","stage","amount_usd","valuation_usd","lead_investors","investors"],"additionalProperties":false}},{"type":"null"}]},"news":{"description":"With `include: [\"news\"]`: recent articles mainly about it, newest first.","anyOf":[{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"publisher":{"type":["string","null"]},"published_at":{"description":"When it was published, ISO 8601.","type":["string","null"]},"summary":{"description":"A few sentences on what the article says.","type":["string","null"]},"sentiment":{"anyOf":[{"type":"string","enum":["positive","neutral","negative"]},{"type":"null"}],"description":"Its tone about the company."},"press_release":{"description":"Whether the company put it out itself.","type":["boolean","null"]}},"required":["title","url","publisher","published_at","summary","sentiment","press_release"],"additionalProperties":false}},{"type":"null"}]},"jobs":{"description":"With `include: [\"jobs\"]`: its open job postings.","anyOf":[{"type":"object","properties":{"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"How many postings are open in all: a hiring signal. Null when not known."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Job ID, such as `job_6t2m9x4p1q8w`."},"title":{"type":"string"},"url":{"description":"Where to read the posting and apply.","type":["string","null"]},"location":{"description":"Where the job is, as the posting says.","type":["string","null"]},"countries":{"type":"array","items":{"type":"string"},"description":"The countries of its places, as English names."},"workplace":{"anyOf":[{"type":"string","enum":["remote","hybrid","on_site"]},{"type":"null"}],"description":"Whether the job is remote, hybrid or on site."},"employment":{"anyOf":[{"type":"string","enum":["full_time","part_time","contract","internship"]},{"type":"null"}],"description":"The kind of contract."},"seniority":{"description":"The level the posting asks for.","type":["string","null"]},"posted_at":{"description":"Date it was posted, `YYYY-MM-DD`.","type":["string","null"]},"salary":{"anyOf":[{"type":"object","properties":{"min":{"type":["number","null"]},"max":{"type":["number","null"]},"currency":{"type":["string","null"]},"period":{"description":"Such as `year` or `hour`.","type":["string","null"]}},"required":["min","max","currency","period"],"additionalProperties":false},{"type":"null"}],"description":"Pay as the posting states it. Null when it states none."}},"required":["id","title","url","location","countries","workplace","employment","seniority","posted_at","salary"],"additionalProperties":false},"description":"The newest postings."}},"required":["total","data"],"additionalProperties":false},{"type":"null"}]},"similar":{"description":"With `include: [\"similar\"]`: companies like it.","anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"domain":{"type":"string","description":"Its website. Pass it as `domain` to enrich it in turn."},"industry":{"description":"Its industry, by LinkedIn's name for it when it has one, such as `Furniture and Home Furnishings Manufacturing`, as the `industry` of `POST /enrich/companies/search` takes it. Null when not known.","type":["string","null"]}},"required":["name","domain","industry"],"additionalProperties":false}},{"type":"null"}]}},"required":["company"],"additionalProperties":false,"description":"The company, with the parts asked for in `include`."},"query":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The request as it was understood: country names as codes, the default dates filled in."},"notice":{"description":"A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"breakdown":{"type":"array","items":{"type":"object","properties":{"unit":{"type":"string","enum":["person_record","person_profile","person_email","person_phone","email_verification","company_listing","company_record","company_channels","company_technologies","company_funding","company_news","company_lookalikes","job_posting"],"description":"What is counted."},"records":{"type":"integer","description":"How many were returned and charged."},"already_paid":{"type":"integer","description":"How many more were returned for free, because this organization paid for them in the last 30 days."},"cost":{"type":"number","description":"What they cost, in US dollars."}},"required":["unit","records","already_paid","cost"],"additionalProperties":false},"description":"Every billing unit that came back, charged or not. Empty when nothing did."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","breakdown","balance","replayed"],"additionalProperties":false,"description":"What this call was charged, and the balance left."}},"required":["data","query","notice","usage"],"additionalProperties":false},{"$ref":"#/components/schemas/DryRun"}]},"example":{"data":{"company":{"name":"SAMPLE Northfield Home Furnishings","domain":"northfield-home.example","description":"Sample importer and retailer of upholstered furniture, sofas and dining chairs for homes in the south-eastern United States.","industry":"Furniture and Home Furnishings Retail","employees":"201-500","founded":1987,"location":"Charlotte, North Carolina, United States","linkedin_url":"https://www.linkedin.com/company/sample-northfield-home"},"channels":{"emails":["info@northfield-home.example","sales@northfield-home.example"],"phones":["+17045550100"],"messaging":[{"app":"whatsapp","value":"+17045550100"}],"social":{"linkedin":"https://www.linkedin.com/company/sample-northfield-home","facebook":null,"twitter":null,"instagram":null,"youtube":null,"tiktok":null,"pinterest":null}},"jobs":{"total":2,"data":[{"id":"job_6t2m9x4p1q8w","title":"Senior Buyer, Upholstery","url":"https://careers.northfield-home.example/senior-buyer-upholstery","location":"Charlotte, NC","countries":["United States"],"workplace":"hybrid","employment":"full_time","seniority":"Senior","posted_at":"2026-11-12","salary":{"min":85000,"max":110000,"currency":"USD","period":"year"}},{"id":"job_3k8n1v5c7x2z","title":"Sourcing Manager, Vietnam","url":"https://careers.northfield-home.example/sourcing-manager-vietnam","location":"Ho Chi Minh City, Vietnam","countries":["Vietnam"],"workplace":"on_site","employment":"full_time","seniority":"Mid-Level","posted_at":"2026-11-03","salary":null}]}},"query":{"domain":"northfield-home.example","include":["channels","jobs"]},"notice":null,"usage":{"cost":0.036,"breakdown":[{"unit":"company_record","records":1,"already_paid":0,"cost":0.01},{"unit":"company_channels","records":1,"already_paid":0,"cost":0.02},{"unit":"job_posting","records":2,"already_paid":0,"cost":0.006}],"balance":48.964,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/enrich/companies/jobs/search":{"post":{"operationId":"enrich_companies_jobs_search","summary":"List a company's job postings","description":"Lists a company's open job postings, newest first: title, link, place, whether it is remote, the kind of contract, the level and the salary when posted, with the number open in all. Hiring for buyers, sourcing or a new warehouse is a signal to reach out. Costs $0.003 for each posting returned; none is free. Ask by website; `name` is used when the website has no postings, since a company can post under its parent's website, and only postings under that very name are returned. Narrow it with `titles` and `country`, and page on with `next_cursor`.","tags":["enrich"],"externalDocs":{"url":"https://won.dev/docs/enrich/companies-jobs-search"},"x-mode":"proxy","x-billing":"per result","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"description":"The company's website, such as `example.com`.","type":"string","maxLength":253},"company_id":{"type":"string","maxLength":40,"description":"A company ID from the trade data API, such as `co_8f3k2m9x4p1q`, instead of `domain`: the company's website on record is used."},"name":{"description":"The company's name, as it writes it. Asked when the website has no postings, or alone when you do not know the website.","type":"string","minLength":2,"maxLength":200},"titles":{"default":[],"description":"Job title words, such as `buyer` or `sourcing`: postings whose title has any of them. Up to 10.","maxItems":10,"type":"array","items":{"type":"string","minLength":2,"maxLength":60}},"country":{"description":"Only postings in this country. An ISO code such as `US`, or an English name such as `United States`.","type":"string","maxLength":80},"limit":{"default":10,"description":"How many postings to return, 1 to 50. You pay for the postings returned.","type":"integer","minimum":1,"maximum":50},"cursor":{"description":"To get the next page, pass `next_cursor` of the previous response back unchanged, with the same parameters.","type":"string","maxLength":200},"max_cost":{"description":"Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged.","type":"number","exclusiveMinimum":0},"dry_run":{"default":false,"description":"If true, only return the maximum cost of this call. Nothing runs, nothing is charged.","type":"boolean"}},"required":[],"additionalProperties":false},"example":{"domain":"northfield-home.example","titles":["buyer","sourcing"],"limit":2}}}},"responses":{"200":{"description":"The result. With `dry_run`, only the maximum cost.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Job ID, such as `job_6t2m9x4p1q8w`."},"title":{"type":"string"},"url":{"description":"Where to read the posting and apply.","type":["string","null"]},"location":{"description":"Where the job is, as the posting says.","type":["string","null"]},"countries":{"type":"array","items":{"type":"string"},"description":"The countries of its places, as English names."},"workplace":{"anyOf":[{"type":"string","enum":["remote","hybrid","on_site"]},{"type":"null"}],"description":"Whether the job is remote, hybrid or on site."},"employment":{"anyOf":[{"type":"string","enum":["full_time","part_time","contract","internship"]},{"type":"null"}],"description":"The kind of contract."},"seniority":{"description":"The level the posting asks for.","type":["string","null"]},"posted_at":{"description":"Date it was posted, `YYYY-MM-DD`.","type":["string","null"]},"salary":{"anyOf":[{"type":"object","properties":{"min":{"type":["number","null"]},"max":{"type":["number","null"]},"currency":{"type":["string","null"]},"period":{"description":"Such as `year` or `hour`.","type":["string","null"]}},"required":["min","max","currency","period"],"additionalProperties":false},{"type":"null"}],"description":"Pay as the posting states it. Null when it states none."}},"required":["id","title","url","location","countries","workplace","employment","seniority","posted_at","salary"],"additionalProperties":false},"description":"The postings, newest first."},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"How many postings match in all, beyond this answer. Null when not known."},"has_more":{"type":"boolean","description":"Whether more postings follow this page."},"next_cursor":{"description":"Pass it as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"query":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The request as it was understood: country names as codes, the default dates filled in."},"notice":{"description":"A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"unit":{"type":"string","enum":["person_record","person_profile","person_email","person_phone","email_verification","company_listing","company_record","company_channels","company_technologies","company_funding","company_news","company_lookalikes","job_posting"],"description":"What is counted."},"records":{"type":"integer","description":"How many were returned and charged."},"already_paid":{"type":"integer","description":"How many more were returned for free, because this organization paid for them in the last 30 days."},"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["unit","records","already_paid","cost","balance","replayed"],"additionalProperties":false,"description":"What this call was charged, and the balance left."}},"required":["data","total","has_more","next_cursor","query","notice","usage"],"additionalProperties":false},{"$ref":"#/components/schemas/DryRun"}]},"example":{"data":[{"id":"job_6t2m9x4p1q8w","title":"Senior Buyer, Upholstery","url":"https://careers.northfield-home.example/senior-buyer-upholstery","location":"Charlotte, NC","countries":["United States"],"workplace":"hybrid","employment":"full_time","seniority":"Senior","posted_at":"2026-11-12","salary":{"min":85000,"max":110000,"currency":"USD","period":"year"}},{"id":"job_3k8n1v5c7x2z","title":"Sourcing Manager, Vietnam","url":"https://careers.northfield-home.example/sourcing-manager-vietnam","location":"Ho Chi Minh City, Vietnam","countries":["Vietnam"],"workplace":"on_site","employment":"full_time","seniority":"Mid-Level","posted_at":"2026-11-03","salary":null}],"total":2,"has_more":false,"next_cursor":null,"query":{"domain":"northfield-home.example","titles":["buyer","sourcing"],"limit":2},"notice":null,"usage":{"unit":"job_posting","records":2,"already_paid":0,"cost":0.006,"balance":48.994,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/enrich/companies/website/read":{"post":{"operationId":"enrich_companies_website_read","summary":"Read a company's website","description":"Reads a company's own website, the way a person looking for a contact would: the home page, then the imprint, contact, about and team pages, at most seven. Returns the shared mailboxes, phone numbers, WhatsApp, WeChat and Zalo contacts and social pages the company publishes, and the people its pages name, such as the managing directors of an imprint, with a work email for each one that can be confirmed. Reading takes 10 to 60 seconds, so the first call starts the read and answers `status: \"processing\"` for free; call again after `retry_after_seconds`. Reports are kept 30 days, for everyone. Costs $0.02 when the website gives any way to reach the company, and $0.03 for each person returned with an email; a website with nothing is free. Shared mailboxes are returned as the website prints them. A person's address printed next to their name is checked before it is returned. For a named person without one, an address is made from their name and the company's address pattern, such as `first.last@`, and returned only when the check finds the mailbox. The reader follows robots.txt and stops at bot checks.","tags":["enrich"],"externalDocs":{"url":"https://won.dev/docs/enrich/companies-website-read"},"x-mode":"proxy","x-billing":"per result","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"description":"The company's website, such as `example.com`.","type":"string","maxLength":253},"company_id":{"type":"string","maxLength":40,"description":"A company ID from the trade data API, such as `co_8f3k2m9x4p1q`, instead of `domain`: the company's website on record is used."},"name":{"description":"The company's name. Tells an address made of it, such as `acme@`, for a shared one.","type":"string","minLength":2,"maxLength":200},"country":{"description":"Where the company is, to read phone numbers printed without a country code. By default the country of the website's ending, such as Germany for `.de`. An ISO code such as `US`, or an English name such as `United States`.","type":"string","maxLength":80},"min_email_status":{"default":"verified","description":"`verified` (the default): only confirmed mailboxes. `risky` also returns addresses at domains that accept every address.","type":"string","enum":["verified","risky"]},"limit":{"default":10,"description":"How many people to return, 1 to 25. You pay for those returned with an email.","type":"integer","minimum":1,"maximum":25},"max_cost":{"description":"Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged.","type":"number","exclusiveMinimum":0},"dry_run":{"default":false,"description":"If true, only return the maximum cost of this call. Nothing runs, nothing is charged.","type":"boolean"}},"required":[],"additionalProperties":false},"example":{"domain":"northfield-home.example","limit":5}}}},"responses":{"200":{"description":"The result. With `dry_run`, only the maximum cost.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["processing","ready"],"description":"`processing`: the website is being read; call again after `retry_after_seconds`. `ready`: this is the report."},"retry_after_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"While processing: when to ask again. Null when ready."},"domain":{"type":"string","description":"The website that was read."},"read_at":{"description":"When it was read, ISO 8601. Reports are kept 30 days.","type":["string","null"]},"unreadable":{"anyOf":[{"type":"string","enum":["unreachable","blocked","robots","elsewhere","empty"]},{"type":"null"}],"description":"Why the website gave nothing to read, or null. `unreachable`: no answer. `blocked`: it asks for a bot check, which is never worked around. `robots`: its robots.txt asks us to stay out. `elsewhere`: it sends visitors to another website. `empty`: no page could be read."},"pages":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"kind":{"type":"string","enum":["home","imprint","contact","team","about"]}},"required":["url","kind"],"additionalProperties":false},"description":"The pages that were read: the home page, the imprint, contact, about and team pages."},"emails":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"page_url":{"description":"The page it was found on.","type":["string","null"]}},"required":["email","page_url"],"additionalProperties":false},"description":"Shared addresses on the company's own domain, such as `info@` and `sales@`. A person's address is under `people`."},"phones":{"type":"array","items":{"type":"object","properties":{"number":{"description":"In E.164, such as `+4952112340`. Null when the country cannot be told.","type":["string","null"]},"printed":{"type":"string","description":"As the website prints it."},"page_url":{"description":"The page it was found on.","type":["string","null"]}},"required":["number","printed","page_url"],"additionalProperties":false},"description":"Phone numbers the company publishes. Fax numbers are left out."},"messaging":{"type":"array","items":{"type":"object","properties":{"app":{"type":"string","enum":["whatsapp","wechat","zalo","line","skype","telegram"]},"value":{"type":"string","description":"A number in E.164 for WhatsApp, else the ID or number as printed."},"page_url":{"type":"string"}},"required":["app","value","page_url"],"additionalProperties":false},"description":"WhatsApp, WeChat, Zalo, LINE, Skype and Telegram contacts the website gives."},"social":{"type":"object","properties":{"linkedin":{"type":["string","null"]},"facebook":{"type":["string","null"]},"twitter":{"type":["string","null"]},"instagram":{"type":["string","null"]},"youtube":{"type":["string","null"]},"tiktok":{"type":["string","null"]},"pinterest":{"type":["string","null"]}},"required":["linkedin","facebook","twitter","instagram","youtube","tiktok","pinterest"],"additionalProperties":false,"description":"The company's own pages on social networks. Null where none is linked."},"people":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Person ID, such as `per_4m7q2x9k1c8d`: the same in every endpoint for the same full name at the same company. Kept for your account for 90 days after it was last returned: pass it as `contact_id` to add the person to a campaign, or as `person_id` to look for an email."},"name":{"type":"string","description":"Full name, as the website writes it."},"title":{"description":"Role, as the website gives it. Roles from an imprint are in English, such as `Managing Director`.","type":["string","null"]},"seniority":{"anyOf":[{"type":"string","enum":["owner","c_level","executive","manager","senior","staff"]},{"type":"null"}],"description":"Level, read from the title."},"department":{"anyOf":[{"type":"string","enum":["purchasing","sales","management","operations","marketing","finance","engineering","quality","it","hr","legal"]},{"type":"null"}],"description":"Department, read from the title."},"email":{"description":"Work email on the company's own domain. Null when none could be confirmed.","type":["string","null"]},"email_status":{"anyOf":[{"type":"string","enum":["verified","risky"]},{"type":"null"}],"description":"`verified`: the mailbox exists. `risky`: the domain accepts every address, so the mailbox cannot be confirmed."},"email_source":{"anyOf":[{"type":"string","enum":["website","pattern"]},{"type":"null"}],"description":"`website`: printed next to their name. `pattern`: made from their name and the company's address pattern, then checked."},"page_url":{"type":"string","description":"The page that names them."}},"required":["id","name","title","seniority","department","email","email_status","email_source","page_url"],"additionalProperties":false},"description":"People the website names: managing directors and owners from the imprint, and the staff of contact and team pages. Leaders first."},"email_pattern":{"anyOf":[{"type":"string","enum":["first.last","first_last","first-last","firstlast","f.last","flast","first","last.first"]},{"type":"null"}],"description":"How the company writes its people's addresses, such as `first.last`, when it shows."}},"required":["status","retry_after_seconds","domain","read_at","unreadable","pages","emails","phones","messaging","social","people","email_pattern"],"additionalProperties":false},"query":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The request as it was understood: country names as codes, the default dates filled in."},"notice":{"description":"A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"breakdown":{"type":"array","items":{"type":"object","properties":{"unit":{"type":"string","enum":["person_record","person_profile","person_email","person_phone","email_verification","company_listing","company_record","company_channels","company_technologies","company_funding","company_news","company_lookalikes","job_posting"],"description":"What is counted."},"records":{"type":"integer","description":"How many were returned and charged."},"already_paid":{"type":"integer","description":"How many more were returned for free, because this organization paid for them in the last 30 days."},"cost":{"type":"number","description":"What they cost, in US dollars."}},"required":["unit","records","already_paid","cost"],"additionalProperties":false},"description":"Every billing unit that came back, charged or not. Empty when nothing did."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","breakdown","balance","replayed"],"additionalProperties":false,"description":"What this call was charged, and the balance left."}},"required":["data","query","notice","usage"],"additionalProperties":false},{"$ref":"#/components/schemas/DryRun"}]},"example":{"data":{"status":"ready","retry_after_seconds":null,"domain":"northfield-home.example","read_at":"2026-11-21T09:30:00.000Z","unreadable":null,"pages":[{"url":"https://www.northfield-home.example/","kind":"home"},{"url":"https://www.northfield-home.example/imprint","kind":"imprint"},{"url":"https://www.northfield-home.example/contact","kind":"contact"}],"emails":[{"email":"info@northfield-home.example","page_url":"https://www.northfield-home.example/"},{"email":"sales@northfield-home.example","page_url":"https://www.northfield-home.example/contact"}],"phones":[{"number":"+17045550100","printed":"+1 (704) 555-0100","page_url":"https://www.northfield-home.example/contact"}],"messaging":[{"app":"whatsapp","value":"+17045550142","page_url":"https://www.northfield-home.example/contact"}],"social":{"linkedin":"https://www.linkedin.com/company/sample-northfield-home","facebook":null,"twitter":null,"instagram":null,"youtube":null,"tiktok":null,"pinterest":null},"people":[{"id":"per_7z26na5775dy","name":"Sam Rivera","title":"Owner","seniority":"owner","department":"management","email":"sam.rivera@northfield-home.example","email_status":"verified","email_source":"pattern","page_url":"https://www.northfield-home.example/imprint"},{"id":"per_45k57v93mg22","name":"Jordan Lee","title":"Director of Global Sourcing","seniority":"executive","department":"purchasing","email":"jordan.lee@northfield-home.example","email_status":"verified","email_source":"website","page_url":"https://www.northfield-home.example/contact"}],"email_pattern":"first.last"},"query":{"domain":"northfield-home.example","limit":5},"notice":null,"usage":{"cost":0.08,"breakdown":[{"unit":"company_channels","records":1,"already_paid":0,"cost":0.02},{"unit":"person_email","records":2,"already_paid":0,"cost":0.06}],"balance":48.92,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/enrich/people/search":{"post":{"operationId":"enrich_people_search","summary":"Find people","description":"Lists the people who work at a company, by its website or the `company_id` of a company from the trade data API, or the people at any company who fit: by `titles`, `seniority` and `department`, narrowed by where the company is (`company_country`), where the person is (`location`), the company's `industry` and `with_email`. Returns name, job title, level, department, employer and LinkedIn profile, without contact details. Costs $0.005 for each person returned; an empty result is free. It needs a company, or `titles`, `seniority` or `department`: the other filters only narrow. At a company, only people filed under its own domain are returned, so the staff of a company with a similar name never are; when nobody is filed under it, the people its LinkedIn page lists as current employees are returned instead, for one page, unless `company_country`, `location`, `industry` or `with_email` narrow the search. Each person's `id` is kept for your account: next, pass it as `person_id` to `POST /enrich/people/email/find` for their work email, `POST /enrich/people/phone/find` for their phone, or `POST /enrich/people/find` for both with the profile. For people with a verified email in one step, use `GET /trade/companies/{id}/contacts`.","tags":["enrich"],"externalDocs":{"url":"https://won.dev/docs/enrich/people-search"},"x-mode":"waterfall","x-billing":"per result","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"description":"The company's website, such as `example.com`.","type":"string","maxLength":253},"company_id":{"type":"string","maxLength":40,"description":"A company ID from the trade data API, such as `co_8f3k2m9x4p1q`, instead of `domain`: the company's website on record is used."},"titles":{"default":[],"description":"Job title words, such as `buyer` or `purchasing manager`: someone whose title has any of them. Up to 10.","maxItems":10,"type":"array","items":{"type":"string","minLength":2,"maxLength":60}},"seniority":{"default":[],"description":"Only people of these levels: `owner`, `c_level`, `executive` (VP, director, head), `manager`, `senior` (a senior individual role, such as Senior Buyer), `staff` (any other role). Default: any level.","maxItems":6,"type":"array","items":{"type":"string","enum":["owner","c_level","executive","manager","senior","staff"]}},"department":{"default":[],"description":"Only people in these departments: `purchasing`, `sales`, `management`, `operations`, `marketing`, `finance`, `engineering`, `quality`, `it`, `hr`, `legal`. Default: any department.","maxItems":11,"type":"array","items":{"type":"string","enum":["purchasing","sales","management","operations","marketing","finance","engineering","quality","it","hr","legal"]}},"company_country":{"description":"Only people at companies headquartered in these countries: ISO codes such as `US`, or English names. Up to 10.","minItems":1,"maxItems":10,"type":"array","items":{"description":"Where the company's headquarters are. An ISO code such as `US`, or an English name such as `United States`.","type":"string","maxLength":80}},"location":{"description":"Only people who are in one of these places, as their profile writes it: a city, a region or a country, such as `Vietnam` or `Bavaria`. Up to 5.","minItems":1,"maxItems":5,"type":"array","items":{"type":"string","minLength":2,"maxLength":100}},"industry":{"description":"Industries, in your words or by name: `furniture` stands for every industry with that word (its makers, wholesalers and retailers), a full name such as `Furniture and Home Furnishings Manufacturing` for that one alone. Names are LinkedIn's. Up to 5; `query.industry` says which names were searched.","minItems":1,"maxItems":5,"type":"array","items":{"type":"string","minLength":2,"maxLength":120}},"with_email":{"default":false,"description":"Only people a source has an email on record for, so that `POST /enrich/people/email/find` is more likely to find one. Same price.","type":"boolean"},"company_linkedin_url":{"description":"The company's LinkedIn page, such as `https://www.linkedin.com/company/acme`, when you know it. It is used when nobody is filed under the website, or when no website is on record for `company_id`.","type":"string","maxLength":300},"limit":{"default":10,"description":"How many people to return, 1 to 100. You pay for the people returned.","type":"integer","minimum":1,"maximum":100},"cursor":{"description":"To get the next page, pass `next_cursor` of the previous response back unchanged, with the same parameters.","type":"string","maxLength":200},"max_cost":{"description":"Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged.","type":"number","exclusiveMinimum":0},"dry_run":{"default":false,"description":"If true, only return the maximum cost of this call. Nothing runs, nothing is charged.","type":"boolean"}},"required":[],"additionalProperties":false},"example":{"domain":"northfield-home.example","department":["purchasing"],"limit":2}}}},"responses":{"200":{"description":"The result. With `dry_run`, only the maximum cost.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Person ID, such as `per_4m7q2x9k1c8d`: the same in every endpoint for the same full name at the same company. It is kept for your account for 90 days after it was last returned: pass it as `person_id` to find the person's email or phone, or as `contact_id` to add them to a campaign."},"name":{"description":"Full name.","type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"title":{"description":"Current job title.","type":["string","null"]},"seniority":{"anyOf":[{"type":"string","enum":["owner","c_level","executive","manager","senior","staff"]},{"type":"null"}],"description":"Level, read from the title."},"department":{"anyOf":[{"type":"string","enum":["purchasing","sales","management","operations","marketing","finance","engineering","quality","it","hr","legal"]},{"type":"null"}],"description":"Department, read from the title."},"company":{"description":"Current employer.","type":["string","null"]},"company_domain":{"description":"The employer's website, such as `example.com`.","type":["string","null"]},"linkedin_url":{"description":"The person's LinkedIn profile.","type":["string","null"]},"location":{"description":"Where the person is, as their profile says.","type":["string","null"]}},"required":["id","name","first_name","last_name","title","seniority","department","company","company_domain","linkedin_url","location"],"additionalProperties":false},"description":"The people of this page."},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"How many people the source lists for the company, the title words and the other filters, before the filters by level and department. Null when not known."},"has_more":{"type":"boolean","description":"Whether more people follow this page."},"next_cursor":{"description":"Pass it as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"status":{"type":"string","enum":["processing","ready"],"description":"`processing`: more sources are still being searched in the background for what is missing, which costs nothing until it is found; call again after `retry_after_seconds` for what they find, and what this answer returned is not charged again. `ready`: this is the answer."},"retry_after_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"While processing: when to ask again. Null when ready."},"query":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The request as it was understood: country names as codes, the default dates filled in."},"notice":{"description":"A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"unit":{"type":"string","enum":["person_record","person_profile","person_email","person_phone","email_verification","company_listing","company_record","company_channels","company_technologies","company_funding","company_news","company_lookalikes","job_posting"],"description":"What is counted."},"records":{"type":"integer","description":"How many were returned and charged."},"already_paid":{"type":"integer","description":"How many more were returned for free, because this organization paid for them in the last 30 days."},"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["unit","records","already_paid","cost","balance","replayed"],"additionalProperties":false,"description":"What this call was charged, and the balance left."}},"required":["data","total","has_more","next_cursor","status","retry_after_seconds","query","notice","usage"],"additionalProperties":false},{"$ref":"#/components/schemas/DryRun"}]},"example":{"data":[{"id":"per_4m7q2x9k1c8d","name":"Jordan Lee","first_name":"Jordan","last_name":"Lee","title":"Director of Global Sourcing","seniority":"executive","department":"purchasing","company":"SAMPLE Northfield Home Furnishings","company_domain":"northfield-home.example","linkedin_url":"https://www.linkedin.com/in/sample-jordan-lee","location":"Charlotte, North Carolina, United States"},{"id":"per_7a0c3e6g9j2m","name":"Alex Morgan","first_name":"Alex","last_name":"Morgan","title":"Purchasing Manager","seniority":"manager","department":"purchasing","company":"SAMPLE Northfield Home Furnishings","company_domain":"northfield-home.example","linkedin_url":"https://www.linkedin.com/in/sample-alex-morgan","location":"Charlotte, North Carolina, United States"}],"total":37,"has_more":true,"next_cursor":"cur_Zx81kQp4b2JtMW0uMXJ6ZzQ","status":"ready","retry_after_seconds":null,"query":{"domain":"northfield-home.example","department":["purchasing"],"limit":2},"notice":null,"usage":{"unit":"person_record","records":2,"already_paid":0,"cost":0.01,"balance":48.99,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/enrich/people/find":{"post":{"operationId":"enrich_people_find","summary":"Enrich a person","description":"Fills in a person's profile from what you know: their email, their LinkedIn profile, their name and the website of their employer, or the `person_id` another call returned. The profile has the full name, the current job title and employer, where they are, and their LinkedIn profile, so an email or a name becomes a LinkedIn link. Costs $0.02 when a profile is found; finding nothing is free. `include` adds in the same call, each billed only when found: `email`, their work email on their employer's domain, verified ($0.03), and `phone`, their phone number, usually a mobile ($0.10). Looked up by name, someone of that name at another company is not returned. When you only need the email or the phone, `POST /enrich/people/email/find` and `POST /enrich/people/phone/find` skip the profile.","tags":["enrich"],"externalDocs":{"url":"https://won.dev/docs/enrich/people-find"},"x-mode":"merge","x-billing":"per result","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"description":"The person's email address, such as `jane@example.com`.","type":"string","maxLength":254},"linkedin_url":{"description":"The person's LinkedIn profile, such as `https://www.linkedin.com/in/jane-doe`.","type":"string","maxLength":300},"first_name":{"description":"First name, with `last_name` and `domain`.","type":"string","maxLength":80},"last_name":{"description":"Last name, with `first_name` and `domain`.","type":"string","maxLength":80},"domain":{"description":"The website of the person's employer, such as `example.com`, with `first_name` and `last_name`.","type":"string","maxLength":253},"company_id":{"type":"string","maxLength":40,"description":"A company ID from the trade data API, such as `co_8f3k2m9x4p1q`, instead of `domain`: the company's website on record is used."},"person_id":{"type":"string","maxLength":40,"description":"A person ID this account was given in the last 90 days, such as `per_4m7q2x9k1c8d`, instead of naming the person: their name, employer website and LinkedIn profile on file are used. What you pass besides it wins."},"include":{"default":[],"description":"Parts to add: `email`, `phone`. Each is billed by its own unit.","maxItems":2,"type":"array","items":{"type":"string","enum":["email","phone"]}},"min_email_status":{"default":"verified","description":"`verified` (default) returns only mailboxes that were confirmed to exist. `risky` also returns addresses on domains that accept every address, which cannot be confirmed. Same price.","type":"string","enum":["verified","risky"]},"max_cost":{"description":"Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged.","type":"number","exclusiveMinimum":0},"dry_run":{"default":false,"description":"If true, only return the maximum cost of this call. Nothing runs, nothing is charged.","type":"boolean"}},"required":[],"additionalProperties":false},"example":{"linkedin_url":"https://www.linkedin.com/in/sample-jordan-lee","include":["email","phone"]}}}},"responses":{"200":{"description":"The result. With `dry_run`, only the maximum cost.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"type":"object","properties":{"person":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Person ID, such as `per_4m7q2x9k1c8d`: the same in every endpoint for the same full name at the same company. It is kept for your account for 90 days after it was last returned: pass it as `person_id` to find the person's email or phone, or as `contact_id` to add them to a campaign."},"name":{"description":"Full name.","type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"title":{"description":"Current job title.","type":["string","null"]},"seniority":{"anyOf":[{"type":"string","enum":["owner","c_level","executive","manager","senior","staff"]},{"type":"null"}],"description":"Level, read from the title."},"department":{"anyOf":[{"type":"string","enum":["purchasing","sales","management","operations","marketing","finance","engineering","quality","it","hr","legal"]},{"type":"null"}],"description":"Department, read from the title."},"company":{"description":"Current employer.","type":["string","null"]},"company_domain":{"description":"The employer's website, such as `example.com`.","type":["string","null"]},"linkedin_url":{"description":"The person's LinkedIn profile.","type":["string","null"]},"location":{"description":"Where the person is, as their profile says.","type":["string","null"]}},"required":["id","name","first_name","last_name","title","seniority","department","company","company_domain","linkedin_url","location"],"additionalProperties":false},{"type":"null"}],"description":"The profile. Null when none was found."},"email":{"description":"With `include: [\"email\"]`: the work email. Null when none was found.","anyOf":[{"type":"object","properties":{"email":{"type":"string","description":"Work email on the employer's own domain."},"status":{"type":"string","enum":["verified","risky"],"description":"`verified`: the mailbox exists. `risky`: the domain accepts every address, so the mailbox cannot be confirmed."}},"required":["email","status"],"additionalProperties":false},{"type":"null"}]},"phone":{"description":"With `include: [\"phone\"]`: the phone number. Null when none was found.","anyOf":[{"type":"object","properties":{"number":{"type":"string","description":"In E.164 format, such as `+14155550123`."},"type":{"type":"string","enum":["mobile","landline","voip","other","unknown"],"description":"What the numbering plan says the number is: `mobile`, `landline`, `voip`, `other`, or `unknown`. It is not a live check of the line."},"country":{"description":"ISO 3166 code of the country the number belongs to.","type":["string","null"]},"whatsapp_url":{"description":"A `wa.me` link that opens a chat with a mobile number. Whether the number uses WhatsApp is not checked. Null for other numbers.","type":["string","null"]}},"required":["number","type","country","whatsapp_url"],"additionalProperties":false},{"type":"null"}]}},"required":["person"],"additionalProperties":false,"description":"The person, with the parts asked for in `include`."},"status":{"type":"string","enum":["processing","ready"],"description":"`processing`: more sources are still being searched in the background for what is missing, which costs nothing until it is found; call again after `retry_after_seconds` for what they find, and what this answer returned is not charged again. `ready`: this is the answer."},"retry_after_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"While processing: when to ask again. Null when ready."},"query":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The request as it was understood: country names as codes, the default dates filled in."},"notice":{"description":"A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"breakdown":{"type":"array","items":{"type":"object","properties":{"unit":{"type":"string","enum":["person_record","person_profile","person_email","person_phone","email_verification","company_listing","company_record","company_channels","company_technologies","company_funding","company_news","company_lookalikes","job_posting"],"description":"What is counted."},"records":{"type":"integer","description":"How many were returned and charged."},"already_paid":{"type":"integer","description":"How many more were returned for free, because this organization paid for them in the last 30 days."},"cost":{"type":"number","description":"What they cost, in US dollars."}},"required":["unit","records","already_paid","cost"],"additionalProperties":false},"description":"Every billing unit that came back, charged or not. Empty when nothing did."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","breakdown","balance","replayed"],"additionalProperties":false,"description":"What this call was charged, and the balance left."}},"required":["data","status","retry_after_seconds","query","notice","usage"],"additionalProperties":false},{"$ref":"#/components/schemas/DryRun"}]},"example":{"data":{"person":{"id":"per_4m7q2x9k1c8d","name":"Jordan Lee","first_name":"Jordan","last_name":"Lee","title":"Director of Global Sourcing","seniority":"executive","department":"purchasing","company":"SAMPLE Northfield Home Furnishings","company_domain":"northfield-home.example","linkedin_url":"https://www.linkedin.com/in/sample-jordan-lee","location":"Charlotte, North Carolina, United States"},"email":{"email":"jordan.lee@northfield-home.example","status":"verified"},"phone":{"number":"+17045550142","type":"mobile","country":"US","whatsapp_url":"https://wa.me/17045550142"}},"status":"ready","retry_after_seconds":null,"query":{"linkedin_url":"https://www.linkedin.com/in/sample-jordan-lee","include":["email","phone"],"min_email_status":"verified"},"notice":null,"usage":{"cost":0.15,"breakdown":[{"unit":"person_profile","records":1,"already_paid":0,"cost":0.02},{"unit":"person_email","records":1,"already_paid":0,"cost":0.03},{"unit":"person_phone","records":1,"already_paid":0,"cost":0.1}],"balance":48.85,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/enrich/people/email/find":{"post":{"operationId":"enrich_people_email_find","summary":"Find a work email","description":"Finds a person's work email on their employer's own domain, from their name and the employer's website, from their LinkedIn profile, or from the `person_id` another call returned, such as a people search. The email is then kept with that ID, so the person can be added to a campaign by it. Every address is checked before it is returned. Costs $0.03 when an email is found; finding none is free. Sources are tried in a fixed order, cheapest first, until one has an address on the domain, and it answers within about 30 seconds. A LinkedIn profile is first turned into a name and a current employer: an address at a former employer is never returned, nor a shared mailbox such as `info@`. By default only `verified` mailboxes come back; `min_email_status: \"risky\"` also returns addresses at domains that accept every address. To check an address you already have, use `POST /enrich/email/verify`.","tags":["enrich"],"externalDocs":{"url":"https://won.dev/docs/enrich/people-email-find"},"x-mode":"waterfall","x-billing":"per result","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"description":"First name, with `last_name` and `domain`.","type":"string","maxLength":80},"last_name":{"description":"Last name, with `first_name` and `domain`.","type":"string","maxLength":80},"domain":{"description":"The website of the person's employer, such as `example.com`. Only an address on this domain is returned.","type":"string","maxLength":253},"company_id":{"type":"string","maxLength":40,"description":"A company ID from the trade data API, such as `co_8f3k2m9x4p1q`, instead of `domain`: the company's website on record is used."},"linkedin_url":{"description":"The person's LinkedIn profile, instead of the name and the website, or with them.","type":"string","maxLength":300},"person_id":{"type":"string","maxLength":40,"description":"A person ID this account was given in the last 90 days, such as `per_4m7q2x9k1c8d`, instead of naming the person: their name, employer website and LinkedIn profile on file are used. What you pass besides it wins."},"min_email_status":{"default":"verified","description":"`verified` (default) returns only mailboxes that were confirmed to exist. `risky` also returns addresses on domains that accept every address, which cannot be confirmed. Same price.","type":"string","enum":["verified","risky"]},"max_cost":{"description":"Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged.","type":"number","exclusiveMinimum":0},"dry_run":{"default":false,"description":"If true, only return the maximum cost of this call. Nothing runs, nothing is charged.","type":"boolean"}},"required":[],"additionalProperties":false},"example":{"first_name":"Jordan","last_name":"Lee","domain":"northfield-home.example"}}}},"responses":{"200":{"description":"The result. With `dry_run`, only the maximum cost.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"type":"object","properties":{"email":{"anyOf":[{"type":"object","properties":{"email":{"type":"string","description":"Work email on the employer's own domain."},"status":{"type":"string","enum":["verified","risky"],"description":"`verified`: the mailbox exists. `risky`: the domain accepts every address, so the mailbox cannot be confirmed."}},"required":["email","status"],"additionalProperties":false},{"type":"null"}],"description":"The work email. Null when none was found."},"person":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Person ID, such as `per_4m7q2x9k1c8d`: the same in every endpoint for the same full name at the same company. It is kept for your account for 90 days after it was last returned: pass it as `person_id` to find the person's email or phone, or as `contact_id` to add them to a campaign."},"name":{"description":"Full name.","type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"title":{"description":"Current job title.","type":["string","null"]},"seniority":{"anyOf":[{"type":"string","enum":["owner","c_level","executive","manager","senior","staff"]},{"type":"null"}],"description":"Level, read from the title."},"department":{"anyOf":[{"type":"string","enum":["purchasing","sales","management","operations","marketing","finance","engineering","quality","it","hr","legal"]},{"type":"null"}],"description":"Department, read from the title."},"company":{"description":"Current employer.","type":["string","null"]},"company_domain":{"description":"The employer's website, such as `example.com`.","type":["string","null"]},"linkedin_url":{"description":"The person's LinkedIn profile.","type":["string","null"]},"location":{"description":"Where the person is, as their profile says.","type":["string","null"]}},"required":["id","name","first_name","last_name","title","seniority","department","company","company_domain","linkedin_url","location"],"additionalProperties":false},{"type":"null"}],"description":"Who the email is for. From a LinkedIn profile, the profile it was read from. Null when the profile was not found."}},"required":["email","person"],"additionalProperties":false,"description":"The email, and who it is for."},"status":{"type":"string","enum":["processing","ready"],"description":"`processing`: more sources are still being searched in the background for what is missing, which costs nothing until it is found; call again after `retry_after_seconds` for what they find, and what this answer returned is not charged again. `ready`: this is the answer."},"retry_after_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"While processing: when to ask again. Null when ready."},"query":{"type":"object","properties":{"domain":{"description":"The website the email was looked for on: `domain` when it was given, otherwise the one of the person's profile. Null when none is known.","type":["string","null"]}},"required":["domain"],"additionalProperties":{},"description":"The request as it was understood, with the website that was searched."},"notice":{"description":"A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"unit":{"type":"string","enum":["person_record","person_profile","person_email","person_phone","email_verification","company_listing","company_record","company_channels","company_technologies","company_funding","company_news","company_lookalikes","job_posting"],"description":"What is counted."},"records":{"type":"integer","description":"How many were returned and charged."},"already_paid":{"type":"integer","description":"How many more were returned for free, because this organization paid for them in the last 30 days."},"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["unit","records","already_paid","cost","balance","replayed"],"additionalProperties":false,"description":"What this call was charged, and the balance left."}},"required":["data","status","retry_after_seconds","query","notice","usage"],"additionalProperties":false},{"$ref":"#/components/schemas/DryRun"}]},"example":{"data":{"email":{"email":"jordan.lee@northfield-home.example","status":"verified"},"person":{"id":"per_4m7q2x9k1c8d","name":"Jordan Lee","first_name":"Jordan","last_name":"Lee","title":"Director of Global Sourcing","seniority":"executive","department":"purchasing","company":"SAMPLE Northfield Home Furnishings","company_domain":"northfield-home.example","linkedin_url":"https://www.linkedin.com/in/sample-jordan-lee","location":"Charlotte, North Carolina, United States"}},"status":"ready","retry_after_seconds":null,"query":{"first_name":"Jordan","last_name":"Lee","domain":"northfield-home.example","min_email_status":"verified"},"notice":null,"usage":{"unit":"person_email","records":1,"already_paid":0,"cost":0.03,"balance":48.97,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/enrich/people/phone/find":{"post":{"operationId":"enrich_people_phone_find","summary":"Find a phone number","description":"Finds a person's phone number, usually a mobile, from their LinkedIn profile, their email, their name and the website of their employer, or the `person_id` another call returned. A LinkedIn profile finds the most. Costs $0.10 when a number is found; finding none is free. Sources are tried in a fixed order, cheapest first. Every number is checked against the numbering plan of its country and returned in E.164 format with its `type` (`mobile`, `landline`, `voip`, or `unknown` when the check did not answer) and `country`; a number that cannot exist is dropped and not charged. A mobile number comes with a `wa.me` link to start a WhatsApp chat: whether the person uses WhatsApp on it is not checked. The line itself is not called or checked. Use it for people you have a reason to call, and respect the rules on calling and messaging where they are.","tags":["enrich"],"externalDocs":{"url":"https://won.dev/docs/enrich/people-phone-find"},"x-mode":"waterfall","x-billing":"per result","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"description":"The person's email address, such as `jane@example.com`.","type":"string","maxLength":254},"linkedin_url":{"description":"The person's LinkedIn profile, such as `https://www.linkedin.com/in/jane-doe`.","type":"string","maxLength":300},"first_name":{"description":"First name, with `last_name` and `domain`.","type":"string","maxLength":80},"last_name":{"description":"Last name, with `first_name` and `domain`.","type":"string","maxLength":80},"domain":{"description":"The website of the person's employer, such as `example.com`, with `first_name` and `last_name`.","type":"string","maxLength":253},"company_id":{"type":"string","maxLength":40,"description":"A company ID from the trade data API, such as `co_8f3k2m9x4p1q`, instead of `domain`: the company's website on record is used."},"person_id":{"type":"string","maxLength":40,"description":"A person ID this account was given in the last 90 days, such as `per_4m7q2x9k1c8d`, instead of naming the person: their name, employer website and LinkedIn profile on file are used. What you pass besides it wins."},"max_cost":{"description":"Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged.","type":"number","exclusiveMinimum":0},"dry_run":{"default":false,"description":"If true, only return the maximum cost of this call. Nothing runs, nothing is charged.","type":"boolean"}},"required":[],"additionalProperties":false},"example":{"linkedin_url":"https://www.linkedin.com/in/sample-jordan-lee"}}}},"responses":{"200":{"description":"The result. With `dry_run`, only the maximum cost.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"anyOf":[{"type":"object","properties":{"number":{"type":"string","description":"In E.164 format, such as `+14155550123`."},"type":{"type":"string","enum":["mobile","landline","voip","other","unknown"],"description":"What the numbering plan says the number is: `mobile`, `landline`, `voip`, `other`, or `unknown`. It is not a live check of the line."},"country":{"description":"ISO 3166 code of the country the number belongs to.","type":["string","null"]},"whatsapp_url":{"description":"A `wa.me` link that opens a chat with a mobile number. Whether the number uses WhatsApp is not checked. Null for other numbers.","type":["string","null"]}},"required":["number","type","country","whatsapp_url"],"additionalProperties":false},{"type":"null"}],"description":"The phone number. Null when none was found."},"query":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The request as it was understood: country names as codes, the default dates filled in."},"notice":{"description":"A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"unit":{"type":"string","enum":["person_record","person_profile","person_email","person_phone","email_verification","company_listing","company_record","company_channels","company_technologies","company_funding","company_news","company_lookalikes","job_posting"],"description":"What is counted."},"records":{"type":"integer","description":"How many were returned and charged."},"already_paid":{"type":"integer","description":"How many more were returned for free, because this organization paid for them in the last 30 days."},"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["unit","records","already_paid","cost","balance","replayed"],"additionalProperties":false,"description":"What this call was charged, and the balance left."}},"required":["data","query","notice","usage"],"additionalProperties":false},{"$ref":"#/components/schemas/DryRun"}]},"example":{"data":{"number":"+17045550142","type":"mobile","country":"US","whatsapp_url":"https://wa.me/17045550142"},"query":{"linkedin_url":"https://www.linkedin.com/in/sample-jordan-lee"},"notice":null,"usage":{"unit":"person_phone","records":1,"already_paid":0,"cost":0.1,"balance":48.9,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/enrich/email/verify":{"post":{"operationId":"enrich_email_verify","summary":"Verify an email address","description":"Checks whether an email address can receive mail, without sending anything to it: `verified` (the mailbox exists), `risky` (the domain accepts every address, so this one cannot be confirmed), `invalid` (do not send) or `unknown`. Also says whether it is a webmail address and whether it is a shared mailbox such as `info@`. Costs $0.003 for a verdict; `unknown` is free. Check addresses you got elsewhere before a campaign: the emails the other endpoints return are already checked.","tags":["enrich"],"externalDocs":{"url":"https://won.dev/docs/enrich/email-verify"},"x-mode":"proxy","x-billing":"per result","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"description":"The address to check, such as `jane@example.com`.","type":"string","maxLength":254},"max_cost":{"description":"Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged.","type":"number","exclusiveMinimum":0},"dry_run":{"default":false,"description":"If true, only return the maximum cost of this call. Nothing runs, nothing is charged.","type":"boolean"}},"required":["email"],"additionalProperties":false},"example":{"email":"jordan.lee@northfield-home.example"}}}},"responses":{"200":{"description":"The result. With `dry_run`, only the maximum cost.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"type":"object","properties":{"email":{"type":"string","description":"The address, in lower case."},"status":{"type":"string","enum":["verified","risky","invalid","unknown"],"description":"`verified`: the mailbox exists. `risky`: the domain accepts every address, so this one cannot be confirmed. `invalid`: the mailbox does not exist; do not send. `unknown`: the mail server gave no answer; nothing is charged."},"webmail":{"type":"boolean","description":"The address is at a webmail provider such as `gmail.com`, not at a company."},"shared_mailbox":{"type":"boolean","description":"The address is a team's, such as `info@` or `sales@`, not one person's."}},"required":["email","status","webmail","shared_mailbox"],"additionalProperties":false,"description":"The verdict on the address."},"query":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The request as it was understood: country names as codes, the default dates filled in."},"notice":{"description":"A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"unit":{"type":"string","enum":["person_record","person_profile","person_email","person_phone","email_verification","company_listing","company_record","company_channels","company_technologies","company_funding","company_news","company_lookalikes","job_posting"],"description":"What is counted."},"records":{"type":"integer","description":"How many were returned and charged."},"already_paid":{"type":"integer","description":"How many more were returned for free, because this organization paid for them in the last 30 days."},"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["unit","records","already_paid","cost","balance","replayed"],"additionalProperties":false,"description":"What this call was charged, and the balance left."}},"required":["data","query","notice","usage"],"additionalProperties":false},{"$ref":"#/components/schemas/DryRun"}]},"example":{"data":{"email":"jordan.lee@northfield-home.example","status":"verified","webmail":false,"shared_mailbox":false},"query":{"email":"jordan.lee@northfield-home.example"},"notice":null,"usage":{"unit":"email_verification","records":1,"already_paid":0,"cost":0.003,"balance":48.997,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/signals/hiring/search":{"post":{"operationId":"signals_hiring_search","summary":"Find companies that are hiring","description":"Lists the companies that just posted jobs: a team they are building is a reason to write to them now. Costs $0.03 for each company returned; an empty result is free, and the same company with the same postings is free again for 30 days. Each row is one company, with `why_now`, a sentence to open a message with, `matches`, how many of its postings fit, and up to 5 of them, newest first. It reads the postings of the last 7 days by default (up to 60), lists only companies that posted under their own website, and leaves out staffing agencies and job boards unless `include_agencies`. Narrow it to the team that buys what you sell with `department` or `titles`, such as `purchasing` for sourcing services or `sales` for sales software, and with `seniority`, `job_country` and `min_jobs`. Next: `POST /enrich/people/search` with a row's `domain` for the people to write to. To check companies you already have, use `POST /signals/find`.","tags":["signals"],"externalDocs":{"url":"https://won.dev/docs/signals/hiring-search"},"x-mode":"proxy","x-billing":"per result","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"since":{"description":"First day of the period, `YYYY-MM-DD`. Default: 7 days ago. At most 60 days back.","type":"string","maxLength":10},"titles":{"description":"Job title words, such as `buyer` or `sales development`: postings whose title has any of them. Up to 10.","minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":2,"maxLength":60}},"seniority":{"description":"Only postings for these levels, read from the title: `owner`, `c_level`, `executive`, `manager`, `senior`, `staff`.","minItems":1,"maxItems":6,"type":"array","items":{"type":"string","enum":["owner","c_level","executive","manager","senior","staff"]}},"department":{"description":"Only postings in these departments, read from the title: `purchasing`, `sales`, `management`, `operations`, `marketing`, `finance`, `engineering`, `quality`, `it`, `hr`, `legal`.","minItems":1,"maxItems":11,"type":"array","items":{"type":"string","enum":["purchasing","sales","management","operations","marketing","finance","engineering","quality","it","hr","legal"]}},"job_country":{"description":"Where the jobs are. ISO codes such as `US`, or English names. Up to 10.","minItems":1,"maxItems":10,"type":"array","items":{"description":"Where the jobs are. An ISO code such as `US`, or an English name such as `United States`.","type":"string","maxLength":80}},"remote":{"description":"Only remote jobs, when `true`.","type":"boolean"},"min_jobs":{"description":"Only companies with at least this many postings in the period. Default 1; 3 or more finds companies building a team.","type":"integer","minimum":1,"maximum":20},"include_agencies":{"description":"Also list staffing agencies and job boards that post for others. Default `false`.","type":"boolean"},"exclude_domains":{"description":"Companies to leave out by website, such as your customers or companies you already wrote to. Up to 100.","maxItems":100,"type":"array","items":{"description":"A website to leave out.","type":"string","maxLength":253}},"limit":{"default":10,"description":"How many companies to return, 1 to 50. You pay for the companies returned.","type":"integer","minimum":1,"maximum":50},"cursor":{"description":"To get the next page, pass `next_cursor` of the previous response back unchanged, with the same parameters.","type":"string","maxLength":200},"max_cost":{"description":"Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged.","type":"number","exclusiveMinimum":0},"dry_run":{"default":false,"description":"If true, only return the maximum cost of this call. Nothing runs, nothing is charged.","type":"boolean"}},"required":[],"additionalProperties":false},"example":{"department":["purchasing"],"job_country":["US"],"limit":1}}}},"responses":{"200":{"description":"The result. With `dry_run`, only the maximum cost.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"company":{"type":"object","properties":{"id":{"description":"The company's ID in the trade data API, such as `co_8f3k2m9x4p1q`, for a company found in customs records: pass it as `company_id`. Null for the others.","type":["string","null"]},"name":{"type":"string","description":"Company name."},"domain":{"description":"Its website, such as `example.com`: pass it as `domain` to the company and people endpoints. Always set for `hiring` and `funding`; often null for `import_surge`, where `id` stands for the company.","type":["string","null"]},"country":{"description":"ISO 3166 code: where the headquarters are, or for `import_surge` the country it imports into.","type":["string","null"]},"employees":{"description":"Headcount range: `1-10`, `11-50`, `51-200`, `201-500`, `501-1000`, `1001-5000`, `5001-10000` or `10001+`, as the `size` of `POST /enrich/companies/search` takes it. Null when not known.","type":["string","null"]},"industry":{"description":"Its industry, by LinkedIn's name for it when it has one, such as `Furniture and Home Furnishings Manufacturing`, as the `industry` of `POST /enrich/companies/search` takes it. Null when not known.","type":["string","null"]}},"required":["id","name","domain","country","employees","industry"],"additionalProperties":false,"description":"The company the signals are about."},"type":{"type":"string","enum":["hiring","funding","import_surge"],"description":"What kind of signal this company has."},"why_now":{"type":"string","description":"One sentence on what happened, with numbers and dates, to open a message with or to decide whom to contact first."},"matches":{"type":"integer","description":"How many signals of this kind the company has in the period. Up to 5 are listed."},"signals":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","description":"Signal ID, such as `sig_3k8m2x9p4q1w`. The same event keeps its ID, so you can tell new signals from ones you saw."},"occurred_at":{"description":"When it happened, `YYYY-MM-DD`: the day a job was posted or a round announced, or the last day of the latest month an import surge covers.","type":["string","null"]},"title":{"type":"string","description":"What happened, in a few words."},"url":{"description":"Where to read about it: the posting, or an article.","type":["string","null"]},"type":{"type":"string","const":"hiring","description":"The kind of signal, as the row's `type`."},"job":{"type":"object","properties":{"id":{"type":"string","description":"Job ID, such as `job_6t2m9x4p1q8w`."},"title":{"type":"string"},"url":{"description":"Where to read the posting and apply.","type":["string","null"]},"location":{"description":"Where the job is, as the posting says.","type":["string","null"]},"countries":{"type":"array","items":{"type":"string"},"description":"The countries of its places, as English names."},"workplace":{"anyOf":[{"type":"string","enum":["remote","hybrid","on_site"]},{"type":"null"}],"description":"Whether the job is remote, hybrid or on site."},"employment":{"anyOf":[{"type":"string","enum":["full_time","part_time","contract","internship"]},{"type":"null"}],"description":"The kind of contract."},"seniority":{"description":"The level the posting asks for.","type":["string","null"]},"posted_at":{"description":"Date it was posted, `YYYY-MM-DD`.","type":["string","null"]},"salary":{"anyOf":[{"type":"object","properties":{"min":{"type":["number","null"]},"max":{"type":["number","null"]},"currency":{"type":["string","null"]},"period":{"description":"Such as `year` or `hour`.","type":["string","null"]}},"required":["min","max","currency","period"],"additionalProperties":false},{"type":"null"}],"description":"Pay as the posting states it. Null when it states none."},"department":{"anyOf":[{"type":"string","enum":["purchasing","sales","management","operations","marketing","finance","engineering","quality","it","hr","legal"]},{"type":"null"}],"description":"Department, read from the title."}},"required":["id","title","url","location","countries","workplace","employment","seniority","posted_at","salary","department"],"additionalProperties":false,"description":"`hiring` only: the posting."}},"required":["id","occurred_at","title","url","type","job"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","description":"Signal ID, such as `sig_3k8m2x9p4q1w`. The same event keeps its ID, so you can tell new signals from ones you saw."},"occurred_at":{"description":"When it happened, `YYYY-MM-DD`: the day a job was posted or a round announced, or the last day of the latest month an import surge covers.","type":["string","null"]},"title":{"type":"string","description":"What happened, in a few words."},"url":{"description":"Where to read about it: the posting, or an article.","type":["string","null"]},"type":{"type":"string","const":"funding","description":"The kind of signal, as the row's `type`."},"round":{"type":"object","properties":{"stage":{"anyOf":[{"type":"string","enum":["pre_seed","seed","series_a","series_b","series_c","series_d","series_e_plus","debt","grant","other"]},{"type":"null"}],"description":"Such as `seed` or `series_b`."},"amount_usd":{"description":"Money raised, in US dollars.","type":["number","null"]},"valuation_usd":{"description":"Valuation, in US dollars, when it was made public.","type":["number","null"]},"lead_investors":{"type":"array","items":{"type":"string"},"description":"The investors who led the round, when named."},"investors":{"type":"array","items":{"type":"string"},"description":"Every investor named, the leads included. Empty when none is named."}},"required":["stage","amount_usd","valuation_usd","lead_investors","investors"],"additionalProperties":false,"description":"`funding` only: the round."}},"required":["id","occurred_at","title","url","type","round"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","description":"Signal ID, such as `sig_3k8m2x9p4q1w`. The same event keeps its ID, so you can tell new signals from ones you saw."},"occurred_at":{"description":"When it happened, `YYYY-MM-DD`: the day a job was posted or a round announced, or the last day of the latest month an import surge covers.","type":["string","null"]},"title":{"type":"string","description":"What happened, in a few words."},"url":{"description":"Where to read about it: the posting, or an article.","type":["string","null"]},"type":{"type":"string","const":"import_surge","description":"The kind of signal, as the row's `type`."},"imports":{"type":"object","properties":{"hs_code":{"description":"The HS code the records were counted for. Null for all its imports.","type":["string","null"]},"recent":{"type":"object","properties":{"since":{"type":"string","description":"First month, `YYYY-MM`."},"until":{"type":"string","description":"Last month, `YYYY-MM`."},"shipments":{"type":"integer","description":"Shipment records in these months."}},"required":["since","until","shipments"],"additionalProperties":false,"description":"The latest 3 complete months."},"baseline":{"type":"object","properties":{"since":{"type":"string","description":"First month, `YYYY-MM`."},"until":{"type":"string","description":"Last month, `YYYY-MM`."},"shipments":{"type":"integer","description":"Shipment records in these months."}},"required":["since","until","shipments"],"additionalProperties":false,"description":"The 6 months before them."},"growth":{"description":"How much more it imported a month in `recent` than in `baseline`: `0.44` is 44% more. Null when `baseline` has none: it started importing.","type":["number","null"]},"by_month":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"month":{"type":"string","description":"`YYYY-MM`"},"shipments":{"type":"integer"}},"required":["month","shipments"],"additionalProperties":false}},{"type":"null"}],"description":"Shipment records month by month, oldest first. Null in a search, which counts periods only."}},"required":["hs_code","recent","baseline","growth","by_month"],"additionalProperties":false,"description":"`import_surge` only: the customs records of the two periods compared."}},"required":["id","occurred_at","title","url","type","imports"],"additionalProperties":false}]},"description":"The newest first, up to 5. Each has the fields of its `type`: `job`, `round` or `imports`."}},"required":["company","type","why_now","matches","signals"],"additionalProperties":false},"description":"The companies of this page, the newest signal first."},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"How many companies match in all. Null until every posting of the period was read."},"has_more":{"type":"boolean","description":"Whether more companies follow this page. A page can hold fewer than `limit` and still have more."},"next_cursor":{"description":"Pass it as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"query":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The request as it was understood: country names as codes, the default dates filled in."},"notice":{"description":"A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"unit":{"type":"string","enum":["signal_hiring","signal_funding","signal_import_surge"],"description":"What is counted."},"records":{"type":"integer","description":"How many were returned and charged."},"already_paid":{"type":"integer","description":"How many more were returned for free, because this organization paid for them in the last 30 days."},"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["unit","records","already_paid","cost","balance","replayed"],"additionalProperties":false,"description":"What this call was charged, and the balance left."}},"required":["data","total","has_more","next_cursor","query","notice","usage"],"additionalProperties":false},{"$ref":"#/components/schemas/DryRun"}]},"example":{"data":[{"company":{"id":null,"name":"SAMPLE Northfield Home Furnishings","domain":"northfield-home.example","country":"US","employees":"201-500","industry":"Retail Furniture and Home Furnishings"},"type":"hiring","why_now":"Posted 2 jobs in the last 30 days, the newest \"Senior Buyer, Upholstery\" (Charlotte, NC) on 2026-11-12.","matches":2,"signals":[{"id":"sig_3k8m2x9p4q1w","type":"hiring","occurred_at":"2026-11-12","title":"Senior Buyer, Upholstery","url":"https://careers.northfield-home.example/senior-buyer-upholstery","job":{"id":"job_6t2m9x4p1q8w","title":"Senior Buyer, Upholstery","url":"https://careers.northfield-home.example/senior-buyer-upholstery","location":"Charlotte, NC","countries":["United States"],"workplace":"hybrid","employment":"full_time","seniority":"Senior","posted_at":"2026-11-12","salary":{"min":85000,"max":110000,"currency":"USD","period":"year"},"department":"purchasing"}},{"id":"sig_7c1v5n8b2m6t","type":"hiring","occurred_at":"2026-11-03","title":"Sourcing Manager, Vietnam","url":"https://careers.northfield-home.example/sourcing-manager-vietnam","job":{"id":"job_3k8n1v5c7x2z","title":"Sourcing Manager, Vietnam","url":"https://careers.northfield-home.example/sourcing-manager-vietnam","location":"Ho Chi Minh City, Vietnam","countries":["Vietnam"],"workplace":"on_site","employment":"full_time","seniority":"Mid-Level","posted_at":"2026-11-03","salary":null,"department":"purchasing"}}]}],"total":null,"has_more":true,"next_cursor":"cur_Zx81kQp4b2JtMW0uMXJ6ZzQ","query":{"since":"2026-11-16","department":["purchasing"],"job_country":["US"],"min_jobs":1,"limit":1},"notice":null,"usage":{"unit":"signal_hiring","records":1,"already_paid":0,"cost":0.03,"balance":48.97,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/signals/funding/search":{"post":{"operationId":"signals_funding_search","summary":"Find companies that raised money","description":"Lists the companies that just announced a funding round: with new money, a company buys software, services and help it could not pay for before. Costs $0.20 for each company returned; an empty result is free, and the same company with the same round is free again for 30 days. Each row is one company, with `why_now`, a sentence to open a message with, and its round: stage, amount, investors and a link to the announcement. It reads the rounds of the last 30 days by default (up to 365), narrowed by `company_country`, `stages` and amount. Next: `POST /enrich/people/search` with a row's `domain` for the people to write to. To check companies you already have, use `POST /signals/find`.","tags":["signals"],"externalDocs":{"url":"https://won.dev/docs/signals/funding-search"},"x-mode":"proxy","x-billing":"per result","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"since":{"description":"First day of the period, `YYYY-MM-DD`. Default: 30 days ago. At most 365 days back.","type":"string","maxLength":10},"company_country":{"description":"Where the headquarters are. ISO codes such as `US`, or English names. Up to 10.","minItems":1,"maxItems":10,"type":"array","items":{"description":"Where the headquarters are. An ISO code such as `US`, or an English name such as `United States`.","type":"string","maxLength":80}},"stages":{"description":"Only rounds of these stages: `pre_seed`, `seed`, `series_a`, `series_b`, `series_c`, `series_d`, `series_e_plus`, `debt`, `grant`.","minItems":1,"maxItems":9,"type":"array","items":{"type":"string","enum":["pre_seed","seed","series_a","series_b","series_c","series_d","series_e_plus","debt","grant"]}},"min_amount_usd":{"description":"Only rounds of at least this many US dollars.","type":"number","minimum":0},"max_amount_usd":{"description":"Only rounds of at most this many US dollars.","type":"number","minimum":0},"exclude_domains":{"description":"Companies to leave out by website, such as your customers or companies you already wrote to. Up to 100.","maxItems":100,"type":"array","items":{"description":"A website to leave out.","type":"string","maxLength":253}},"limit":{"default":10,"description":"How many companies to return, 1 to 50. You pay for the companies returned.","type":"integer","minimum":1,"maximum":50},"cursor":{"description":"To get the next page, pass `next_cursor` of the previous response back unchanged, with the same parameters.","type":"string","maxLength":200},"max_cost":{"description":"Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged.","type":"number","exclusiveMinimum":0},"dry_run":{"default":false,"description":"If true, only return the maximum cost of this call. Nothing runs, nothing is charged.","type":"boolean"}},"required":[],"additionalProperties":false},"example":{"company_country":["US"],"stages":["series_a"],"limit":1}}}},"responses":{"200":{"description":"The result. With `dry_run`, only the maximum cost.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"company":{"type":"object","properties":{"id":{"description":"The company's ID in the trade data API, such as `co_8f3k2m9x4p1q`, for a company found in customs records: pass it as `company_id`. Null for the others.","type":["string","null"]},"name":{"type":"string","description":"Company name."},"domain":{"description":"Its website, such as `example.com`: pass it as `domain` to the company and people endpoints. Always set for `hiring` and `funding`; often null for `import_surge`, where `id` stands for the company.","type":["string","null"]},"country":{"description":"ISO 3166 code: where the headquarters are, or for `import_surge` the country it imports into.","type":["string","null"]},"employees":{"description":"Headcount range: `1-10`, `11-50`, `51-200`, `201-500`, `501-1000`, `1001-5000`, `5001-10000` or `10001+`, as the `size` of `POST /enrich/companies/search` takes it. Null when not known.","type":["string","null"]},"industry":{"description":"Its industry, by LinkedIn's name for it when it has one, such as `Furniture and Home Furnishings Manufacturing`, as the `industry` of `POST /enrich/companies/search` takes it. Null when not known.","type":["string","null"]}},"required":["id","name","domain","country","employees","industry"],"additionalProperties":false,"description":"The company the signals are about."},"type":{"type":"string","enum":["hiring","funding","import_surge"],"description":"What kind of signal this company has."},"why_now":{"type":"string","description":"One sentence on what happened, with numbers and dates, to open a message with or to decide whom to contact first."},"matches":{"type":"integer","description":"How many signals of this kind the company has in the period. Up to 5 are listed."},"signals":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","description":"Signal ID, such as `sig_3k8m2x9p4q1w`. The same event keeps its ID, so you can tell new signals from ones you saw."},"occurred_at":{"description":"When it happened, `YYYY-MM-DD`: the day a job was posted or a round announced, or the last day of the latest month an import surge covers.","type":["string","null"]},"title":{"type":"string","description":"What happened, in a few words."},"url":{"description":"Where to read about it: the posting, or an article.","type":["string","null"]},"type":{"type":"string","const":"hiring","description":"The kind of signal, as the row's `type`."},"job":{"type":"object","properties":{"id":{"type":"string","description":"Job ID, such as `job_6t2m9x4p1q8w`."},"title":{"type":"string"},"url":{"description":"Where to read the posting and apply.","type":["string","null"]},"location":{"description":"Where the job is, as the posting says.","type":["string","null"]},"countries":{"type":"array","items":{"type":"string"},"description":"The countries of its places, as English names."},"workplace":{"anyOf":[{"type":"string","enum":["remote","hybrid","on_site"]},{"type":"null"}],"description":"Whether the job is remote, hybrid or on site."},"employment":{"anyOf":[{"type":"string","enum":["full_time","part_time","contract","internship"]},{"type":"null"}],"description":"The kind of contract."},"seniority":{"description":"The level the posting asks for.","type":["string","null"]},"posted_at":{"description":"Date it was posted, `YYYY-MM-DD`.","type":["string","null"]},"salary":{"anyOf":[{"type":"object","properties":{"min":{"type":["number","null"]},"max":{"type":["number","null"]},"currency":{"type":["string","null"]},"period":{"description":"Such as `year` or `hour`.","type":["string","null"]}},"required":["min","max","currency","period"],"additionalProperties":false},{"type":"null"}],"description":"Pay as the posting states it. Null when it states none."},"department":{"anyOf":[{"type":"string","enum":["purchasing","sales","management","operations","marketing","finance","engineering","quality","it","hr","legal"]},{"type":"null"}],"description":"Department, read from the title."}},"required":["id","title","url","location","countries","workplace","employment","seniority","posted_at","salary","department"],"additionalProperties":false,"description":"`hiring` only: the posting."}},"required":["id","occurred_at","title","url","type","job"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","description":"Signal ID, such as `sig_3k8m2x9p4q1w`. The same event keeps its ID, so you can tell new signals from ones you saw."},"occurred_at":{"description":"When it happened, `YYYY-MM-DD`: the day a job was posted or a round announced, or the last day of the latest month an import surge covers.","type":["string","null"]},"title":{"type":"string","description":"What happened, in a few words."},"url":{"description":"Where to read about it: the posting, or an article.","type":["string","null"]},"type":{"type":"string","const":"funding","description":"The kind of signal, as the row's `type`."},"round":{"type":"object","properties":{"stage":{"anyOf":[{"type":"string","enum":["pre_seed","seed","series_a","series_b","series_c","series_d","series_e_plus","debt","grant","other"]},{"type":"null"}],"description":"Such as `seed` or `series_b`."},"amount_usd":{"description":"Money raised, in US dollars.","type":["number","null"]},"valuation_usd":{"description":"Valuation, in US dollars, when it was made public.","type":["number","null"]},"lead_investors":{"type":"array","items":{"type":"string"},"description":"The investors who led the round, when named."},"investors":{"type":"array","items":{"type":"string"},"description":"Every investor named, the leads included. Empty when none is named."}},"required":["stage","amount_usd","valuation_usd","lead_investors","investors"],"additionalProperties":false,"description":"`funding` only: the round."}},"required":["id","occurred_at","title","url","type","round"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","description":"Signal ID, such as `sig_3k8m2x9p4q1w`. The same event keeps its ID, so you can tell new signals from ones you saw."},"occurred_at":{"description":"When it happened, `YYYY-MM-DD`: the day a job was posted or a round announced, or the last day of the latest month an import surge covers.","type":["string","null"]},"title":{"type":"string","description":"What happened, in a few words."},"url":{"description":"Where to read about it: the posting, or an article.","type":["string","null"]},"type":{"type":"string","const":"import_surge","description":"The kind of signal, as the row's `type`."},"imports":{"type":"object","properties":{"hs_code":{"description":"The HS code the records were counted for. Null for all its imports.","type":["string","null"]},"recent":{"type":"object","properties":{"since":{"type":"string","description":"First month, `YYYY-MM`."},"until":{"type":"string","description":"Last month, `YYYY-MM`."},"shipments":{"type":"integer","description":"Shipment records in these months."}},"required":["since","until","shipments"],"additionalProperties":false,"description":"The latest 3 complete months."},"baseline":{"type":"object","properties":{"since":{"type":"string","description":"First month, `YYYY-MM`."},"until":{"type":"string","description":"Last month, `YYYY-MM`."},"shipments":{"type":"integer","description":"Shipment records in these months."}},"required":["since","until","shipments"],"additionalProperties":false,"description":"The 6 months before them."},"growth":{"description":"How much more it imported a month in `recent` than in `baseline`: `0.44` is 44% more. Null when `baseline` has none: it started importing.","type":["number","null"]},"by_month":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"month":{"type":"string","description":"`YYYY-MM`"},"shipments":{"type":"integer"}},"required":["month","shipments"],"additionalProperties":false}},{"type":"null"}],"description":"Shipment records month by month, oldest first. Null in a search, which counts periods only."}},"required":["hs_code","recent","baseline","growth","by_month"],"additionalProperties":false,"description":"`import_surge` only: the customs records of the two periods compared."}},"required":["id","occurred_at","title","url","type","imports"],"additionalProperties":false}]},"description":"The newest first, up to 5. Each has the fields of its `type`: `job`, `round` or `imports`."}},"required":["company","type","why_now","matches","signals"],"additionalProperties":false},"description":"The companies of this page, the newest signal first."},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"How many companies match in all."},"has_more":{"type":"boolean","description":"Whether more companies follow this page."},"next_cursor":{"description":"Pass it as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"query":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The request as it was understood: country names as codes, the default dates filled in."},"notice":{"description":"A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"unit":{"type":"string","enum":["signal_hiring","signal_funding","signal_import_surge"],"description":"What is counted."},"records":{"type":"integer","description":"How many were returned and charged."},"already_paid":{"type":"integer","description":"How many more were returned for free, because this organization paid for them in the last 30 days."},"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["unit","records","already_paid","cost","balance","replayed"],"additionalProperties":false,"description":"What this call was charged, and the balance left."}},"required":["data","total","has_more","next_cursor","query","notice","usage"],"additionalProperties":false},{"$ref":"#/components/schemas/DryRun"}]},"example":{"data":[{"company":{"id":null,"name":"SAMPLE Harborside Seating Co","domain":"harborside-seating.example","country":"US","employees":"51-200","industry":"Furniture"},"type":"funding","why_now":"Raised $12M in a Series A round on 2026-11-18.","matches":1,"signals":[{"id":"sig_9q4w1e7r3t5y","type":"funding","occurred_at":"2026-11-18","title":"Series A round of $12M","url":"https://news.harborside-seating.example/series-a","round":{"stage":"series_a","amount_usd":12000000,"valuation_usd":null,"lead_investors":[],"investors":[]}}]}],"total":1,"has_more":false,"next_cursor":null,"query":{"since":"2026-10-24","company_country":["US"],"stages":["series_a"],"limit":1},"notice":null,"usage":{"unit":"signal_funding","records":1,"already_paid":0,"cost":0.2,"balance":48.8,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/signals/import-surge/search":{"post":{"operationId":"signals_import_surge_search","summary":"Find companies importing more","description":"Lists the importers whose customs records of a product grew: a company that imports more needs more goods, parts, packaging, freight and finance. Costs $0.05 for each company returned; an empty result is free, and the same company with the same months is free again for 30 days. It compares the largest importers of an `hs_code` or `product` in the latest 3 complete months with the 6 before, and lists those that imported `min_growth` more a month, or started importing. Each row is one company, with `why_now`, a sentence to open a message with, and its months compared. Narrow it with `importer_country`, `exporter_country` and `min_shipments`. Next: `GET /trade/companies/{id}/contacts` with a row's company `id` for the people to write to, or `POST /enrich/people/search` with its `domain`. To check companies you already have, use `POST /signals/find`.","tags":["signals"],"externalDocs":{"url":"https://won.dev/docs/signals/import-surge-search"},"x-mode":"proxy","x-billing":"per result","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hs_code":{"description":"HS code, digits only, 6 to 10 digits. Six digits are the same in every country; a longer code is one country's own tariff line, matched by prefix. Find the code of a product with `GET /trade/hs-codes`.","type":"string","maxLength":20},"product":{"type":"string","minLength":2,"maxLength":100,"description":"Product keywords in English, such as `office chair`. A fuzzy match on the goods description. Use it when you do not know the HS code; an `hs_code` is more precise."},"importer_country":{"description":"Country the goods are imported into: an ISO code such as `US`, or an English name such as `United States`.","type":"string","maxLength":80},"exporter_country":{"description":"Country the goods are exported from: an ISO code such as `VN`, or an English name such as `Vietnam`.","type":"string","maxLength":80},"min_growth":{"description":"How much more a month the latest 3 complete months must have had than the 6 before: `0.3` (default) is 30% more.","type":"number","minimum":0.1,"maximum":10},"min_shipments":{"description":"Shipment records in the latest 3 complete months, at least. Default 6.","type":"integer","minimum":1,"maximum":1000},"exclude_domains":{"description":"Companies to leave out by website, such as your customers or companies you already wrote to. Up to 100.","maxItems":100,"type":"array","items":{"description":"A website to leave out.","type":"string","maxLength":253}},"limit":{"default":10,"description":"How many companies to return, 1 to 50. You pay for the companies returned.","type":"integer","minimum":1,"maximum":50},"cursor":{"description":"To get the next page, pass `next_cursor` of the previous response back unchanged, with the same parameters.","type":"string","maxLength":200},"max_cost":{"description":"Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged.","type":"number","exclusiveMinimum":0},"dry_run":{"default":false,"description":"If true, only return the maximum cost of this call. Nothing runs, nothing is charged.","type":"boolean"}},"required":[],"additionalProperties":false},"example":{"hs_code":"940161","importer_country":"US","limit":1}}}},"responses":{"200":{"description":"The result. With `dry_run`, only the maximum cost.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"company":{"type":"object","properties":{"id":{"description":"The company's ID in the trade data API, such as `co_8f3k2m9x4p1q`, for a company found in customs records: pass it as `company_id`. Null for the others.","type":["string","null"]},"name":{"type":"string","description":"Company name."},"domain":{"description":"Its website, such as `example.com`: pass it as `domain` to the company and people endpoints. Always set for `hiring` and `funding`; often null for `import_surge`, where `id` stands for the company.","type":["string","null"]},"country":{"description":"ISO 3166 code: where the headquarters are, or for `import_surge` the country it imports into.","type":["string","null"]},"employees":{"description":"Headcount range: `1-10`, `11-50`, `51-200`, `201-500`, `501-1000`, `1001-5000`, `5001-10000` or `10001+`, as the `size` of `POST /enrich/companies/search` takes it. Null when not known.","type":["string","null"]},"industry":{"description":"Its industry, by LinkedIn's name for it when it has one, such as `Furniture and Home Furnishings Manufacturing`, as the `industry` of `POST /enrich/companies/search` takes it. Null when not known.","type":["string","null"]}},"required":["id","name","domain","country","employees","industry"],"additionalProperties":false,"description":"The company the signals are about."},"type":{"type":"string","enum":["hiring","funding","import_surge"],"description":"What kind of signal this company has."},"why_now":{"type":"string","description":"One sentence on what happened, with numbers and dates, to open a message with or to decide whom to contact first."},"matches":{"type":"integer","description":"How many signals of this kind the company has in the period. Up to 5 are listed."},"signals":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","description":"Signal ID, such as `sig_3k8m2x9p4q1w`. The same event keeps its ID, so you can tell new signals from ones you saw."},"occurred_at":{"description":"When it happened, `YYYY-MM-DD`: the day a job was posted or a round announced, or the last day of the latest month an import surge covers.","type":["string","null"]},"title":{"type":"string","description":"What happened, in a few words."},"url":{"description":"Where to read about it: the posting, or an article.","type":["string","null"]},"type":{"type":"string","const":"hiring","description":"The kind of signal, as the row's `type`."},"job":{"type":"object","properties":{"id":{"type":"string","description":"Job ID, such as `job_6t2m9x4p1q8w`."},"title":{"type":"string"},"url":{"description":"Where to read the posting and apply.","type":["string","null"]},"location":{"description":"Where the job is, as the posting says.","type":["string","null"]},"countries":{"type":"array","items":{"type":"string"},"description":"The countries of its places, as English names."},"workplace":{"anyOf":[{"type":"string","enum":["remote","hybrid","on_site"]},{"type":"null"}],"description":"Whether the job is remote, hybrid or on site."},"employment":{"anyOf":[{"type":"string","enum":["full_time","part_time","contract","internship"]},{"type":"null"}],"description":"The kind of contract."},"seniority":{"description":"The level the posting asks for.","type":["string","null"]},"posted_at":{"description":"Date it was posted, `YYYY-MM-DD`.","type":["string","null"]},"salary":{"anyOf":[{"type":"object","properties":{"min":{"type":["number","null"]},"max":{"type":["number","null"]},"currency":{"type":["string","null"]},"period":{"description":"Such as `year` or `hour`.","type":["string","null"]}},"required":["min","max","currency","period"],"additionalProperties":false},{"type":"null"}],"description":"Pay as the posting states it. Null when it states none."},"department":{"anyOf":[{"type":"string","enum":["purchasing","sales","management","operations","marketing","finance","engineering","quality","it","hr","legal"]},{"type":"null"}],"description":"Department, read from the title."}},"required":["id","title","url","location","countries","workplace","employment","seniority","posted_at","salary","department"],"additionalProperties":false,"description":"`hiring` only: the posting."}},"required":["id","occurred_at","title","url","type","job"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","description":"Signal ID, such as `sig_3k8m2x9p4q1w`. The same event keeps its ID, so you can tell new signals from ones you saw."},"occurred_at":{"description":"When it happened, `YYYY-MM-DD`: the day a job was posted or a round announced, or the last day of the latest month an import surge covers.","type":["string","null"]},"title":{"type":"string","description":"What happened, in a few words."},"url":{"description":"Where to read about it: the posting, or an article.","type":["string","null"]},"type":{"type":"string","const":"funding","description":"The kind of signal, as the row's `type`."},"round":{"type":"object","properties":{"stage":{"anyOf":[{"type":"string","enum":["pre_seed","seed","series_a","series_b","series_c","series_d","series_e_plus","debt","grant","other"]},{"type":"null"}],"description":"Such as `seed` or `series_b`."},"amount_usd":{"description":"Money raised, in US dollars.","type":["number","null"]},"valuation_usd":{"description":"Valuation, in US dollars, when it was made public.","type":["number","null"]},"lead_investors":{"type":"array","items":{"type":"string"},"description":"The investors who led the round, when named."},"investors":{"type":"array","items":{"type":"string"},"description":"Every investor named, the leads included. Empty when none is named."}},"required":["stage","amount_usd","valuation_usd","lead_investors","investors"],"additionalProperties":false,"description":"`funding` only: the round."}},"required":["id","occurred_at","title","url","type","round"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","description":"Signal ID, such as `sig_3k8m2x9p4q1w`. The same event keeps its ID, so you can tell new signals from ones you saw."},"occurred_at":{"description":"When it happened, `YYYY-MM-DD`: the day a job was posted or a round announced, or the last day of the latest month an import surge covers.","type":["string","null"]},"title":{"type":"string","description":"What happened, in a few words."},"url":{"description":"Where to read about it: the posting, or an article.","type":["string","null"]},"type":{"type":"string","const":"import_surge","description":"The kind of signal, as the row's `type`."},"imports":{"type":"object","properties":{"hs_code":{"description":"The HS code the records were counted for. Null for all its imports.","type":["string","null"]},"recent":{"type":"object","properties":{"since":{"type":"string","description":"First month, `YYYY-MM`."},"until":{"type":"string","description":"Last month, `YYYY-MM`."},"shipments":{"type":"integer","description":"Shipment records in these months."}},"required":["since","until","shipments"],"additionalProperties":false,"description":"The latest 3 complete months."},"baseline":{"type":"object","properties":{"since":{"type":"string","description":"First month, `YYYY-MM`."},"until":{"type":"string","description":"Last month, `YYYY-MM`."},"shipments":{"type":"integer","description":"Shipment records in these months."}},"required":["since","until","shipments"],"additionalProperties":false,"description":"The 6 months before them."},"growth":{"description":"How much more it imported a month in `recent` than in `baseline`: `0.44` is 44% more. Null when `baseline` has none: it started importing.","type":["number","null"]},"by_month":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"month":{"type":"string","description":"`YYYY-MM`"},"shipments":{"type":"integer"}},"required":["month","shipments"],"additionalProperties":false}},{"type":"null"}],"description":"Shipment records month by month, oldest first. Null in a search, which counts periods only."}},"required":["hs_code","recent","baseline","growth","by_month"],"additionalProperties":false,"description":"`import_surge` only: the customs records of the two periods compared."}},"required":["id","occurred_at","title","url","type","imports"],"additionalProperties":false}]},"description":"The newest first, up to 5. Each has the fields of its `type`: `job`, `round` or `imports`."}},"required":["company","type","why_now","matches","signals"],"additionalProperties":false},"description":"The companies of this page, the newest signal first."},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"How many companies match in all."},"has_more":{"type":"boolean","description":"Whether more companies follow this page."},"next_cursor":{"description":"Pass it as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"query":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The request as it was understood: country names as codes, the default dates filled in."},"notice":{"description":"A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"unit":{"type":"string","enum":["signal_hiring","signal_funding","signal_import_surge"],"description":"What is counted."},"records":{"type":"integer","description":"How many were returned and charged."},"already_paid":{"type":"integer","description":"How many more were returned for free, because this organization paid for them in the last 30 days."},"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["unit","records","already_paid","cost","balance","replayed"],"additionalProperties":false,"description":"What this call was charged, and the balance left."}},"required":["data","total","has_more","next_cursor","query","notice","usage"],"additionalProperties":false},{"$ref":"#/components/schemas/DryRun"}]},"example":{"data":[{"company":{"id":"co_8f3k2m9x4p1q","name":"SAMPLE PINE & LOOM INTERIORS LLC","domain":"pineandloom.example","country":"US","employees":null,"industry":null},"type":"import_surge","why_now":"Imported 46 shipments of HS 940161 in Jul to Sep 2026, 64% more a month than in the 6 months before (56).","matches":1,"signals":[{"id":"sig_2b6n9m3k7j1h","type":"import_surge","occurred_at":"2026-09-30","title":"Imports up 64%","url":null,"imports":{"hs_code":"940161","recent":{"since":"2026-07","until":"2026-09","shipments":46},"baseline":{"since":"2026-01","until":"2026-06","shipments":56},"growth":0.64,"by_month":null}}]}],"total":1,"has_more":false,"next_cursor":null,"query":{"hs_code":"940161","importer_country":"US","min_growth":0.3,"min_shipments":6,"data_through":"2026-11-14","limit":1},"notice":null,"usage":{"unit":"signal_import_surge","records":1,"already_paid":0,"cost":0.05,"balance":48.95,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/signals/find":{"post":{"operationId":"signals_find","summary":"Check a company's signals","description":"Checks one company for signals that make it worth writing to now: `hiring` (jobs it posted; $0.03), `funding` (a funding round it announced; $0.20) and `import_surge` (its customs records grew at least 30% a month; $0.05). Returns a row for each kind it has, with `why_now`, a sentence to open a message with, and up to 5 signals, newest first. Each kind is billed only when the company has it; none found is free, and the same signals are free again for 30 days. Name the company by `domain` or by the `company_id` of a trade company; `import_surge` needs the `company_id`, `funding` a website. By default `hiring` reads the last 30 days and `funding` the last 180; `since` sets both, up to 365 days back. To check a list of up to 100 companies, run this endpoint as a task: `POST /tasks` with `operation: \"signals.find\"`. To find companies with a signal instead, use `POST /signals/hiring/search`, `POST /signals/funding/search` or `POST /signals/import-surge/search`.","tags":["signals"],"externalDocs":{"url":"https://won.dev/docs/signals/find"},"x-mode":"proxy","x-billing":"per result","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"description":"The company's website, such as `example.com`.","type":"string","maxLength":253},"company_id":{"type":"string","maxLength":40,"description":"A company ID from the trade data API, such as `co_8f3k2m9x4p1q`, instead of `domain`: the company's website on record is used."},"name":{"description":"The company's name, as it writes it. It finds the company in the job index when its website does not, and is enough alone for `hiring`.","type":"string","minLength":2,"maxLength":200},"types":{"default":["hiring","funding","import_surge"],"description":"The kinds of signal to check: `hiring`, `funding`, `import_surge`.","minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["hiring","funding","import_surge"]}},"since":{"description":"First day of the period, `YYYY-MM-DD`, for `hiring` and `funding`. Default: 30 days ago for `hiring`, 180 for `funding`. At most 365 days back.","type":"string","maxLength":10},"titles":{"description":"For `hiring`: only postings whose title has any of these words, such as `buyer`. Up to 10.","minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":2,"maxLength":60}},"max_cost":{"description":"Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged.","type":"number","exclusiveMinimum":0},"dry_run":{"default":false,"description":"If true, only return the maximum cost of this call. Nothing runs, nothing is charged.","type":"boolean"}},"required":[],"additionalProperties":false},"example":{"domain":"northfield-home.example","types":["hiring"]}}}},"responses":{"200":{"description":"The result. With `dry_run`, only the maximum cost.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"company":{"type":"object","properties":{"id":{"description":"The company's ID in the trade data API, such as `co_8f3k2m9x4p1q`, for a company found in customs records: pass it as `company_id`. Null for the others.","type":["string","null"]},"name":{"type":"string","description":"Company name."},"domain":{"description":"Its website, such as `example.com`: pass it as `domain` to the company and people endpoints. Always set for `hiring` and `funding`; often null for `import_surge`, where `id` stands for the company.","type":["string","null"]},"country":{"description":"ISO 3166 code: where the headquarters are, or for `import_surge` the country it imports into.","type":["string","null"]},"employees":{"description":"Headcount range: `1-10`, `11-50`, `51-200`, `201-500`, `501-1000`, `1001-5000`, `5001-10000` or `10001+`, as the `size` of `POST /enrich/companies/search` takes it. Null when not known.","type":["string","null"]},"industry":{"description":"Its industry, by LinkedIn's name for it when it has one, such as `Furniture and Home Furnishings Manufacturing`, as the `industry` of `POST /enrich/companies/search` takes it. Null when not known.","type":["string","null"]}},"required":["id","name","domain","country","employees","industry"],"additionalProperties":false,"description":"The company the signals are about."},"type":{"type":"string","enum":["hiring","funding","import_surge"],"description":"What kind of signal this company has."},"why_now":{"type":"string","description":"One sentence on what happened, with numbers and dates, to open a message with or to decide whom to contact first."},"matches":{"type":"integer","description":"How many signals of this kind the company has in the period. Up to 5 are listed."},"signals":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","description":"Signal ID, such as `sig_3k8m2x9p4q1w`. The same event keeps its ID, so you can tell new signals from ones you saw."},"occurred_at":{"description":"When it happened, `YYYY-MM-DD`: the day a job was posted or a round announced, or the last day of the latest month an import surge covers.","type":["string","null"]},"title":{"type":"string","description":"What happened, in a few words."},"url":{"description":"Where to read about it: the posting, or an article.","type":["string","null"]},"type":{"type":"string","const":"hiring","description":"The kind of signal, as the row's `type`."},"job":{"type":"object","properties":{"id":{"type":"string","description":"Job ID, such as `job_6t2m9x4p1q8w`."},"title":{"type":"string"},"url":{"description":"Where to read the posting and apply.","type":["string","null"]},"location":{"description":"Where the job is, as the posting says.","type":["string","null"]},"countries":{"type":"array","items":{"type":"string"},"description":"The countries of its places, as English names."},"workplace":{"anyOf":[{"type":"string","enum":["remote","hybrid","on_site"]},{"type":"null"}],"description":"Whether the job is remote, hybrid or on site."},"employment":{"anyOf":[{"type":"string","enum":["full_time","part_time","contract","internship"]},{"type":"null"}],"description":"The kind of contract."},"seniority":{"description":"The level the posting asks for.","type":["string","null"]},"posted_at":{"description":"Date it was posted, `YYYY-MM-DD`.","type":["string","null"]},"salary":{"anyOf":[{"type":"object","properties":{"min":{"type":["number","null"]},"max":{"type":["number","null"]},"currency":{"type":["string","null"]},"period":{"description":"Such as `year` or `hour`.","type":["string","null"]}},"required":["min","max","currency","period"],"additionalProperties":false},{"type":"null"}],"description":"Pay as the posting states it. Null when it states none."},"department":{"anyOf":[{"type":"string","enum":["purchasing","sales","management","operations","marketing","finance","engineering","quality","it","hr","legal"]},{"type":"null"}],"description":"Department, read from the title."}},"required":["id","title","url","location","countries","workplace","employment","seniority","posted_at","salary","department"],"additionalProperties":false,"description":"`hiring` only: the posting."}},"required":["id","occurred_at","title","url","type","job"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","description":"Signal ID, such as `sig_3k8m2x9p4q1w`. The same event keeps its ID, so you can tell new signals from ones you saw."},"occurred_at":{"description":"When it happened, `YYYY-MM-DD`: the day a job was posted or a round announced, or the last day of the latest month an import surge covers.","type":["string","null"]},"title":{"type":"string","description":"What happened, in a few words."},"url":{"description":"Where to read about it: the posting, or an article.","type":["string","null"]},"type":{"type":"string","const":"funding","description":"The kind of signal, as the row's `type`."},"round":{"type":"object","properties":{"stage":{"anyOf":[{"type":"string","enum":["pre_seed","seed","series_a","series_b","series_c","series_d","series_e_plus","debt","grant","other"]},{"type":"null"}],"description":"Such as `seed` or `series_b`."},"amount_usd":{"description":"Money raised, in US dollars.","type":["number","null"]},"valuation_usd":{"description":"Valuation, in US dollars, when it was made public.","type":["number","null"]},"lead_investors":{"type":"array","items":{"type":"string"},"description":"The investors who led the round, when named."},"investors":{"type":"array","items":{"type":"string"},"description":"Every investor named, the leads included. Empty when none is named."}},"required":["stage","amount_usd","valuation_usd","lead_investors","investors"],"additionalProperties":false,"description":"`funding` only: the round."}},"required":["id","occurred_at","title","url","type","round"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","description":"Signal ID, such as `sig_3k8m2x9p4q1w`. The same event keeps its ID, so you can tell new signals from ones you saw."},"occurred_at":{"description":"When it happened, `YYYY-MM-DD`: the day a job was posted or a round announced, or the last day of the latest month an import surge covers.","type":["string","null"]},"title":{"type":"string","description":"What happened, in a few words."},"url":{"description":"Where to read about it: the posting, or an article.","type":["string","null"]},"type":{"type":"string","const":"import_surge","description":"The kind of signal, as the row's `type`."},"imports":{"type":"object","properties":{"hs_code":{"description":"The HS code the records were counted for. Null for all its imports.","type":["string","null"]},"recent":{"type":"object","properties":{"since":{"type":"string","description":"First month, `YYYY-MM`."},"until":{"type":"string","description":"Last month, `YYYY-MM`."},"shipments":{"type":"integer","description":"Shipment records in these months."}},"required":["since","until","shipments"],"additionalProperties":false,"description":"The latest 3 complete months."},"baseline":{"type":"object","properties":{"since":{"type":"string","description":"First month, `YYYY-MM`."},"until":{"type":"string","description":"Last month, `YYYY-MM`."},"shipments":{"type":"integer","description":"Shipment records in these months."}},"required":["since","until","shipments"],"additionalProperties":false,"description":"The 6 months before them."},"growth":{"description":"How much more it imported a month in `recent` than in `baseline`: `0.44` is 44% more. Null when `baseline` has none: it started importing.","type":["number","null"]},"by_month":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"month":{"type":"string","description":"`YYYY-MM`"},"shipments":{"type":"integer"}},"required":["month","shipments"],"additionalProperties":false}},{"type":"null"}],"description":"Shipment records month by month, oldest first. Null in a search, which counts periods only."}},"required":["hs_code","recent","baseline","growth","by_month"],"additionalProperties":false,"description":"`import_surge` only: the customs records of the two periods compared."}},"required":["id","occurred_at","title","url","type","imports"],"additionalProperties":false}]},"description":"The newest first, up to 5. Each has the fields of its `type`: `job`, `round` or `imports`."}},"required":["company","type","why_now","matches","signals"],"additionalProperties":false},"description":"A row for each kind of signal the company has, in the order of `types`. Empty when it has none."},"query":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The request as it was understood: country names as codes, the default dates filled in."},"notice":{"description":"A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"breakdown":{"type":"array","items":{"type":"object","properties":{"unit":{"type":"string","enum":["signal_hiring","signal_funding","signal_import_surge"],"description":"What is counted."},"records":{"type":"integer","description":"How many were returned and charged."},"already_paid":{"type":"integer","description":"How many more were returned for free, because this organization paid for them in the last 30 days."},"cost":{"type":"number","description":"What they cost, in US dollars."}},"required":["unit","records","already_paid","cost"],"additionalProperties":false},"description":"Every billing unit that came back, charged or not. Empty when nothing did."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","breakdown","balance","replayed"],"additionalProperties":false,"description":"What this call was charged, and the balance left."}},"required":["data","query","notice","usage"],"additionalProperties":false},{"$ref":"#/components/schemas/DryRun"}]},"example":{"data":[{"company":{"id":null,"name":"SAMPLE Northfield Home Furnishings","domain":"northfield-home.example","country":"US","employees":"201-500","industry":"Retail Furniture and Home Furnishings"},"type":"hiring","why_now":"Posted 2 jobs in the last 30 days, the newest \"Senior Buyer, Upholstery\" (Charlotte, NC) on 2026-11-12.","matches":2,"signals":[{"id":"sig_3k8m2x9p4q1w","type":"hiring","occurred_at":"2026-11-12","title":"Senior Buyer, Upholstery","url":"https://careers.northfield-home.example/senior-buyer-upholstery","job":{"id":"job_6t2m9x4p1q8w","title":"Senior Buyer, Upholstery","url":"https://careers.northfield-home.example/senior-buyer-upholstery","location":"Charlotte, NC","countries":["United States"],"workplace":"hybrid","employment":"full_time","seniority":"Senior","posted_at":"2026-11-12","salary":{"min":85000,"max":110000,"currency":"USD","period":"year"},"department":"purchasing"}},{"id":"sig_7c1v5n8b2m6t","type":"hiring","occurred_at":"2026-11-03","title":"Sourcing Manager, Vietnam","url":"https://careers.northfield-home.example/sourcing-manager-vietnam","job":{"id":"job_3k8n1v5c7x2z","title":"Sourcing Manager, Vietnam","url":"https://careers.northfield-home.example/sourcing-manager-vietnam","location":"Ho Chi Minh City, Vietnam","countries":["Vietnam"],"workplace":"on_site","employment":"full_time","seniority":"Mid-Level","posted_at":"2026-11-03","salary":null,"department":"purchasing"}}]}],"query":{"domain":"northfield-home.example","types":["hiring"],"since":{"hiring":"2026-10-24"}},"notice":null,"usage":{"cost":0.03,"breakdown":[{"unit":"signal_hiring","records":1,"already_paid":0,"cost":0.03}],"balance":48.97,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/email/senders":{"post":{"operationId":"email_senders_create","summary":"Register a sender","description":"Says who the emails are from. Every email ends with your company name, your postal address and an unsubscribe link, which the law requires and which cannot be removed. Register one sender for each company you write for: an agency, an agent working for several companies, or a platform sending for its own customers registers each of them as a sender of its own, and tells them apart by `metadata`. A sender sends from sending domains bought for it alone (`POST /email/domains`): its recipients, unsubscribes and standing are its own, so one sender's mail never costs another its inbox placement. To write to people in the EU, the UK or Canada, declare your lawful basis in `regions`; without it, addresses there are left out. Free.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/senders-create"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"company_name":{"type":"string","minLength":2,"maxLength":120,"description":"The legal or trading name of the company the emails are sent for."},"address":{"type":"string","minLength":10,"maxLength":300,"description":"The company's postal address: street, city, postcode, country. Every email carries it."},"website":{"description":"The company's website, such as `https://example.com`.","type":"string","maxLength":253},"purpose":{"type":"string","minLength":20,"maxLength":1000,"description":"What you offer and whom you will write to, in a sentence or two. It is kept with the sender."},"regions":{"default":[],"description":"Regions with stricter rules that you declare a lawful basis for. The declaration is recorded with the time and the key that made it.","maxItems":3,"type":"array","items":{"type":"object","properties":{"region":{"type":"string","enum":["eu","uk","ca"],"description":"`eu`, `uk` or `ca`."},"basis":{"type":"string","minLength":20,"maxLength":500,"description":"Why you may write to people there, such as: legitimate interest, B2B contacts at companies that import our product category."}},"required":["region","basis"],"additionalProperties":false}},"metadata":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, such as `{\"customer_id\": \"c_812\"}`: up to 20 keys of at most 40 characters, each value a string of at most 500. Such as the ID of your customer it writes for. Returned with the sender, and with the events about its domains. `GET /email/senders` finds senders by it."}},"required":["company_name","address","website","purpose"],"additionalProperties":false},"example":{"company_name":"Northwind Seating Ltd","address":"18 Harbour Road, Leeds LS1 4AP, United Kingdom","website":"https://northwind-seating.example","purpose":"We make office chairs and write to furniture importers and distributors about our new catalogue."}}}},"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Sender ID, such as `snd_4k2m9x7p1q8w3e5r`."},"company_name":{"type":"string","description":"The company the emails are sent for. Every email names it."},"address":{"type":"string","description":"The company's postal address. Every email carries it."},"website":{"type":"string","description":"The company's website."},"purpose":{"type":"string","description":"What the company sends and to whom, as it was described to us."},"status":{"type":"string","enum":["active","rejected","suspended"],"description":"`active`: it can send once it has a sending domain. `suspended` when its emails bounced or were reported as spam too often, or we stopped it; `rejected` when we did not let it send. The reason is in `review_note`."},"review_note":{"description":"Why the sender was stopped, when it was.","type":["string","null"]},"throttled":{"type":"boolean","description":"True while it sends at half speed, because many people unsubscribed or one reported its emails as spam. A person looks at it and lifts it."},"regions":{"type":"array","items":{"type":"object","properties":{"region":{"type":"string","enum":["eu","uk","ca"]},"basis":{"type":"string"},"declared_at":{"type":"string"}},"required":["region","basis","declared_at"],"additionalProperties":false},"description":"Regions the sender declared a lawful basis for: `eu`, `uk`, `ca`."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your own keys and values, as you gave them. Empty when none were."},"test":{"type":"boolean","description":"Made with a test key: it sends from a simulated domain, and never for real."},"created_at":{"type":"string","description":"When it was created, as an ISO 8601 time in UTC."}},"required":["id","company_name","address","website","purpose","status","review_note","throttled","regions","metadata","test","created_at"],"additionalProperties":false},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"id":"snd_4k2m9x7p1q8w3e5r","company_name":"Northwind Seating Ltd","address":"18 Harbour Road, Leeds LS1 4AP, United Kingdom","website":"https://northwind-seating.example","purpose":"We make office chairs and write to furniture importers and distributors about our new catalogue.","status":"active","review_note":null,"throttled":false,"regions":[],"metadata":{"customer_id":"c_812"},"test":false,"created_at":"2026-11-17T09:12:44.000Z"},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"email_senders_list","summary":"List senders","description":"Your senders, newest first, a page at a time. Free.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/senders-list"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"metadata","in":"query","required":false,"description":"Your own keys and values, such as `{\"customer_id\": \"c_812\"}`: up to 20 keys of at most 40 characters, each value a string of at most 500. Only the senders whose metadata has all of these keys and values, such as `{\"customer_id\": \"c_812\"}`. In a query string: `metadata[customer_id]=c_812`.","schema":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"example":20},{"name":"cursor","in":"query","required":false,"description":"To get the next page, pass `next_cursor` of the previous response back unchanged, with the same parameters.","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Sender ID, such as `snd_4k2m9x7p1q8w3e5r`."},"company_name":{"type":"string","description":"The company the emails are sent for. Every email names it."},"address":{"type":"string","description":"The company's postal address. Every email carries it."},"website":{"type":"string","description":"The company's website."},"purpose":{"type":"string","description":"What the company sends and to whom, as it was described to us."},"status":{"type":"string","enum":["active","rejected","suspended"],"description":"`active`: it can send once it has a sending domain. `suspended` when its emails bounced or were reported as spam too often, or we stopped it; `rejected` when we did not let it send. The reason is in `review_note`."},"review_note":{"description":"Why the sender was stopped, when it was.","type":["string","null"]},"throttled":{"type":"boolean","description":"True while it sends at half speed, because many people unsubscribed or one reported its emails as spam. A person looks at it and lifts it."},"regions":{"type":"array","items":{"type":"object","properties":{"region":{"type":"string","enum":["eu","uk","ca"]},"basis":{"type":"string"},"declared_at":{"type":"string"}},"required":["region","basis","declared_at"],"additionalProperties":false},"description":"Regions the sender declared a lawful basis for: `eu`, `uk`, `ca`."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your own keys and values, as you gave them. Empty when none were."},"test":{"type":"boolean","description":"Made with a test key: it sends from a simulated domain, and never for real."},"created_at":{"type":"string","description":"When it was created, as an ISO 8601 time in UTC."}},"required":["id","company_name","address","website","purpose","status","review_note","throttled","regions","metadata","test","created_at"],"additionalProperties":false},"description":"The senders of this page."},"has_more":{"type":"boolean","description":"Whether more follow this page."},"next_cursor":{"description":"Pass it as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","has_more","next_cursor","notice","usage"],"additionalProperties":false},"example":{"data":[{"id":"snd_4k2m9x7p1q8w3e5r","company_name":"Northwind Seating Ltd","address":"18 Harbour Road, Leeds LS1 4AP, United Kingdom","website":"https://northwind-seating.example","purpose":"We make office chairs and write to furniture importers and distributors about our new catalogue.","status":"active","review_note":null,"throttled":false,"regions":[],"metadata":{"customer_id":"c_812"},"test":false,"created_at":"2026-11-17T09:12:44.000Z"}],"has_more":false,"next_cursor":null,"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/email/senders/{id}":{"get":{"operationId":"email_senders_get","summary":"Get a sender","description":"One sender and its status: `review_note` says why when we stopped it, `throttled` whether it sends at half speed, `breakers` how far it is from each circuit breaker, and `sending` what all of its domains can still send today. Its domains themselves are in `GET /email/domains?sender_id=`. Free.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/senders-get"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"id","in":"path","required":true,"description":"Sender ID, such as `snd_4k2m9x7p1q8w3e5r`.","schema":{"type":"string","maxLength":40},"example":"snd_4k2m9x7p1q8w3e5r"}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Sender ID, such as `snd_4k2m9x7p1q8w3e5r`."},"company_name":{"type":"string","description":"The company the emails are sent for. Every email names it."},"address":{"type":"string","description":"The company's postal address. Every email carries it."},"website":{"type":"string","description":"The company's website."},"purpose":{"type":"string","description":"What the company sends and to whom, as it was described to us."},"status":{"type":"string","enum":["active","rejected","suspended"],"description":"`active`: it can send once it has a sending domain. `suspended` when its emails bounced or were reported as spam too often, or we stopped it; `rejected` when we did not let it send. The reason is in `review_note`."},"review_note":{"description":"Why the sender was stopped, when it was.","type":["string","null"]},"throttled":{"type":"boolean","description":"True while it sends at half speed, because many people unsubscribed or one reported its emails as spam. A person looks at it and lifts it."},"regions":{"type":"array","items":{"type":"object","properties":{"region":{"type":"string","enum":["eu","uk","ca"]},"basis":{"type":"string"},"declared_at":{"type":"string"}},"required":["region","basis","declared_at"],"additionalProperties":false},"description":"Regions the sender declared a lawful basis for: `eu`, `uk`, `ca`."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your own keys and values, as you gave them. Empty when none were."},"test":{"type":"boolean","description":"Made with a test key: it sends from a simulated domain, and never for real."},"created_at":{"type":"string","description":"When it was created, as an ISO 8601 time in UTC."},"breakers":{"type":"object","properties":{"bounce_rate":{"type":"object","properties":{"value":{"type":"number","description":"The share of the last emails that bounced for good."},"limit":{"type":"number","description":"Above this, the sender is suspended."},"measured_over":{"type":"integer","description":"How many emails the share is of: the last 200 at most."},"counts_from":{"type":"integer","description":"The breaker only acts from this many emails on."},"action":{"type":"string","const":"suspend","description":"What happens above the limit: the sender stops."}},"required":["value","limit","measured_over","counts_from","action"],"additionalProperties":false,"description":"Emails that bounced because the mailbox does not exist."},"complaints":{"type":"object","properties":{"value":{"type":"integer","description":"Recipients who reported the emails as spam."},"limit":{"type":"integer","description":"At this many, the sender is suspended. One already halves its speed."},"days":{"type":"integer","description":"The days the complaints are counted over."},"action":{"type":"string","const":"suspend","description":"What happens at the limit: the sender stops."}},"required":["value","limit","days","action"],"additionalProperties":false,"description":"Spam complaints."},"unsubscribe_rate":{"type":"object","properties":{"value":{"type":"number","description":"The share of the people written to in 30 days who unsubscribed."},"limit":{"type":"number","description":"Above this, the sender sends at half speed."},"counts_from":{"type":"integer","description":"The breaker only acts from this many people on."},"action":{"type":"string","const":"throttle","description":"What happens above the limit: half the speed."}},"required":["value","limit","counts_from","action"],"additionalProperties":false,"description":"Unsubscribes."}},"required":["bounce_rate","complaints","unsubscribe_rate"],"additionalProperties":false,"description":"How far the sender is from each circuit breaker that protects its domains. Test campaigns are left out. One sender's numbers never stop another."},"sending":{"type":"object","properties":{"domains":{"type":"integer","description":"Its domains that can send: neither setting up nor ended."},"daily_limit":{"type":"integer","description":"What they may send today, together."},"sent_today":{"type":"integer","description":"What they sent since midnight UTC."},"remaining_today":{"type":"integer","description":"What they may still send today."},"full_daily_limit":{"type":"integer","description":"What they send a day once all of them are at full speed."}},"required":["domains","daily_limit","sent_today","remaining_today","full_daily_limit"],"additionalProperties":false,"description":"What the sender can send today, from all of its domains together: its campaigns and single emails share it, and a campaign also stays within its own `daily_limit`."}},"required":["id","company_name","address","website","purpose","status","review_note","throttled","regions","metadata","test","created_at","breakers","sending"],"additionalProperties":false},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"id":"snd_4k2m9x7p1q8w3e5r","company_name":"Northwind Seating Ltd","address":"18 Harbour Road, Leeds LS1 4AP, United Kingdom","website":"https://northwind-seating.example","purpose":"We make office chairs and write to furniture importers and distributors about our new catalogue.","status":"active","review_note":null,"throttled":false,"regions":[],"metadata":{"customer_id":"c_812"},"test":false,"created_at":"2026-11-17T09:12:44.000Z","breakers":{"bounce_rate":{"value":0.011,"limit":0.03,"measured_over":180,"counts_from":50,"action":"suspend"},"complaints":{"value":0,"limit":2,"days":30,"action":"suspend"},"unsubscribe_rate":{"value":0.02,"limit":0.05,"counts_from":50,"action":"throttle"}},"sending":{"domains":2,"daily_limit":66,"sent_today":40,"remaining_today":26,"full_daily_limit":90}},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"email_senders_update","summary":"Change a sender","description":"Declares a lawful basis for writing to people in more regions with stricter rules, or states the basis of a region anew, and replaces the sender's `metadata`. Only the fields given change. A region declared once stays declared: the people taken into campaigns there were taken on it. Each declaration is recorded with the time and the key that made it, and counts from the next recipient added on. The company name, the address and the website are what every email says it is from, so they do not change: register a new sender for another company. Free.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/senders-update"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"id","in":"path","required":true,"description":"Sender ID, such as `snd_4k2m9x7p1q8w3e5r`.","schema":{"type":"string","maxLength":40},"example":"snd_4k2m9x7p1q8w3e5r"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"regions":{"description":"Regions to declare a lawful basis for: each one is added, or replaces the basis given for it before. The others stay as they are.","minItems":1,"maxItems":3,"type":"array","items":{"type":"object","properties":{"region":{"type":"string","enum":["eu","uk","ca"],"description":"`eu`, `uk` or `ca`."},"basis":{"type":"string","minLength":20,"maxLength":500,"description":"Why you may write to people there, such as: legitimate interest, B2B contacts at companies that import our product category."}},"required":["region","basis"],"additionalProperties":false}},"metadata":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, such as `{\"customer_id\": \"c_812\"}`: up to 20 keys of at most 40 characters, each value a string of at most 500. It replaces the metadata there is; `{}` removes it. Events that already happened keep what they carried."}},"required":[],"additionalProperties":false},"example":{"id":"snd_4k2m9x7p1q8w3e5r","regions":[{"region":"uk","basis":"Legitimate interest: B2B contacts at companies that import office furniture, in their work role."}]}}}},"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Sender ID, such as `snd_4k2m9x7p1q8w3e5r`."},"company_name":{"type":"string","description":"The company the emails are sent for. Every email names it."},"address":{"type":"string","description":"The company's postal address. Every email carries it."},"website":{"type":"string","description":"The company's website."},"purpose":{"type":"string","description":"What the company sends and to whom, as it was described to us."},"status":{"type":"string","enum":["active","rejected","suspended"],"description":"`active`: it can send once it has a sending domain. `suspended` when its emails bounced or were reported as spam too often, or we stopped it; `rejected` when we did not let it send. The reason is in `review_note`."},"review_note":{"description":"Why the sender was stopped, when it was.","type":["string","null"]},"throttled":{"type":"boolean","description":"True while it sends at half speed, because many people unsubscribed or one reported its emails as spam. A person looks at it and lifts it."},"regions":{"type":"array","items":{"type":"object","properties":{"region":{"type":"string","enum":["eu","uk","ca"]},"basis":{"type":"string"},"declared_at":{"type":"string"}},"required":["region","basis","declared_at"],"additionalProperties":false},"description":"Regions the sender declared a lawful basis for: `eu`, `uk`, `ca`."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your own keys and values, as you gave them. Empty when none were."},"test":{"type":"boolean","description":"Made with a test key: it sends from a simulated domain, and never for real."},"created_at":{"type":"string","description":"When it was created, as an ISO 8601 time in UTC."}},"required":["id","company_name","address","website","purpose","status","review_note","throttled","regions","metadata","test","created_at"],"additionalProperties":false},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"id":"snd_4k2m9x7p1q8w3e5r","company_name":"Northwind Seating Ltd","address":"18 Harbour Road, Leeds LS1 4AP, United Kingdom","website":"https://northwind-seating.example","purpose":"We make office chairs and write to furniture importers and distributors about our new catalogue.","status":"active","review_note":null,"throttled":false,"regions":[{"region":"uk","basis":"Legitimate interest: B2B contacts at companies that import office furniture, in their work role.","declared_at":"2026-11-21T09:30:00.000Z"}],"metadata":{"customer_id":"c_812"},"test":false,"created_at":"2026-11-17T09:12:44.000Z"},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/email/domains":{"post":{"operationId":"email_domains_create","summary":"Buy sending domains","description":"Buys sending domains for one sender: each comes with 3 mailboxes that are already warmed up, sends for that sender alone, and adds 45 emails a day to what it can send. Nothing to set up: no DNS, no mailbox to sign in to, and replies are read for you. A domain costs $0.9 a day, 30 days at a time from the renewal date on. All domains renew on the same day of the month, so the first period runs from today to that day: 15 to 45 days, paid now. Each renews by itself from your balance 3 days before `period_end`; if the balance cannot cover it, it is tried again until the day before, and the domain is then given up. Without `confirm: true` this only quotes the price, the date and how many are in stock, and changes nothing. A new domain is ready within minutes (`domain.ready`) and sends 15 emails on its first day, reaching full speed in 5 days. Campaigns of the sender that were paused for `no_domains` go on by themselves once it is. Fails with `out_of_stock` when not enough are for sale, before anything is charged. Up to 10 at once. A test key only gets the quote: in the sandbox every sender has a simulated domain already. Each call that confirms buys again: send an `Idempotency-Key` to make a retry safe.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/domains-create"},"x-mode":"proxy","x-billing":"per result","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sender_id":{"type":"string","maxLength":40,"description":"The sender to buy them for, such as `snd_4k2m9x7p1q8w3e5r`. They never send for another."},"count":{"default":1,"description":"How many domains, 1 to 10.","type":"integer","minimum":1,"maximum":10},"confirm":{"default":false,"description":"True buys them and charges this period. False, the default, only quotes it.","type":"boolean"},"max_cost":{"description":"Spending cap for this call in US dollars. If the call could cost more, it fails with `budget_exceeded` before anything is charged.","type":"number","exclusiveMinimum":0}},"required":["sender_id"],"additionalProperties":false},"example":{"sender_id":"snd_4k2m9x7p1q8w3e5r","count":1,"confirm":true,"max_cost":30}}}},"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"confirmed":{"type":"boolean","description":"True when the domains were bought. False on a quote: nothing changed."},"sender_id":{"type":"string"},"count":{"type":"integer","description":"How many domains."},"price":{"type":"number","description":"What they cost now, together, in US dollars: this period, up to `period_end`."},"price_per_domain":{"type":"number","description":"What one costs for this period, in US dollars."},"days":{"type":"integer","description":"Days this period has, today included."},"period_end":{"type":"string","description":"When this period ends and they renew, at `price_per_month` each, charged from your balance 3 days before."},"price_per_month":{"type":"number","description":"What one domain costs for 30 days, from then on."},"daily_limit":{"type":"integer","description":"What they add to the sender's day at full speed: 45 each."},"first_day_limit":{"type":"integer","description":"What they send on their first day, together."},"days_to_full_speed":{"type":"integer","description":"Days until they send at full speed."},"in_stock":{"type":"integer","description":"How many domains can be bought right now."},"domains":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Domain ID, such as `dom_5r4k2m9x7p1q8w3e`."},"sender_id":{"type":"string","description":"The sender it sends for. It never sends for another."},"domain":{"description":"The domain name. Null for the minutes after it was paid for, until one is chosen and bought.","type":["string","null"]},"status":{"type":"string","enum":["setting_up","ramping","active","paused","ending","released","failed"],"description":"`setting_up` for the minutes it takes to buy it and set up its mailboxes. `ramping` while it sends a few emails a day more each day, for 5 days. `active` at full speed. `paused` while we hold it back. `ending` once it will not renew: it sends until 1 day before `period_end`. Final: `released` (its mailboxes are gone) and `failed` (it could not be bought; what it cost went back to the balance)."},"end_reason":{"anyOf":[{"type":"string","enum":["canceled","unpaid","replaced","removed"]},{"type":"null"}],"description":"Why it ends or ended: `canceled` by you, `unpaid` (the renewal could not be charged), `replaced` by a new domain, `removed` by us. Null while it renews."},"mailboxes":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"The address emails go out from, and replies come back to."},"name":{"type":"string","description":"The name it sends under, the one it was warmed up with."}},"required":["address","name"],"additionalProperties":false},"description":"Its mailboxes, 3 as a rule. Empty while it is set up. Replies to them are read for you: you never sign in to them."},"daily_limit":{"type":"integer","description":"What its mailboxes may send today, together."},"full_daily_limit":{"type":"integer","description":"What they send a day at full speed, together: 45."},"sent_today":{"type":"integer","description":"Emails they sent since midnight UTC. Answers to replies are left out."},"full_speed_at":{"description":"When it reaches full speed, while it is `ramping`. Null otherwise.","type":["string","null"]},"price_per_month":{"type":"number","description":"What a renewal costs, for 30 days, in US dollars."},"period_end":{"type":"string","description":"When the paid period ends. The next one is charged from your balance a few days before, as an ISO 8601 time in UTC."},"renews":{"type":"boolean","description":"Whether it renews at `period_end`. False once you canceled it."},"ends_at":{"description":"When it stops sending and its mailboxes are given up, when it will not renew. Null while it renews.","type":["string","null"]},"renewal_failed_at":{"description":"When charging the renewal last failed for want of balance. It is tried again until the day before `period_end`, then the domain is given up. Null when nothing failed.","type":["string","null"]},"stats":{"type":"object","properties":{"sent":{"type":"integer","description":"Emails sent."},"bounced":{"type":"integer","description":"Of them, how many bounced because the mailbox does not exist."},"bounce_rate":{"type":"number","description":"`bounced` over `sent`, 0 to 1."},"complaints":{"type":"integer","description":"Recipients who reported its emails as spam."}},"required":["sent","bounced","bounce_rate","complaints"],"additionalProperties":false,"description":"The last 30 days."},"test":{"type":"boolean","description":"The simulated domain of a test key's sender: it never sends for real."},"created_at":{"type":"string","description":"When it was bought, as an ISO 8601 time in UTC."},"ready_at":{"description":"When its mailboxes could send.","type":["string","null"]},"ended_at":{"description":"When it was released, or failed.","type":["string","null"]}},"required":["id","sender_id","domain","status","end_reason","mailboxes","daily_limit","full_daily_limit","sent_today","full_speed_at","price_per_month","period_end","renews","ends_at","renewal_failed_at","stats","test","created_at","ready_at","ended_at"],"additionalProperties":false},"description":"The domains bought, `setting_up` for a few minutes. Empty on a quote."}},"required":["confirmed","sender_id","count","price","price_per_domain","days","period_end","price_per_month","daily_limit","first_day_limit","days_to_full_speed","in_stock","domains"],"additionalProperties":false,"description":"The domains and their price."},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"breakdown":{"type":"array","items":{"type":"object","properties":{"unit":{"type":"string","enum":["email_domain_day"],"description":"What is counted."},"records":{"type":"integer","description":"How many were returned and charged."},"already_paid":{"type":"integer","description":"How many more were returned for free, because this organization paid for them in the last 30 days."},"cost":{"type":"number","description":"What they cost, in US dollars."}},"required":["unit","records","already_paid","cost"],"additionalProperties":false},"description":"Every billing unit that came back, charged or not. Empty when nothing did."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","breakdown","balance","replayed"],"additionalProperties":false,"description":"What this call was charged, and the balance left."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"confirmed":true,"sender_id":"snd_4k2m9x7p1q8w3e5r","count":1,"price":28.8,"price_per_domain":28.8,"days":32,"period_end":"2026-12-28T00:00:00.000Z","price_per_month":27,"daily_limit":45,"first_day_limit":15,"days_to_full_speed":5,"in_stock":24,"domains":[{"id":"dom_5r4k2m9x7p1q8w3e","sender_id":"snd_4k2m9x7p1q8w3e5r","domain":null,"status":"setting_up","end_reason":null,"mailboxes":[],"daily_limit":0,"full_daily_limit":45,"sent_today":0,"full_speed_at":null,"price_per_month":27,"period_end":"2026-12-28T00:00:00.000Z","renews":true,"ends_at":null,"renewal_failed_at":null,"stats":{"sent":0,"bounced":0,"bounce_rate":0,"complaints":0},"test":false,"created_at":"2026-11-26T10:15:02.000Z","ready_at":null,"ended_at":null}]},"notice":null,"usage":{"cost":28.8,"breakdown":[{"unit":"email_domain_day","records":32,"already_paid":0,"cost":28.8}],"balance":19.28,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"email_domains_list","summary":"List sending domains","description":"Your sending domains, newest first, with their mailboxes, what each may send today and has sent, and when it renews. What a sender can still send today, all of its domains together, is `sending` in `GET /email/senders/{id}`. Domains that were given up or could not be bought are left out unless `ended` is true. A test key sees the simulated domain each sandbox sender has. Free.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/domains-list"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"sender_id","in":"query","required":false,"description":"Only the domains of this sender.","schema":{"type":"string","maxLength":40},"example":"snd_4k2m9x7p1q8w3e5r"},{"name":"ended","in":"query","required":false,"description":"Also the domains that were released or failed.","schema":{"default":false,"type":"boolean"}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"To get the next page, pass `next_cursor` of the previous response back unchanged, with the same parameters.","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Domain ID, such as `dom_5r4k2m9x7p1q8w3e`."},"sender_id":{"type":"string","description":"The sender it sends for. It never sends for another."},"domain":{"description":"The domain name. Null for the minutes after it was paid for, until one is chosen and bought.","type":["string","null"]},"status":{"type":"string","enum":["setting_up","ramping","active","paused","ending","released","failed"],"description":"`setting_up` for the minutes it takes to buy it and set up its mailboxes. `ramping` while it sends a few emails a day more each day, for 5 days. `active` at full speed. `paused` while we hold it back. `ending` once it will not renew: it sends until 1 day before `period_end`. Final: `released` (its mailboxes are gone) and `failed` (it could not be bought; what it cost went back to the balance)."},"end_reason":{"anyOf":[{"type":"string","enum":["canceled","unpaid","replaced","removed"]},{"type":"null"}],"description":"Why it ends or ended: `canceled` by you, `unpaid` (the renewal could not be charged), `replaced` by a new domain, `removed` by us. Null while it renews."},"mailboxes":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"The address emails go out from, and replies come back to."},"name":{"type":"string","description":"The name it sends under, the one it was warmed up with."}},"required":["address","name"],"additionalProperties":false},"description":"Its mailboxes, 3 as a rule. Empty while it is set up. Replies to them are read for you: you never sign in to them."},"daily_limit":{"type":"integer","description":"What its mailboxes may send today, together."},"full_daily_limit":{"type":"integer","description":"What they send a day at full speed, together: 45."},"sent_today":{"type":"integer","description":"Emails they sent since midnight UTC. Answers to replies are left out."},"full_speed_at":{"description":"When it reaches full speed, while it is `ramping`. Null otherwise.","type":["string","null"]},"price_per_month":{"type":"number","description":"What a renewal costs, for 30 days, in US dollars."},"period_end":{"type":"string","description":"When the paid period ends. The next one is charged from your balance a few days before, as an ISO 8601 time in UTC."},"renews":{"type":"boolean","description":"Whether it renews at `period_end`. False once you canceled it."},"ends_at":{"description":"When it stops sending and its mailboxes are given up, when it will not renew. Null while it renews.","type":["string","null"]},"renewal_failed_at":{"description":"When charging the renewal last failed for want of balance. It is tried again until the day before `period_end`, then the domain is given up. Null when nothing failed.","type":["string","null"]},"stats":{"type":"object","properties":{"sent":{"type":"integer","description":"Emails sent."},"bounced":{"type":"integer","description":"Of them, how many bounced because the mailbox does not exist."},"bounce_rate":{"type":"number","description":"`bounced` over `sent`, 0 to 1."},"complaints":{"type":"integer","description":"Recipients who reported its emails as spam."}},"required":["sent","bounced","bounce_rate","complaints"],"additionalProperties":false,"description":"The last 30 days."},"test":{"type":"boolean","description":"The simulated domain of a test key's sender: it never sends for real."},"created_at":{"type":"string","description":"When it was bought, as an ISO 8601 time in UTC."},"ready_at":{"description":"When its mailboxes could send.","type":["string","null"]},"ended_at":{"description":"When it was released, or failed.","type":["string","null"]}},"required":["id","sender_id","domain","status","end_reason","mailboxes","daily_limit","full_daily_limit","sent_today","full_speed_at","price_per_month","period_end","renews","ends_at","renewal_failed_at","stats","test","created_at","ready_at","ended_at"],"additionalProperties":false},"description":"The domains of this page."},"has_more":{"type":"boolean","description":"Whether more follow this page."},"next_cursor":{"description":"Pass it as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","has_more","next_cursor","notice","usage"],"additionalProperties":false},"example":{"data":[{"id":"dom_8w3e5r4k2m9x7p1q","sender_id":"snd_4k2m9x7p1q8w3e5r","domain":"northwind-chairs.example","status":"ramping","end_reason":null,"mailboxes":[{"address":"alex@northwind-chairs.example","name":"Alex Morgan"},{"address":"alex.m@northwind-chairs.example","name":"Alex Morgan"},{"address":"morgan@northwind-chairs.example","name":"Alex Morgan"}],"daily_limit":21,"full_daily_limit":45,"sent_today":9,"full_speed_at":"2026-11-29T00:00:00.000Z","price_per_month":27,"period_end":"2026-12-28T00:00:00.000Z","renews":true,"ends_at":null,"renewal_failed_at":null,"stats":{"sent":33,"bounced":0,"bounce_rate":0,"complaints":0},"test":false,"created_at":"2026-11-24T10:02:00.000Z","ready_at":"2026-11-24T10:07:12.000Z","ended_at":null},{"id":"dom_5r4k2m9x7p1q8w3e","sender_id":"snd_4k2m9x7p1q8w3e5r","domain":"northwindseating.example","status":"active","end_reason":null,"mailboxes":[{"address":"alex@northwindseating.example","name":"Alex Morgan"},{"address":"alex.morgan@northwindseating.example","name":"Alex Morgan"},{"address":"a.morgan@northwindseating.example","name":"Alex Morgan"}],"daily_limit":45,"full_daily_limit":45,"sent_today":31,"full_speed_at":null,"price_per_month":27,"period_end":"2026-12-28T00:00:00.000Z","renews":true,"ends_at":null,"renewal_failed_at":null,"stats":{"sent":812,"bounced":9,"bounce_rate":0.0111,"complaints":0},"test":false,"created_at":"2026-11-17T09:20:03.000Z","ready_at":"2026-11-17T09:24:41.000Z","ended_at":null}],"has_more":false,"next_cursor":null,"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/email/domains/{id}":{"get":{"operationId":"email_domains_get","summary":"Get a sending domain","description":"One sending domain: its mailboxes, what it may send today and has sent, its last 30 days, and when it renews or ends. Free.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/domains-get"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"id","in":"path","required":true,"description":"Domain ID, such as `dom_5r4k2m9x7p1q8w3e`.","schema":{"type":"string","maxLength":40},"example":"dom_5r4k2m9x7p1q8w3e"}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Domain ID, such as `dom_5r4k2m9x7p1q8w3e`."},"sender_id":{"type":"string","description":"The sender it sends for. It never sends for another."},"domain":{"description":"The domain name. Null for the minutes after it was paid for, until one is chosen and bought.","type":["string","null"]},"status":{"type":"string","enum":["setting_up","ramping","active","paused","ending","released","failed"],"description":"`setting_up` for the minutes it takes to buy it and set up its mailboxes. `ramping` while it sends a few emails a day more each day, for 5 days. `active` at full speed. `paused` while we hold it back. `ending` once it will not renew: it sends until 1 day before `period_end`. Final: `released` (its mailboxes are gone) and `failed` (it could not be bought; what it cost went back to the balance)."},"end_reason":{"anyOf":[{"type":"string","enum":["canceled","unpaid","replaced","removed"]},{"type":"null"}],"description":"Why it ends or ended: `canceled` by you, `unpaid` (the renewal could not be charged), `replaced` by a new domain, `removed` by us. Null while it renews."},"mailboxes":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"The address emails go out from, and replies come back to."},"name":{"type":"string","description":"The name it sends under, the one it was warmed up with."}},"required":["address","name"],"additionalProperties":false},"description":"Its mailboxes, 3 as a rule. Empty while it is set up. Replies to them are read for you: you never sign in to them."},"daily_limit":{"type":"integer","description":"What its mailboxes may send today, together."},"full_daily_limit":{"type":"integer","description":"What they send a day at full speed, together: 45."},"sent_today":{"type":"integer","description":"Emails they sent since midnight UTC. Answers to replies are left out."},"full_speed_at":{"description":"When it reaches full speed, while it is `ramping`. Null otherwise.","type":["string","null"]},"price_per_month":{"type":"number","description":"What a renewal costs, for 30 days, in US dollars."},"period_end":{"type":"string","description":"When the paid period ends. The next one is charged from your balance a few days before, as an ISO 8601 time in UTC."},"renews":{"type":"boolean","description":"Whether it renews at `period_end`. False once you canceled it."},"ends_at":{"description":"When it stops sending and its mailboxes are given up, when it will not renew. Null while it renews.","type":["string","null"]},"renewal_failed_at":{"description":"When charging the renewal last failed for want of balance. It is tried again until the day before `period_end`, then the domain is given up. Null when nothing failed.","type":["string","null"]},"stats":{"type":"object","properties":{"sent":{"type":"integer","description":"Emails sent."},"bounced":{"type":"integer","description":"Of them, how many bounced because the mailbox does not exist."},"bounce_rate":{"type":"number","description":"`bounced` over `sent`, 0 to 1."},"complaints":{"type":"integer","description":"Recipients who reported its emails as spam."}},"required":["sent","bounced","bounce_rate","complaints"],"additionalProperties":false,"description":"The last 30 days."},"test":{"type":"boolean","description":"The simulated domain of a test key's sender: it never sends for real."},"created_at":{"type":"string","description":"When it was bought, as an ISO 8601 time in UTC."},"ready_at":{"description":"When its mailboxes could send.","type":["string","null"]},"ended_at":{"description":"When it was released, or failed.","type":["string","null"]}},"required":["id","sender_id","domain","status","end_reason","mailboxes","daily_limit","full_daily_limit","sent_today","full_speed_at","price_per_month","period_end","renews","ends_at","renewal_failed_at","stats","test","created_at","ready_at","ended_at"],"additionalProperties":false},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"id":"dom_5r4k2m9x7p1q8w3e","sender_id":"snd_4k2m9x7p1q8w3e5r","domain":"northwindseating.example","status":"active","end_reason":null,"mailboxes":[{"address":"alex@northwindseating.example","name":"Alex Morgan"},{"address":"alex.morgan@northwindseating.example","name":"Alex Morgan"},{"address":"a.morgan@northwindseating.example","name":"Alex Morgan"}],"daily_limit":45,"full_daily_limit":45,"sent_today":31,"full_speed_at":null,"price_per_month":27,"period_end":"2026-12-28T00:00:00.000Z","renews":true,"ends_at":null,"renewal_failed_at":null,"stats":{"sent":812,"bounced":9,"bounce_rate":0.0111,"complaints":0},"test":false,"created_at":"2026-11-17T09:20:03.000Z","ready_at":"2026-11-17T09:24:41.000Z","ended_at":null},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"email_domains_cancel","summary":"Cancel a sending domain","description":"Stops a sending domain from renewing. It goes on sending until 1 day before `period_end` (`ends_at`), and is then given up: its mailboxes are gone, and so is their address. What it sent and the replies it got stay. Nothing is refunded, and it cannot be undone: buy another with `POST /email/domains`. When it was the sender's last domain, the sender's campaigns pause for `no_domains` then. Canceling again changes nothing. A test key cannot cancel the sandbox's simulated domains. Free.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/domains-cancel"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"id","in":"path","required":true,"description":"Domain ID, such as `dom_5r4k2m9x7p1q8w3e`.","schema":{"type":"string","maxLength":40},"example":"dom_5r4k2m9x7p1q8w3e"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key returns the first response, instead of `not_found` for what is already gone.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Domain ID, such as `dom_5r4k2m9x7p1q8w3e`."},"sender_id":{"type":"string","description":"The sender it sends for. It never sends for another."},"domain":{"description":"The domain name. Null for the minutes after it was paid for, until one is chosen and bought.","type":["string","null"]},"status":{"type":"string","enum":["setting_up","ramping","active","paused","ending","released","failed"],"description":"`setting_up` for the minutes it takes to buy it and set up its mailboxes. `ramping` while it sends a few emails a day more each day, for 5 days. `active` at full speed. `paused` while we hold it back. `ending` once it will not renew: it sends until 1 day before `period_end`. Final: `released` (its mailboxes are gone) and `failed` (it could not be bought; what it cost went back to the balance)."},"end_reason":{"anyOf":[{"type":"string","enum":["canceled","unpaid","replaced","removed"]},{"type":"null"}],"description":"Why it ends or ended: `canceled` by you, `unpaid` (the renewal could not be charged), `replaced` by a new domain, `removed` by us. Null while it renews."},"mailboxes":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"The address emails go out from, and replies come back to."},"name":{"type":"string","description":"The name it sends under, the one it was warmed up with."}},"required":["address","name"],"additionalProperties":false},"description":"Its mailboxes, 3 as a rule. Empty while it is set up. Replies to them are read for you: you never sign in to them."},"daily_limit":{"type":"integer","description":"What its mailboxes may send today, together."},"full_daily_limit":{"type":"integer","description":"What they send a day at full speed, together: 45."},"sent_today":{"type":"integer","description":"Emails they sent since midnight UTC. Answers to replies are left out."},"full_speed_at":{"description":"When it reaches full speed, while it is `ramping`. Null otherwise.","type":["string","null"]},"price_per_month":{"type":"number","description":"What a renewal costs, for 30 days, in US dollars."},"period_end":{"type":"string","description":"When the paid period ends. The next one is charged from your balance a few days before, as an ISO 8601 time in UTC."},"renews":{"type":"boolean","description":"Whether it renews at `period_end`. False once you canceled it."},"ends_at":{"description":"When it stops sending and its mailboxes are given up, when it will not renew. Null while it renews.","type":["string","null"]},"renewal_failed_at":{"description":"When charging the renewal last failed for want of balance. It is tried again until the day before `period_end`, then the domain is given up. Null when nothing failed.","type":["string","null"]},"stats":{"type":"object","properties":{"sent":{"type":"integer","description":"Emails sent."},"bounced":{"type":"integer","description":"Of them, how many bounced because the mailbox does not exist."},"bounce_rate":{"type":"number","description":"`bounced` over `sent`, 0 to 1."},"complaints":{"type":"integer","description":"Recipients who reported its emails as spam."}},"required":["sent","bounced","bounce_rate","complaints"],"additionalProperties":false,"description":"The last 30 days."},"test":{"type":"boolean","description":"The simulated domain of a test key's sender: it never sends for real."},"created_at":{"type":"string","description":"When it was bought, as an ISO 8601 time in UTC."},"ready_at":{"description":"When its mailboxes could send.","type":["string","null"]},"ended_at":{"description":"When it was released, or failed.","type":["string","null"]}},"required":["id","sender_id","domain","status","end_reason","mailboxes","daily_limit","full_daily_limit","sent_today","full_speed_at","price_per_month","period_end","renews","ends_at","renewal_failed_at","stats","test","created_at","ready_at","ended_at"],"additionalProperties":false},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"id":"dom_5r4k2m9x7p1q8w3e","sender_id":"snd_4k2m9x7p1q8w3e5r","domain":"northwindseating.example","status":"ending","end_reason":"canceled","mailboxes":[{"address":"alex@northwindseating.example","name":"Alex Morgan"},{"address":"alex.morgan@northwindseating.example","name":"Alex Morgan"},{"address":"a.morgan@northwindseating.example","name":"Alex Morgan"}],"daily_limit":45,"full_daily_limit":45,"sent_today":31,"full_speed_at":null,"price_per_month":27,"period_end":"2026-12-28T00:00:00.000Z","renews":false,"ends_at":"2026-12-27T00:00:00.000Z","renewal_failed_at":null,"stats":{"sent":812,"bounced":9,"bounce_rate":0.0111,"complaints":0},"test":false,"created_at":"2026-11-17T09:20:03.000Z","ready_at":"2026-11-17T09:24:41.000Z","ended_at":null},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/email/campaigns":{"post":{"operationId":"email_campaigns_create","summary":"Create a campaign","description":"Creates a sequence of up to six emails for a list of people, and with `start: true` begins sending it. It sends from the mailboxes of the sender's own sending domains (`POST /email/domains`), a few emails per mailbox per day, in each recipient's office hours; each recipient hears from one mailbox for the whole sequence, and the sequence stops for a person as soon as they answer, bounce or unsubscribe. Campaigns and emails are free: what the sender's domains send is paid with the domains. A campaign sends as much a day as its `daily_limit` allows, within what the domains send together, which all of the sender's campaigns share. Set `dry_run: true` first: it checks the texts and the list, shows the first email as the first recipients would get it and how long the campaign takes with the domains the sender has, and creates nothing. Starting fails with `no_domains` while the sender has none. With an `Idempotency-Key` header a retry never creates a second campaign. Recipients can also be added later with `POST /email/campaigns/{id}/recipients`.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/campaigns-create"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sender_id":{"type":"string","maxLength":40,"description":"The sender the emails are for, from `POST /email/senders`."},"name":{"type":"string","minLength":1,"maxLength":120,"description":"A name for your own reference. Recipients never see it."},"steps":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"object","properties":{"delay_days":{"description":"Sending days to wait after the step before. Default 3. Ignored on the first step.","type":"integer","minimum":1,"maximum":60},"subject":{"description":"The subject line. Required on the first step. Leave it out on a follow-up to send it as a reply in the thread of the first email, which is what gets answers.","type":"string","maxLength":300},"body":{"type":"string","maxLength":10000,"description":"The text, as plain text. Placeholders: `{{first_name}}`, `{{last_name}}`, `{{company}}`, your own from `variables`, and `{{sender_first_name}}` and `{{sender_name}}` for the name of the mailbox that writes. `{{first_name|there}}` falls back to \"there\". Do not add a signature block with your company and address or an unsubscribe line: every email ends with them."},"weight":{"default":1,"description":"With `variants`: this version's share of the recipients, relative to the others.","type":"integer","minimum":1,"maximum":100},"variants":{"default":[],"description":"Other versions of this step, to test against it. Each recipient gets one version, always the same one. `GET /email/campaigns/{id}` shows how each did.","maxItems":3,"type":"array","items":{"type":"object","properties":{"subject":{"description":"The subject line. Required on the first step. Leave it out on a follow-up to send it as a reply in the thread of the first email, which is what gets answers.","type":"string","maxLength":300},"body":{"type":"string","maxLength":10000,"description":"The text, as plain text. Placeholders: `{{first_name}}`, `{{last_name}}`, `{{company}}`, your own from `variables`, and `{{sender_first_name}}` and `{{sender_name}}` for the name of the mailbox that writes. `{{first_name|there}}` falls back to \"there\". Do not add a signature block with your company and address or an unsubscribe line: every email ends with them."},"weight":{"default":1,"description":"With `variants`: this version's share of the recipients, relative to the others.","type":"integer","minimum":1,"maximum":100}},"required":["body"],"additionalProperties":false}}},"required":["body"],"additionalProperties":false},"description":"The emails of the sequence, in order. Two to four work best."},"recipients":{"description":"Up to 1000 people to write to. Each is checked: bad addresses, people on a suppression list and people in regions the sender has not declared are left out and listed in the answer.","maxItems":1000,"type":"array","items":{"type":"object","properties":{"email":{"description":"The person's work email.","type":"string","maxLength":254},"contact_id":{"description":"A person ID this account was given in the last 90 days, such as `per_8f3k2m9x4p1q`, instead of `email`: from a contact search, a people search, or any endpoint that returns a person. Their email, name, company and country on file are used. A person found without an email needs one first: `POST /enrich/people/email/find` with `person_id`.","type":"string","maxLength":40},"first_name":{"description":"The person's first name, for `{{first_name}}`.","type":"string","maxLength":80},"last_name":{"description":"The person's last name, for `{{last_name}}`.","type":"string","maxLength":80},"company":{"description":"The company the person works at, for `{{company}}`.","type":"string","maxLength":160},"country":{"description":"Where the person is, as an ISO code such as `US`. It decides their office hours and which rules apply. Guessed from the address when left out. An address that shows a country itself, such as one ending in `.de`, stays under that country's rules whatever is given here.","type":"string","pattern":"^[A-Za-z]{2}$"},"timezone":{"description":"The person's IANA time zone, when you know it better than the country says.","type":"string","maxLength":60},"variables":{"description":"Values for your own placeholders, such as `{ \"product\": \"mesh chairs\" }` for `{{product}}`. Names are lowercase letters, digits and underscores.","type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"additionalProperties":{"type":"string","maxLength":500}},"metadata":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, such as `{\"customer_id\": \"c_812\"}`: up to 20 keys of at most 40 characters, each value a string of at most 500. Returned with the recipient, and in the events about them over the campaign's keys of the same name."}},"additionalProperties":false}},"schedule":{"type":"object","properties":{"timezone":{"description":"IANA time zone the hours are read in for a recipient whose own is not known. Default `America/New_York`.","type":"string","maxLength":60},"days":{"description":"Days emails go out on. Default Monday to Friday.","minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]}},"start_hour":{"description":"First hour emails go out in. Default 9.","type":"integer","minimum":0,"maximum":23},"end_hour":{"description":"Emails go out before this hour. Default 17.","type":"integer","minimum":1,"maximum":24}},"additionalProperties":false,"description":"When emails go out. The hours are read in each recipient's own time zone when their country or time zone is known."},"daily_limit":{"default":50,"description":"The most emails the campaign sends on one day. It never sends more than the sender's domains may send, 45 a day each at full speed, which the sender's campaigns share.","type":"integer","minimum":1,"maximum":1000},"stop_on_company_reply":{"default":true,"description":"When one person at a company answers, stop writing to the others at that company.","type":"boolean"},"track_opens":{"default":false,"description":"Count opens with an invisible image. Off by default: it lowers inbox placement, and mail programs that fetch images themselves make the numbers unreliable.","type":"boolean"},"track_clicks":{"default":false,"description":"Count clicks by sending links through our redirect. Off by default, for the same reason.","type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, such as `{\"customer_id\": \"c_812\"}`: up to 20 keys of at most 40 characters, each value a string of at most 500. Returned as given, and in the events about it."},"start":{"default":false,"description":"Start sending right away. Otherwise the campaign is a `draft` until `POST /email/campaigns/{id}/start`.","type":"boolean"},"dry_run":{"default":false,"description":"Check everything and show a preview, without creating anything. Problems in the texts are listed instead of failing the call.","type":"boolean"}},"required":["sender_id","name","steps"],"additionalProperties":false},"example":{"sender_id":"snd_4k2m9x7p1q8w3e5r","name":"US chair importers, November","steps":[{"subject":"Office chairs for {{company}}","body":"Hi {{first_name|there}},\n\nI saw that {{company}} imports office seating. We make mesh task chairs in Leeds and ship to the US in four 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 seating suppliers at {{company}}?\n\n{{sender_first_name}}"}],"recipients":[{"email":"dana.whitfield@harborline-imports.example","first_name":"Dana","company":"Harborline Imports","country":"US"},{"email":"info@coastal-office.example","company":"Coastal Office Supply"}],"daily_limit":30,"start":false}}}},"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"dry_run":{"type":"boolean","description":"True when nothing was created: the answer to `dry_run: true`."},"campaign":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Campaign ID, such as `cmp_7p1q8w3e5r4k2m9x`."},"name":{"type":"string"},"sender_id":{"type":"string","description":"The sender it is from. It sends from that sender's domains."},"status":{"type":"string","enum":["draft","active","paused","completed","canceled","suspended"],"description":"`draft` until started. `active` sends. `paused` waits for `resume`. `completed`, `canceled` and `suspended` are final."},"pause_reason":{"anyOf":[{"type":"string","enum":["manual","no_domains","list_quality","sending_suspended"]},{"type":"null"}],"description":"Why it is paused: `manual`, `no_domains` (the sender's last sending domain ended; it goes on by itself once a new one is ready), `list_quality` (too many invalid addresses; resuming accepts the list as it is), `sending_suspended` (the sender was suspended)."},"waiting":{"anyOf":[{"type":"string","enum":["daily_limit","ramping","no_domains"]},{"type":"null"}],"description":"Why an active campaign is not sending right now although people are due: `daily_limit` (it, or its sender's domains, sent all they may today), `ramping` (the same, while a domain is still on its way up to full speed), `no_domains` (its sender has no domain that can send yet). Null when it sends, or nobody is due."},"steps":{"type":"array","items":{"type":"object","properties":{"delay_days":{"type":"integer","description":"Sending days to wait after the email before. 0 on the first step."},"versions":{"type":"array","items":{"type":"object","properties":{"subject":{"description":"Null on a follow-up that goes out as a reply in the thread of the first email.","type":["string","null"]},"body":{"type":"string"},"weight":{"type":"integer","description":"Its share of the recipients, relative to the other versions."},"stats":{"type":"object","properties":{"sent":{"type":"integer"},"opened":{"type":"integer","description":"Emails opened at least once. Counted only when `track_opens` is on."},"clicked":{"type":"integer"},"replied":{"type":"integer","description":"Replies that came after this email and before the next one."}},"required":["sent","opened","clicked","replied"],"additionalProperties":false,"description":"How this version did."}},"required":["subject","body","weight","stats"],"additionalProperties":false},"description":"The text of the step. More than one when versions are tested against each other."}},"required":["delay_days","versions"],"additionalProperties":false},"description":"The sequence, in order."},"schedule":{"type":"object","properties":{"timezone":{"type":"string","description":"IANA time zone the hours are read in when a recipient's own is not known."},"days":{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]}},"start_hour":{"type":"integer"},"end_hour":{"type":"integer"}},"required":["timezone","days","start_hour","end_hour"],"additionalProperties":false,"description":"When emails go out: on these days, between these hours, in the recipient's time."},"daily_limit":{"type":"integer","description":"The most emails the campaign sends on one day. What its sender's domains can send is the limit above it."},"stop_on_company_reply":{"type":"boolean","description":"One person at a company answers: nobody else at that company gets another email."},"track_opens":{"type":"boolean"},"track_clicks":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your own keys and values, as you gave them. Empty when none were."},"stats":{"type":"object","properties":{"recipients":{"type":"integer","description":"People in the campaign."},"waiting":{"type":"integer","description":"Still being checked, or waiting for their first email."},"in_sequence":{"type":"integer","description":"Got at least one email and have more to come."},"finished":{"type":"integer","description":"Got every email and did not answer."},"replied":{"type":"integer"},"bounced":{"type":"integer"},"unsubscribed":{"type":"integer"},"excluded":{"type":"integer","description":"Left out or stopped: invalid address, suppressed, or stopped by you."},"emails_sent":{"type":"integer"},"emails_opened":{"type":"integer"},"emails_clicked":{"type":"integer"}},"required":["recipients","waiting","in_sequence","finished","replied","bounced","unsubscribed","excluded","emails_sent","emails_opened","emails_clicked"],"additionalProperties":false,"description":"Where the campaign stands."},"test":{"type":"boolean","description":"Made with a test key: sending and replies are simulated."},"created_at":{"type":"string","description":"When it was created, as an ISO 8601 time in UTC."},"started_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]}},"required":["id","name","sender_id","status","pause_reason","waiting","steps","schedule","daily_limit","stop_on_company_reply","track_opens","track_clicks","metadata","stats","test","created_at","started_at","completed_at"],"additionalProperties":false},{"type":"null"}],"description":"The campaign. Null on a dry run: nothing was created."},"recipients":{"type":"object","properties":{"accepted":{"type":"integer","description":"Addresses taken into the campaign."},"duplicates":{"type":"integer","description":"Addresses that were in the campaign already. Nothing changed for them."},"rejected":{"type":"integer","description":"Addresses left out. `results` says why for each."},"results":{"type":"array","items":{"type":"object","properties":{"email":{"type":["string","null"]},"status":{"type":"string","enum":["accepted","duplicate","rejected"]},"recipient_id":{"description":"The recipient's ID in the campaign, as in `recipient_ids`. Null for an address that was left out, and for an accepted one on a dry run, which adds nobody.","type":["string","null"]},"reason":{"description":"Why it was rejected: `invalid_address`, `blocked_mailbox`, `duplicate_in_request`, `suppressed`, `complained`, `undeliverable`, `active_in_other_campaign`, `region_blocked`, `region_not_declared`, `personal_mailbox_in_region`, `missing_variable`, `contact_not_found` or `campaign_full`.","type":["string","null"]},"message":{"description":"The same in a sentence, with what to do about it.","type":["string","null"]},"warnings":{"type":"array","items":{"type":"string"},"description":"For an accepted address: `shared_mailbox` (such as info@, read by whoever is on duty) or `personal_mailbox` (a private mail service)."}},"required":["email","status","recipient_id","reason","message","warnings"],"additionalProperties":false},"description":"One entry for each address that was rejected, was a duplicate, or was accepted with a warning. Addresses accepted without remark are only counted."},"recipient_ids":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"The recipient ID of each address of this request that is in the campaign, accepted or already there, keyed by address. The replies, the emails and the events name people by it. On a dry run, which adds nobody, only the ones already there."}},"required":["accepted","duplicates","rejected","results","recipient_ids"],"additionalProperties":false,"description":"What became of the recipients in this request."},"content":{"type":"object","properties":{"problems":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer","description":"The step, counted from 1."},"version":{"type":"integer","description":"The version of the step, counted from 1."},"field":{"type":"string","enum":["subject","body"]},"code":{"type":"string"},"message":{"type":"string"}},"required":["step","version","field","code","message"],"additionalProperties":false},"description":"What must be fixed. Only a dry run lists them; a real call fails with `content_rejected`."},"advice":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer","description":"The step, counted from 1."},"version":{"type":"integer","description":"The version of the step, counted from 1."},"field":{"type":"string","enum":["subject","body"]},"code":{"type":"string"},"message":{"type":"string"}},"required":["step","version","field","code","message"],"additionalProperties":false},"description":"What would make the emails more likely to reach an inbox and be answered."},"variables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"required":{"type":"boolean"}},"required":["name","required"],"additionalProperties":false},"description":"The placeholders your texts use beyond the sender's own. `required` ones have no fallback: a recipient without a value is left out."}},"required":["problems","advice","variables"],"additionalProperties":false,"description":"What the checks found in the texts."},"preview":{"type":"array","items":{"type":"object","properties":{"to":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"}},"required":["to","subject","body"],"additionalProperties":false},"description":"On a dry run: the first email as the first recipients would get it, in the first version of the step when it has `variants`. The name in `{{sender_first_name}}` is an example; each recipient is written to by one of our mailboxes under its own name."},"estimate":{"type":"object","properties":{"emails":{"type":"integer","description":"Emails if nobody answers: recipients times steps."},"per_day":{"type":"integer","description":"What the campaign can send today: its `daily_limit`, or less when the sender's domains send less today. A new mailbox starts at a few emails a day and sends more each day, which `days` counts in. 0 while the sender has none."},"days":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"About how many days until the last email, as the sender's mailboxes send more each day up to their full limit. Null while the sender has no sending domain."},"domains_for_a_week":{"type":"integer","description":"Sending domains it takes for everybody to get the first email within 7 days, at full speed, and with `daily_limit` high enough. Compare with what the sender has: `GET /email/domains?sender_id=`."}},"required":["emails","per_day","days","domains_for_a_week"],"additionalProperties":false,"description":"How long the campaign takes, with the domains the sender has."}},"required":["dry_run","campaign","recipients","content","preview","estimate"],"additionalProperties":false,"description":"The campaign, and what the checks found in its list and its texts."},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"dry_run":false,"campaign":{"id":"cmp_7p1q8w3e5r4k2m9x","name":"US chair importers, November","sender_id":"snd_4k2m9x7p1q8w3e5r","status":"draft","pause_reason":null,"waiting":null,"steps":[{"delay_days":0,"versions":[{"subject":"Office chairs for {{company}}","body":"Hi {{first_name|there}},\n\nI saw that {{company}} imports office seating. We make mesh task chairs in Leeds and ship to the US in four weeks.\n\nWould a price list be useful?\n\n{{sender_first_name}}","weight":1,"stats":{"sent":0,"opened":0,"clicked":0,"replied":0}}]},{"delay_days":3,"versions":[{"subject":null,"body":"Hi {{first_name|there}},\n\nJust checking that my note reached the right person. Who looks after seating suppliers at {{company}}?\n\n{{sender_first_name}}","weight":1,"stats":{"sent":0,"opened":0,"clicked":0,"replied":0}}]}],"schedule":{"timezone":"America/New_York","days":["mon","tue","wed","thu","fri"],"start_hour":9,"end_hour":17},"daily_limit":30,"stop_on_company_reply":true,"track_opens":false,"track_clicks":false,"metadata":{"customer_id":"c_812"},"stats":{"recipients":2,"waiting":2,"in_sequence":0,"finished":0,"replied":0,"bounced":0,"unsubscribed":0,"excluded":0,"emails_sent":0,"emails_opened":0,"emails_clicked":0},"test":false,"created_at":"2026-11-18T14:03:10.000Z","started_at":null,"completed_at":null},"recipients":{"accepted":2,"duplicates":0,"rejected":0,"results":[{"email":"info@coastal-office.example","status":"accepted","recipient_id":"rcp_5r4k2m9x7p1q8w3e","reason":null,"message":null,"warnings":["shared_mailbox"]}],"recipient_ids":{"dana.whitfield@harborline-imports.example":"rcp_9x7p1q8w3e5r4k2m","info@coastal-office.example":"rcp_5r4k2m9x7p1q8w3e"}},"content":{"problems":[],"advice":[],"variables":[{"name":"company","required":true},{"name":"first_name","required":false}]},"preview":[],"estimate":{"emails":4,"per_day":30,"days":4,"domains_for_a_week":1}},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"email_campaigns_list","summary":"List campaigns","description":"Your campaigns, newest first, each with where it stands: how many people are waiting, in the sequence, answered, bounced, and, while it runs, what it waits for when it is not sending (`waiting`). Free.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/campaigns-list"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"status","in":"query","required":false,"description":"Only campaigns in this status.","schema":{"type":"string","enum":["draft","active","paused","completed","canceled","suspended"]},"example":"active"},{"name":"sender_id","in":"query","required":false,"description":"Only the campaigns of this sender.","schema":{"type":"string","maxLength":40}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"example":1},{"name":"cursor","in":"query","required":false,"description":"To get the next page, pass `next_cursor` of the previous response back unchanged, with the same parameters.","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Campaign ID, such as `cmp_7p1q8w3e5r4k2m9x`."},"name":{"type":"string"},"sender_id":{"type":"string","description":"The sender it is from. It sends from that sender's domains."},"status":{"type":"string","enum":["draft","active","paused","completed","canceled","suspended"],"description":"`draft` until started. `active` sends. `paused` waits for `resume`. `completed`, `canceled` and `suspended` are final."},"pause_reason":{"anyOf":[{"type":"string","enum":["manual","no_domains","list_quality","sending_suspended"]},{"type":"null"}],"description":"Why it is paused: `manual`, `no_domains` (the sender's last sending domain ended; it goes on by itself once a new one is ready), `list_quality` (too many invalid addresses; resuming accepts the list as it is), `sending_suspended` (the sender was suspended)."},"waiting":{"anyOf":[{"type":"string","enum":["daily_limit","ramping","no_domains"]},{"type":"null"}],"description":"Why an active campaign is not sending right now although people are due: `daily_limit` (it, or its sender's domains, sent all they may today), `ramping` (the same, while a domain is still on its way up to full speed), `no_domains` (its sender has no domain that can send yet). Null when it sends, or nobody is due."},"steps":{"type":"array","items":{"type":"object","properties":{"delay_days":{"type":"integer","description":"Sending days to wait after the email before. 0 on the first step."},"versions":{"type":"array","items":{"type":"object","properties":{"subject":{"description":"Null on a follow-up that goes out as a reply in the thread of the first email.","type":["string","null"]},"body":{"type":"string"},"weight":{"type":"integer","description":"Its share of the recipients, relative to the other versions."},"stats":{"type":"object","properties":{"sent":{"type":"integer"},"opened":{"type":"integer","description":"Emails opened at least once. Counted only when `track_opens` is on."},"clicked":{"type":"integer"},"replied":{"type":"integer","description":"Replies that came after this email and before the next one."}},"required":["sent","opened","clicked","replied"],"additionalProperties":false,"description":"How this version did."}},"required":["subject","body","weight","stats"],"additionalProperties":false},"description":"The text of the step. More than one when versions are tested against each other."}},"required":["delay_days","versions"],"additionalProperties":false},"description":"The sequence, in order."},"schedule":{"type":"object","properties":{"timezone":{"type":"string","description":"IANA time zone the hours are read in when a recipient's own is not known."},"days":{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]}},"start_hour":{"type":"integer"},"end_hour":{"type":"integer"}},"required":["timezone","days","start_hour","end_hour"],"additionalProperties":false,"description":"When emails go out: on these days, between these hours, in the recipient's time."},"daily_limit":{"type":"integer","description":"The most emails the campaign sends on one day. What its sender's domains can send is the limit above it."},"stop_on_company_reply":{"type":"boolean","description":"One person at a company answers: nobody else at that company gets another email."},"track_opens":{"type":"boolean"},"track_clicks":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your own keys and values, as you gave them. Empty when none were."},"stats":{"type":"object","properties":{"recipients":{"type":"integer","description":"People in the campaign."},"waiting":{"type":"integer","description":"Still being checked, or waiting for their first email."},"in_sequence":{"type":"integer","description":"Got at least one email and have more to come."},"finished":{"type":"integer","description":"Got every email and did not answer."},"replied":{"type":"integer"},"bounced":{"type":"integer"},"unsubscribed":{"type":"integer"},"excluded":{"type":"integer","description":"Left out or stopped: invalid address, suppressed, or stopped by you."},"emails_sent":{"type":"integer"},"emails_opened":{"type":"integer"},"emails_clicked":{"type":"integer"}},"required":["recipients","waiting","in_sequence","finished","replied","bounced","unsubscribed","excluded","emails_sent","emails_opened","emails_clicked"],"additionalProperties":false,"description":"Where the campaign stands."},"test":{"type":"boolean","description":"Made with a test key: sending and replies are simulated."},"created_at":{"type":"string","description":"When it was created, as an ISO 8601 time in UTC."},"started_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]}},"required":["id","name","sender_id","status","pause_reason","waiting","steps","schedule","daily_limit","stop_on_company_reply","track_opens","track_clicks","metadata","stats","test","created_at","started_at","completed_at"],"additionalProperties":false},"description":"The campaigns of this page."},"has_more":{"type":"boolean","description":"Whether more follow this page."},"next_cursor":{"description":"Pass it as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","has_more","next_cursor","notice","usage"],"additionalProperties":false},"example":{"data":[{"id":"cmp_7p1q8w3e5r4k2m9x","name":"US chair importers, November","sender_id":"snd_4k2m9x7p1q8w3e5r","status":"active","pause_reason":null,"waiting":null,"steps":[{"delay_days":0,"versions":[{"subject":"Office chairs for {{company}}","body":"Hi {{first_name|there}},\n\nI saw that {{company}} imports office seating. We make mesh task chairs in Leeds and ship to the US in four weeks.\n\nWould a price list be useful?\n\n{{sender_first_name}}","weight":1,"stats":{"sent":42,"opened":0,"clicked":0,"replied":3}}]},{"delay_days":3,"versions":[{"subject":null,"body":"Hi {{first_name|there}},\n\nJust checking that my note reached the right person. Who looks after seating suppliers at {{company}}?\n\n{{sender_first_name}}","weight":1,"stats":{"sent":17,"opened":0,"clicked":0,"replied":1}}]}],"schedule":{"timezone":"America/New_York","days":["mon","tue","wed","thu","fri"],"start_hour":9,"end_hour":17},"daily_limit":30,"stop_on_company_reply":true,"track_opens":false,"track_clicks":false,"metadata":{"customer_id":"c_812"},"stats":{"recipients":120,"waiting":74,"in_sequence":38,"finished":0,"replied":4,"bounced":1,"unsubscribed":1,"excluded":2,"emails_sent":59,"emails_opened":0,"emails_clicked":0},"test":false,"created_at":"2026-11-18T14:03:10.000Z","started_at":"2026-11-18T14:03:11.000Z","completed_at":null}],"has_more":false,"next_cursor":null,"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/email/campaigns/{id}":{"get":{"operationId":"email_campaigns_get","summary":"Get a campaign","description":"One campaign: its status, its numbers, and how each version of each step did. `data.next_check_after` says how long to wait before asking again; an agent that polls should sleep that long, or use `GET /events` to hear about replies as they come. Free.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/campaigns-get"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"id","in":"path","required":true,"description":"Campaign ID, such as `cmp_7p1q8w3e5r4k2m9x`.","schema":{"type":"string","maxLength":40},"example":"cmp_7p1q8w3e5r4k2m9x"}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Campaign ID, such as `cmp_7p1q8w3e5r4k2m9x`."},"name":{"type":"string"},"sender_id":{"type":"string","description":"The sender it is from. It sends from that sender's domains."},"status":{"type":"string","enum":["draft","active","paused","completed","canceled","suspended"],"description":"`draft` until started. `active` sends. `paused` waits for `resume`. `completed`, `canceled` and `suspended` are final."},"pause_reason":{"anyOf":[{"type":"string","enum":["manual","no_domains","list_quality","sending_suspended"]},{"type":"null"}],"description":"Why it is paused: `manual`, `no_domains` (the sender's last sending domain ended; it goes on by itself once a new one is ready), `list_quality` (too many invalid addresses; resuming accepts the list as it is), `sending_suspended` (the sender was suspended)."},"waiting":{"anyOf":[{"type":"string","enum":["daily_limit","ramping","no_domains"]},{"type":"null"}],"description":"Why an active campaign is not sending right now although people are due: `daily_limit` (it, or its sender's domains, sent all they may today), `ramping` (the same, while a domain is still on its way up to full speed), `no_domains` (its sender has no domain that can send yet). Null when it sends, or nobody is due."},"steps":{"type":"array","items":{"type":"object","properties":{"delay_days":{"type":"integer","description":"Sending days to wait after the email before. 0 on the first step."},"versions":{"type":"array","items":{"type":"object","properties":{"subject":{"description":"Null on a follow-up that goes out as a reply in the thread of the first email.","type":["string","null"]},"body":{"type":"string"},"weight":{"type":"integer","description":"Its share of the recipients, relative to the other versions."},"stats":{"type":"object","properties":{"sent":{"type":"integer"},"opened":{"type":"integer","description":"Emails opened at least once. Counted only when `track_opens` is on."},"clicked":{"type":"integer"},"replied":{"type":"integer","description":"Replies that came after this email and before the next one."}},"required":["sent","opened","clicked","replied"],"additionalProperties":false,"description":"How this version did."}},"required":["subject","body","weight","stats"],"additionalProperties":false},"description":"The text of the step. More than one when versions are tested against each other."}},"required":["delay_days","versions"],"additionalProperties":false},"description":"The sequence, in order."},"schedule":{"type":"object","properties":{"timezone":{"type":"string","description":"IANA time zone the hours are read in when a recipient's own is not known."},"days":{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]}},"start_hour":{"type":"integer"},"end_hour":{"type":"integer"}},"required":["timezone","days","start_hour","end_hour"],"additionalProperties":false,"description":"When emails go out: on these days, between these hours, in the recipient's time."},"daily_limit":{"type":"integer","description":"The most emails the campaign sends on one day. What its sender's domains can send is the limit above it."},"stop_on_company_reply":{"type":"boolean","description":"One person at a company answers: nobody else at that company gets another email."},"track_opens":{"type":"boolean"},"track_clicks":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your own keys and values, as you gave them. Empty when none were."},"stats":{"type":"object","properties":{"recipients":{"type":"integer","description":"People in the campaign."},"waiting":{"type":"integer","description":"Still being checked, or waiting for their first email."},"in_sequence":{"type":"integer","description":"Got at least one email and have more to come."},"finished":{"type":"integer","description":"Got every email and did not answer."},"replied":{"type":"integer"},"bounced":{"type":"integer"},"unsubscribed":{"type":"integer"},"excluded":{"type":"integer","description":"Left out or stopped: invalid address, suppressed, or stopped by you."},"emails_sent":{"type":"integer"},"emails_opened":{"type":"integer"},"emails_clicked":{"type":"integer"}},"required":["recipients","waiting","in_sequence","finished","replied","bounced","unsubscribed","excluded","emails_sent","emails_opened","emails_clicked"],"additionalProperties":false,"description":"Where the campaign stands."},"test":{"type":"boolean","description":"Made with a test key: sending and replies are simulated."},"created_at":{"type":"string","description":"When it was created, as an ISO 8601 time in UTC."},"started_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"next_check_after":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Seconds until something is likely to have changed. Asking sooner tells you nothing new. Null when the campaign is not running."}},"required":["id","name","sender_id","status","pause_reason","waiting","steps","schedule","daily_limit","stop_on_company_reply","track_opens","track_clicks","metadata","stats","test","created_at","started_at","completed_at","next_check_after"],"additionalProperties":false},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"id":"cmp_7p1q8w3e5r4k2m9x","name":"US chair importers, November","sender_id":"snd_4k2m9x7p1q8w3e5r","status":"active","pause_reason":null,"waiting":null,"steps":[{"delay_days":0,"versions":[{"subject":"Office chairs for {{company}}","body":"Hi {{first_name|there}},\n\nI saw that {{company}} imports office seating. We make mesh task chairs in Leeds and ship to the US in four weeks.\n\nWould a price list be useful?\n\n{{sender_first_name}}","weight":1,"stats":{"sent":42,"opened":0,"clicked":0,"replied":3}}]},{"delay_days":3,"versions":[{"subject":null,"body":"Hi {{first_name|there}},\n\nJust checking that my note reached the right person. Who looks after seating suppliers at {{company}}?\n\n{{sender_first_name}}","weight":1,"stats":{"sent":17,"opened":0,"clicked":0,"replied":1}}]}],"schedule":{"timezone":"America/New_York","days":["mon","tue","wed","thu","fri"],"start_hour":9,"end_hour":17},"daily_limit":30,"stop_on_company_reply":true,"track_opens":false,"track_clicks":false,"metadata":{"customer_id":"c_812"},"stats":{"recipients":120,"waiting":74,"in_sequence":38,"finished":0,"replied":4,"bounced":1,"unsubscribed":1,"excluded":2,"emails_sent":59,"emails_opened":0,"emails_clicked":0},"test":false,"created_at":"2026-11-18T14:03:10.000Z","started_at":"2026-11-18T14:03:11.000Z","completed_at":null,"next_check_after":1740},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"email_campaigns_update","summary":"Change a campaign","description":"Changes a campaign that has not ended (`draft`, `active` or `paused`): only the fields given, the others stay as they are. Sending reads the campaign before every email, so a change counts from the next email on. `steps` replaces the whole sequence: a step that went out to somebody stays in it, with each of its versions that did, though its text may change for the emails still to come; steps nobody got yet can change, go or be added. People who already got every step are done and get no step added after. A wait that already started keeps its length. New texts are checked as on creation, and a placeholder without a fallback is refused while somebody still waiting has no value for it. There is no dry run: a change that fails a check changes nothing. Free.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/campaigns-update"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"id","in":"path","required":true,"description":"Campaign ID, such as `cmp_7p1q8w3e5r4k2m9x`.","schema":{"type":"string","maxLength":40},"example":"cmp_7p1q8w3e5r4k2m9x"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"A name for your own reference. Recipients never see it."},"steps":{"description":"The whole sequence as it is to be, in order. It replaces the one there is.","minItems":1,"maxItems":6,"type":"array","items":{"type":"object","properties":{"delay_days":{"description":"Sending days to wait after the step before. Default 3. Ignored on the first step.","type":"integer","minimum":1,"maximum":60},"subject":{"description":"The subject line. Required on the first step. Leave it out on a follow-up to send it as a reply in the thread of the first email, which is what gets answers.","type":"string","maxLength":300},"body":{"type":"string","maxLength":10000,"description":"The text, as plain text. Placeholders: `{{first_name}}`, `{{last_name}}`, `{{company}}`, your own from `variables`, and `{{sender_first_name}}` and `{{sender_name}}` for the name of the mailbox that writes. `{{first_name|there}}` falls back to \"there\". Do not add a signature block with your company and address or an unsubscribe line: every email ends with them."},"weight":{"default":1,"description":"With `variants`: this version's share of the recipients, relative to the others.","type":"integer","minimum":1,"maximum":100},"variants":{"default":[],"description":"Other versions of this step, to test against it. Each recipient gets one version, always the same one. `GET /email/campaigns/{id}` shows how each did.","maxItems":3,"type":"array","items":{"type":"object","properties":{"subject":{"description":"The subject line. Required on the first step. Leave it out on a follow-up to send it as a reply in the thread of the first email, which is what gets answers.","type":"string","maxLength":300},"body":{"type":"string","maxLength":10000,"description":"The text, as plain text. Placeholders: `{{first_name}}`, `{{last_name}}`, `{{company}}`, your own from `variables`, and `{{sender_first_name}}` and `{{sender_name}}` for the name of the mailbox that writes. `{{first_name|there}}` falls back to \"there\". Do not add a signature block with your company and address or an unsubscribe line: every email ends with them."},"weight":{"default":1,"description":"With `variants`: this version's share of the recipients, relative to the others.","type":"integer","minimum":1,"maximum":100}},"required":["body"],"additionalProperties":false}}},"required":["body"],"additionalProperties":false}},"schedule":{"description":"The days and hours to send in. It replaces the whole schedule.","type":"object","properties":{"timezone":{"description":"IANA time zone the hours are read in for a recipient whose own is not known. Default `America/New_York`.","type":"string","maxLength":60},"days":{"description":"Days emails go out on. Default Monday to Friday.","minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]}},"start_hour":{"description":"First hour emails go out in. Default 9.","type":"integer","minimum":0,"maximum":23},"end_hour":{"description":"Emails go out before this hour. Default 17.","type":"integer","minimum":1,"maximum":24}},"additionalProperties":false},"daily_limit":{"description":"The most emails the campaign sends on one day. It never sends more than the sender's domains may send, 45 a day each at full speed, which the sender's campaigns share.","type":"integer","minimum":1,"maximum":1000},"stop_on_company_reply":{"description":"When one person at a company answers, stop writing to the others at that company.","type":"boolean"},"track_opens":{"description":"Count opens with an invisible image. Off by default: it lowers inbox placement, and mail programs that fetch images themselves make the numbers unreliable.","type":"boolean"},"track_clicks":{"description":"Count clicks by sending links through our redirect. Off by default, for the same reason.","type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, such as `{\"customer_id\": \"c_812\"}`: up to 20 keys of at most 40 characters, each value a string of at most 500. It replaces the metadata there is; `{}` removes it. Events that already happened keep what they carried."}},"required":[],"additionalProperties":false},"example":{"id":"cmp_7p1q8w3e5r4k2m9x","daily_limit":80,"steps":[{"subject":"Office chairs for {{company}}","body":"Hi {{first_name|there}},\n\nI saw that {{company}} imports office seating. We make mesh task chairs in Leeds and ship to the US in four weeks.\n\nWould a price list be useful?\n\n{{sender_first_name}}"},{"delay_days":4,"body":"Hi {{first_name|there}},\n\nWe can ship samples within a week now. Shall I send one?\n\n{{sender_first_name}}"}]}}}},"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"campaign":{"type":"object","properties":{"id":{"type":"string","description":"Campaign ID, such as `cmp_7p1q8w3e5r4k2m9x`."},"name":{"type":"string"},"sender_id":{"type":"string","description":"The sender it is from. It sends from that sender's domains."},"status":{"type":"string","enum":["draft","active","paused","completed","canceled","suspended"],"description":"`draft` until started. `active` sends. `paused` waits for `resume`. `completed`, `canceled` and `suspended` are final."},"pause_reason":{"anyOf":[{"type":"string","enum":["manual","no_domains","list_quality","sending_suspended"]},{"type":"null"}],"description":"Why it is paused: `manual`, `no_domains` (the sender's last sending domain ended; it goes on by itself once a new one is ready), `list_quality` (too many invalid addresses; resuming accepts the list as it is), `sending_suspended` (the sender was suspended)."},"waiting":{"anyOf":[{"type":"string","enum":["daily_limit","ramping","no_domains"]},{"type":"null"}],"description":"Why an active campaign is not sending right now although people are due: `daily_limit` (it, or its sender's domains, sent all they may today), `ramping` (the same, while a domain is still on its way up to full speed), `no_domains` (its sender has no domain that can send yet). Null when it sends, or nobody is due."},"steps":{"type":"array","items":{"type":"object","properties":{"delay_days":{"type":"integer","description":"Sending days to wait after the email before. 0 on the first step."},"versions":{"type":"array","items":{"type":"object","properties":{"subject":{"description":"Null on a follow-up that goes out as a reply in the thread of the first email.","type":["string","null"]},"body":{"type":"string"},"weight":{"type":"integer","description":"Its share of the recipients, relative to the other versions."},"stats":{"type":"object","properties":{"sent":{"type":"integer"},"opened":{"type":"integer","description":"Emails opened at least once. Counted only when `track_opens` is on."},"clicked":{"type":"integer"},"replied":{"type":"integer","description":"Replies that came after this email and before the next one."}},"required":["sent","opened","clicked","replied"],"additionalProperties":false,"description":"How this version did."}},"required":["subject","body","weight","stats"],"additionalProperties":false},"description":"The text of the step. More than one when versions are tested against each other."}},"required":["delay_days","versions"],"additionalProperties":false},"description":"The sequence, in order."},"schedule":{"type":"object","properties":{"timezone":{"type":"string","description":"IANA time zone the hours are read in when a recipient's own is not known."},"days":{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]}},"start_hour":{"type":"integer"},"end_hour":{"type":"integer"}},"required":["timezone","days","start_hour","end_hour"],"additionalProperties":false,"description":"When emails go out: on these days, between these hours, in the recipient's time."},"daily_limit":{"type":"integer","description":"The most emails the campaign sends on one day. What its sender's domains can send is the limit above it."},"stop_on_company_reply":{"type":"boolean","description":"One person at a company answers: nobody else at that company gets another email."},"track_opens":{"type":"boolean"},"track_clicks":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your own keys and values, as you gave them. Empty when none were."},"stats":{"type":"object","properties":{"recipients":{"type":"integer","description":"People in the campaign."},"waiting":{"type":"integer","description":"Still being checked, or waiting for their first email."},"in_sequence":{"type":"integer","description":"Got at least one email and have more to come."},"finished":{"type":"integer","description":"Got every email and did not answer."},"replied":{"type":"integer"},"bounced":{"type":"integer"},"unsubscribed":{"type":"integer"},"excluded":{"type":"integer","description":"Left out or stopped: invalid address, suppressed, or stopped by you."},"emails_sent":{"type":"integer"},"emails_opened":{"type":"integer"},"emails_clicked":{"type":"integer"}},"required":["recipients","waiting","in_sequence","finished","replied","bounced","unsubscribed","excluded","emails_sent","emails_opened","emails_clicked"],"additionalProperties":false,"description":"Where the campaign stands."},"test":{"type":"boolean","description":"Made with a test key: sending and replies are simulated."},"created_at":{"type":"string","description":"When it was created, as an ISO 8601 time in UTC."},"started_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"next_check_after":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Seconds until something is likely to have changed. Asking sooner tells you nothing new. Null when the campaign is not running."}},"required":["id","name","sender_id","status","pause_reason","waiting","steps","schedule","daily_limit","stop_on_company_reply","track_opens","track_clicks","metadata","stats","test","created_at","started_at","completed_at","next_check_after"],"additionalProperties":false},"content":{"type":"object","properties":{"advice":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer","description":"The step, counted from 1."},"version":{"type":"integer","description":"The version of the step, counted from 1."},"field":{"type":"string","enum":["subject","body"]},"code":{"type":"string"},"message":{"type":"string"}},"required":["step","version","field","code","message"],"additionalProperties":false},"description":"What would make the emails more likely to reach an inbox and be answered."},"variables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"required":{"type":"boolean"}},"required":["name","required"],"additionalProperties":false},"description":"The placeholders your texts use beyond the sender's own. `required` ones have no fallback: a recipient without a value is left out."}},"required":["advice","variables"],"additionalProperties":false,"description":"What the checks found in the sequence as it is now."}},"required":["campaign","content"],"additionalProperties":false,"description":"The campaign as it is now, and what the checks found in its texts."},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"campaign":{"id":"cmp_7p1q8w3e5r4k2m9x","name":"US chair importers, November","sender_id":"snd_4k2m9x7p1q8w3e5r","status":"active","pause_reason":null,"waiting":null,"steps":[{"delay_days":0,"versions":[{"subject":"Office chairs for {{company}}","body":"Hi {{first_name|there}},\n\nI saw that {{company}} imports office seating. We make mesh task chairs in Leeds and ship to the US in four weeks.\n\nWould a price list be useful?\n\n{{sender_first_name}}","weight":1,"stats":{"sent":42,"opened":0,"clicked":0,"replied":3}}]},{"delay_days":3,"versions":[{"subject":null,"body":"Hi {{first_name|there}},\n\nJust checking that my note reached the right person. Who looks after seating suppliers at {{company}}?\n\n{{sender_first_name}}","weight":1,"stats":{"sent":17,"opened":0,"clicked":0,"replied":1}}]}],"schedule":{"timezone":"America/New_York","days":["mon","tue","wed","thu","fri"],"start_hour":9,"end_hour":17},"daily_limit":80,"stop_on_company_reply":true,"track_opens":false,"track_clicks":false,"metadata":{"customer_id":"c_812"},"stats":{"recipients":120,"waiting":74,"in_sequence":38,"finished":0,"replied":4,"bounced":1,"unsubscribed":1,"excluded":2,"emails_sent":59,"emails_opened":0,"emails_clicked":0},"test":false,"created_at":"2026-11-18T14:03:10.000Z","started_at":"2026-11-18T14:03:11.000Z","completed_at":null,"next_check_after":1740},"content":{"advice":[],"variables":[{"name":"company","required":true},{"name":"first_name","required":false}]}},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/email/campaigns/{id}/start":{"post":{"operationId":"email_campaigns_start","summary":"Start a campaign","description":"Starts a draft. From then on emails go out by themselves, in the recipients' office hours, from the sender's sending domains. Fails with `no_domains` while the sender has none (buy one with `POST /email/domains`), and with `sending_suspended` while the sender is suspended; the campaign stays a draft. Calling it again on a campaign that already runs changes nothing. Free.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/campaigns-start"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"id","in":"path","required":true,"description":"Campaign ID, such as `cmp_7p1q8w3e5r4k2m9x`.","schema":{"type":"string","maxLength":40},"example":"cmp_7p1q8w3e5r4k2m9x"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Campaign ID, such as `cmp_7p1q8w3e5r4k2m9x`."},"name":{"type":"string"},"sender_id":{"type":"string","description":"The sender it is from. It sends from that sender's domains."},"status":{"type":"string","enum":["draft","active","paused","completed","canceled","suspended"],"description":"`draft` until started. `active` sends. `paused` waits for `resume`. `completed`, `canceled` and `suspended` are final."},"pause_reason":{"anyOf":[{"type":"string","enum":["manual","no_domains","list_quality","sending_suspended"]},{"type":"null"}],"description":"Why it is paused: `manual`, `no_domains` (the sender's last sending domain ended; it goes on by itself once a new one is ready), `list_quality` (too many invalid addresses; resuming accepts the list as it is), `sending_suspended` (the sender was suspended)."},"waiting":{"anyOf":[{"type":"string","enum":["daily_limit","ramping","no_domains"]},{"type":"null"}],"description":"Why an active campaign is not sending right now although people are due: `daily_limit` (it, or its sender's domains, sent all they may today), `ramping` (the same, while a domain is still on its way up to full speed), `no_domains` (its sender has no domain that can send yet). Null when it sends, or nobody is due."},"steps":{"type":"array","items":{"type":"object","properties":{"delay_days":{"type":"integer","description":"Sending days to wait after the email before. 0 on the first step."},"versions":{"type":"array","items":{"type":"object","properties":{"subject":{"description":"Null on a follow-up that goes out as a reply in the thread of the first email.","type":["string","null"]},"body":{"type":"string"},"weight":{"type":"integer","description":"Its share of the recipients, relative to the other versions."},"stats":{"type":"object","properties":{"sent":{"type":"integer"},"opened":{"type":"integer","description":"Emails opened at least once. Counted only when `track_opens` is on."},"clicked":{"type":"integer"},"replied":{"type":"integer","description":"Replies that came after this email and before the next one."}},"required":["sent","opened","clicked","replied"],"additionalProperties":false,"description":"How this version did."}},"required":["subject","body","weight","stats"],"additionalProperties":false},"description":"The text of the step. More than one when versions are tested against each other."}},"required":["delay_days","versions"],"additionalProperties":false},"description":"The sequence, in order."},"schedule":{"type":"object","properties":{"timezone":{"type":"string","description":"IANA time zone the hours are read in when a recipient's own is not known."},"days":{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]}},"start_hour":{"type":"integer"},"end_hour":{"type":"integer"}},"required":["timezone","days","start_hour","end_hour"],"additionalProperties":false,"description":"When emails go out: on these days, between these hours, in the recipient's time."},"daily_limit":{"type":"integer","description":"The most emails the campaign sends on one day. What its sender's domains can send is the limit above it."},"stop_on_company_reply":{"type":"boolean","description":"One person at a company answers: nobody else at that company gets another email."},"track_opens":{"type":"boolean"},"track_clicks":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your own keys and values, as you gave them. Empty when none were."},"stats":{"type":"object","properties":{"recipients":{"type":"integer","description":"People in the campaign."},"waiting":{"type":"integer","description":"Still being checked, or waiting for their first email."},"in_sequence":{"type":"integer","description":"Got at least one email and have more to come."},"finished":{"type":"integer","description":"Got every email and did not answer."},"replied":{"type":"integer"},"bounced":{"type":"integer"},"unsubscribed":{"type":"integer"},"excluded":{"type":"integer","description":"Left out or stopped: invalid address, suppressed, or stopped by you."},"emails_sent":{"type":"integer"},"emails_opened":{"type":"integer"},"emails_clicked":{"type":"integer"}},"required":["recipients","waiting","in_sequence","finished","replied","bounced","unsubscribed","excluded","emails_sent","emails_opened","emails_clicked"],"additionalProperties":false,"description":"Where the campaign stands."},"test":{"type":"boolean","description":"Made with a test key: sending and replies are simulated."},"created_at":{"type":"string","description":"When it was created, as an ISO 8601 time in UTC."},"started_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"next_check_after":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Seconds until something is likely to have changed. Asking sooner tells you nothing new. Null when the campaign is not running."}},"required":["id","name","sender_id","status","pause_reason","waiting","steps","schedule","daily_limit","stop_on_company_reply","track_opens","track_clicks","metadata","stats","test","created_at","started_at","completed_at","next_check_after"],"additionalProperties":false},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"id":"cmp_7p1q8w3e5r4k2m9x","name":"US chair importers, November","sender_id":"snd_4k2m9x7p1q8w3e5r","status":"active","pause_reason":null,"waiting":null,"steps":[{"delay_days":0,"versions":[{"subject":"Office chairs for {{company}}","body":"Hi {{first_name|there}},\n\nI saw that {{company}} imports office seating. We make mesh task chairs in Leeds and ship to the US in four weeks.\n\nWould a price list be useful?\n\n{{sender_first_name}}","weight":1,"stats":{"sent":42,"opened":0,"clicked":0,"replied":3}}]},{"delay_days":3,"versions":[{"subject":null,"body":"Hi {{first_name|there}},\n\nJust checking that my note reached the right person. Who looks after seating suppliers at {{company}}?\n\n{{sender_first_name}}","weight":1,"stats":{"sent":17,"opened":0,"clicked":0,"replied":1}}]}],"schedule":{"timezone":"America/New_York","days":["mon","tue","wed","thu","fri"],"start_hour":9,"end_hour":17},"daily_limit":30,"stop_on_company_reply":true,"track_opens":false,"track_clicks":false,"metadata":{"customer_id":"c_812"},"stats":{"recipients":120,"waiting":74,"in_sequence":38,"finished":0,"replied":4,"bounced":1,"unsubscribed":1,"excluded":2,"emails_sent":59,"emails_opened":0,"emails_clicked":0},"test":false,"created_at":"2026-11-18T14:03:10.000Z","started_at":"2026-11-18T14:03:11.000Z","completed_at":null,"next_check_after":300},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/email/campaigns/{id}/pause":{"post":{"operationId":"email_campaigns_pause","summary":"Pause a campaign","description":"Stops sending until `resume`. Replies that arrive meanwhile are still recorded, and what the sender's domains do not send for it, its other campaigns may. Free.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/campaigns-pause"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"id","in":"path","required":true,"description":"Campaign ID, such as `cmp_7p1q8w3e5r4k2m9x`.","schema":{"type":"string","maxLength":40},"example":"cmp_7p1q8w3e5r4k2m9x"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Campaign ID, such as `cmp_7p1q8w3e5r4k2m9x`."},"name":{"type":"string"},"sender_id":{"type":"string","description":"The sender it is from. It sends from that sender's domains."},"status":{"type":"string","enum":["draft","active","paused","completed","canceled","suspended"],"description":"`draft` until started. `active` sends. `paused` waits for `resume`. `completed`, `canceled` and `suspended` are final."},"pause_reason":{"anyOf":[{"type":"string","enum":["manual","no_domains","list_quality","sending_suspended"]},{"type":"null"}],"description":"Why it is paused: `manual`, `no_domains` (the sender's last sending domain ended; it goes on by itself once a new one is ready), `list_quality` (too many invalid addresses; resuming accepts the list as it is), `sending_suspended` (the sender was suspended)."},"waiting":{"anyOf":[{"type":"string","enum":["daily_limit","ramping","no_domains"]},{"type":"null"}],"description":"Why an active campaign is not sending right now although people are due: `daily_limit` (it, or its sender's domains, sent all they may today), `ramping` (the same, while a domain is still on its way up to full speed), `no_domains` (its sender has no domain that can send yet). Null when it sends, or nobody is due."},"steps":{"type":"array","items":{"type":"object","properties":{"delay_days":{"type":"integer","description":"Sending days to wait after the email before. 0 on the first step."},"versions":{"type":"array","items":{"type":"object","properties":{"subject":{"description":"Null on a follow-up that goes out as a reply in the thread of the first email.","type":["string","null"]},"body":{"type":"string"},"weight":{"type":"integer","description":"Its share of the recipients, relative to the other versions."},"stats":{"type":"object","properties":{"sent":{"type":"integer"},"opened":{"type":"integer","description":"Emails opened at least once. Counted only when `track_opens` is on."},"clicked":{"type":"integer"},"replied":{"type":"integer","description":"Replies that came after this email and before the next one."}},"required":["sent","opened","clicked","replied"],"additionalProperties":false,"description":"How this version did."}},"required":["subject","body","weight","stats"],"additionalProperties":false},"description":"The text of the step. More than one when versions are tested against each other."}},"required":["delay_days","versions"],"additionalProperties":false},"description":"The sequence, in order."},"schedule":{"type":"object","properties":{"timezone":{"type":"string","description":"IANA time zone the hours are read in when a recipient's own is not known."},"days":{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]}},"start_hour":{"type":"integer"},"end_hour":{"type":"integer"}},"required":["timezone","days","start_hour","end_hour"],"additionalProperties":false,"description":"When emails go out: on these days, between these hours, in the recipient's time."},"daily_limit":{"type":"integer","description":"The most emails the campaign sends on one day. What its sender's domains can send is the limit above it."},"stop_on_company_reply":{"type":"boolean","description":"One person at a company answers: nobody else at that company gets another email."},"track_opens":{"type":"boolean"},"track_clicks":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your own keys and values, as you gave them. Empty when none were."},"stats":{"type":"object","properties":{"recipients":{"type":"integer","description":"People in the campaign."},"waiting":{"type":"integer","description":"Still being checked, or waiting for their first email."},"in_sequence":{"type":"integer","description":"Got at least one email and have more to come."},"finished":{"type":"integer","description":"Got every email and did not answer."},"replied":{"type":"integer"},"bounced":{"type":"integer"},"unsubscribed":{"type":"integer"},"excluded":{"type":"integer","description":"Left out or stopped: invalid address, suppressed, or stopped by you."},"emails_sent":{"type":"integer"},"emails_opened":{"type":"integer"},"emails_clicked":{"type":"integer"}},"required":["recipients","waiting","in_sequence","finished","replied","bounced","unsubscribed","excluded","emails_sent","emails_opened","emails_clicked"],"additionalProperties":false,"description":"Where the campaign stands."},"test":{"type":"boolean","description":"Made with a test key: sending and replies are simulated."},"created_at":{"type":"string","description":"When it was created, as an ISO 8601 time in UTC."},"started_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"next_check_after":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Seconds until something is likely to have changed. Asking sooner tells you nothing new. Null when the campaign is not running."}},"required":["id","name","sender_id","status","pause_reason","waiting","steps","schedule","daily_limit","stop_on_company_reply","track_opens","track_clicks","metadata","stats","test","created_at","started_at","completed_at","next_check_after"],"additionalProperties":false},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"id":"cmp_7p1q8w3e5r4k2m9x","name":"US chair importers, November","sender_id":"snd_4k2m9x7p1q8w3e5r","status":"paused","pause_reason":"manual","waiting":null,"steps":[{"delay_days":0,"versions":[{"subject":"Office chairs for {{company}}","body":"Hi {{first_name|there}},\n\nI saw that {{company}} imports office seating. We make mesh task chairs in Leeds and ship to the US in four weeks.\n\nWould a price list be useful?\n\n{{sender_first_name}}","weight":1,"stats":{"sent":42,"opened":0,"clicked":0,"replied":3}}]},{"delay_days":3,"versions":[{"subject":null,"body":"Hi {{first_name|there}},\n\nJust checking that my note reached the right person. Who looks after seating suppliers at {{company}}?\n\n{{sender_first_name}}","weight":1,"stats":{"sent":17,"opened":0,"clicked":0,"replied":1}}]}],"schedule":{"timezone":"America/New_York","days":["mon","tue","wed","thu","fri"],"start_hour":9,"end_hour":17},"daily_limit":30,"stop_on_company_reply":true,"track_opens":false,"track_clicks":false,"metadata":{"customer_id":"c_812"},"stats":{"recipients":120,"waiting":74,"in_sequence":38,"finished":0,"replied":4,"bounced":1,"unsubscribed":1,"excluded":2,"emails_sent":59,"emails_opened":0,"emails_clicked":0},"test":false,"created_at":"2026-11-18T14:03:10.000Z","started_at":"2026-11-18T14:03:11.000Z","completed_at":null,"next_check_after":null},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/email/campaigns/{id}/resume":{"post":{"operationId":"email_campaigns_resume","summary":"Resume a campaign","description":"Continues a paused campaign where it stopped. People whose next email was due in the meantime get it in their next office hours. Fails with `no_domains` while the sender has no sending domain; one paused for `no_domains` goes on by itself once a domain is ready. Resuming a campaign that was paused for `list_quality` accepts the list as it is. Free.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/campaigns-resume"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"id","in":"path","required":true,"description":"Campaign ID, such as `cmp_7p1q8w3e5r4k2m9x`.","schema":{"type":"string","maxLength":40},"example":"cmp_7p1q8w3e5r4k2m9x"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Campaign ID, such as `cmp_7p1q8w3e5r4k2m9x`."},"name":{"type":"string"},"sender_id":{"type":"string","description":"The sender it is from. It sends from that sender's domains."},"status":{"type":"string","enum":["draft","active","paused","completed","canceled","suspended"],"description":"`draft` until started. `active` sends. `paused` waits for `resume`. `completed`, `canceled` and `suspended` are final."},"pause_reason":{"anyOf":[{"type":"string","enum":["manual","no_domains","list_quality","sending_suspended"]},{"type":"null"}],"description":"Why it is paused: `manual`, `no_domains` (the sender's last sending domain ended; it goes on by itself once a new one is ready), `list_quality` (too many invalid addresses; resuming accepts the list as it is), `sending_suspended` (the sender was suspended)."},"waiting":{"anyOf":[{"type":"string","enum":["daily_limit","ramping","no_domains"]},{"type":"null"}],"description":"Why an active campaign is not sending right now although people are due: `daily_limit` (it, or its sender's domains, sent all they may today), `ramping` (the same, while a domain is still on its way up to full speed), `no_domains` (its sender has no domain that can send yet). Null when it sends, or nobody is due."},"steps":{"type":"array","items":{"type":"object","properties":{"delay_days":{"type":"integer","description":"Sending days to wait after the email before. 0 on the first step."},"versions":{"type":"array","items":{"type":"object","properties":{"subject":{"description":"Null on a follow-up that goes out as a reply in the thread of the first email.","type":["string","null"]},"body":{"type":"string"},"weight":{"type":"integer","description":"Its share of the recipients, relative to the other versions."},"stats":{"type":"object","properties":{"sent":{"type":"integer"},"opened":{"type":"integer","description":"Emails opened at least once. Counted only when `track_opens` is on."},"clicked":{"type":"integer"},"replied":{"type":"integer","description":"Replies that came after this email and before the next one."}},"required":["sent","opened","clicked","replied"],"additionalProperties":false,"description":"How this version did."}},"required":["subject","body","weight","stats"],"additionalProperties":false},"description":"The text of the step. More than one when versions are tested against each other."}},"required":["delay_days","versions"],"additionalProperties":false},"description":"The sequence, in order."},"schedule":{"type":"object","properties":{"timezone":{"type":"string","description":"IANA time zone the hours are read in when a recipient's own is not known."},"days":{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]}},"start_hour":{"type":"integer"},"end_hour":{"type":"integer"}},"required":["timezone","days","start_hour","end_hour"],"additionalProperties":false,"description":"When emails go out: on these days, between these hours, in the recipient's time."},"daily_limit":{"type":"integer","description":"The most emails the campaign sends on one day. What its sender's domains can send is the limit above it."},"stop_on_company_reply":{"type":"boolean","description":"One person at a company answers: nobody else at that company gets another email."},"track_opens":{"type":"boolean"},"track_clicks":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your own keys and values, as you gave them. Empty when none were."},"stats":{"type":"object","properties":{"recipients":{"type":"integer","description":"People in the campaign."},"waiting":{"type":"integer","description":"Still being checked, or waiting for their first email."},"in_sequence":{"type":"integer","description":"Got at least one email and have more to come."},"finished":{"type":"integer","description":"Got every email and did not answer."},"replied":{"type":"integer"},"bounced":{"type":"integer"},"unsubscribed":{"type":"integer"},"excluded":{"type":"integer","description":"Left out or stopped: invalid address, suppressed, or stopped by you."},"emails_sent":{"type":"integer"},"emails_opened":{"type":"integer"},"emails_clicked":{"type":"integer"}},"required":["recipients","waiting","in_sequence","finished","replied","bounced","unsubscribed","excluded","emails_sent","emails_opened","emails_clicked"],"additionalProperties":false,"description":"Where the campaign stands."},"test":{"type":"boolean","description":"Made with a test key: sending and replies are simulated."},"created_at":{"type":"string","description":"When it was created, as an ISO 8601 time in UTC."},"started_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"next_check_after":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Seconds until something is likely to have changed. Asking sooner tells you nothing new. Null when the campaign is not running."}},"required":["id","name","sender_id","status","pause_reason","waiting","steps","schedule","daily_limit","stop_on_company_reply","track_opens","track_clicks","metadata","stats","test","created_at","started_at","completed_at","next_check_after"],"additionalProperties":false},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"id":"cmp_7p1q8w3e5r4k2m9x","name":"US chair importers, November","sender_id":"snd_4k2m9x7p1q8w3e5r","status":"active","pause_reason":null,"waiting":null,"steps":[{"delay_days":0,"versions":[{"subject":"Office chairs for {{company}}","body":"Hi {{first_name|there}},\n\nI saw that {{company}} imports office seating. We make mesh task chairs in Leeds and ship to the US in four weeks.\n\nWould a price list be useful?\n\n{{sender_first_name}}","weight":1,"stats":{"sent":42,"opened":0,"clicked":0,"replied":3}}]},{"delay_days":3,"versions":[{"subject":null,"body":"Hi {{first_name|there}},\n\nJust checking that my note reached the right person. Who looks after seating suppliers at {{company}}?\n\n{{sender_first_name}}","weight":1,"stats":{"sent":17,"opened":0,"clicked":0,"replied":1}}]}],"schedule":{"timezone":"America/New_York","days":["mon","tue","wed","thu","fri"],"start_hour":9,"end_hour":17},"daily_limit":30,"stop_on_company_reply":true,"track_opens":false,"track_clicks":false,"metadata":{"customer_id":"c_812"},"stats":{"recipients":120,"waiting":74,"in_sequence":38,"finished":0,"replied":4,"bounced":1,"unsubscribed":1,"excluded":2,"emails_sent":59,"emails_opened":0,"emails_clicked":0},"test":false,"created_at":"2026-11-18T14:03:10.000Z","started_at":"2026-11-18T14:03:11.000Z","completed_at":null,"next_check_after":300},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/email/campaigns/{id}/cancel":{"post":{"operationId":"email_campaigns_cancel","summary":"Cancel a campaign","description":"Ends a campaign for good: nobody in it gets another email. Replies to emails already sent are still recorded. Free.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/campaigns-cancel"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"id","in":"path","required":true,"description":"Campaign ID, such as `cmp_7p1q8w3e5r4k2m9x`.","schema":{"type":"string","maxLength":40},"example":"cmp_7p1q8w3e5r4k2m9x"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Campaign ID, such as `cmp_7p1q8w3e5r4k2m9x`."},"name":{"type":"string"},"sender_id":{"type":"string","description":"The sender it is from. It sends from that sender's domains."},"status":{"type":"string","enum":["draft","active","paused","completed","canceled","suspended"],"description":"`draft` until started. `active` sends. `paused` waits for `resume`. `completed`, `canceled` and `suspended` are final."},"pause_reason":{"anyOf":[{"type":"string","enum":["manual","no_domains","list_quality","sending_suspended"]},{"type":"null"}],"description":"Why it is paused: `manual`, `no_domains` (the sender's last sending domain ended; it goes on by itself once a new one is ready), `list_quality` (too many invalid addresses; resuming accepts the list as it is), `sending_suspended` (the sender was suspended)."},"waiting":{"anyOf":[{"type":"string","enum":["daily_limit","ramping","no_domains"]},{"type":"null"}],"description":"Why an active campaign is not sending right now although people are due: `daily_limit` (it, or its sender's domains, sent all they may today), `ramping` (the same, while a domain is still on its way up to full speed), `no_domains` (its sender has no domain that can send yet). Null when it sends, or nobody is due."},"steps":{"type":"array","items":{"type":"object","properties":{"delay_days":{"type":"integer","description":"Sending days to wait after the email before. 0 on the first step."},"versions":{"type":"array","items":{"type":"object","properties":{"subject":{"description":"Null on a follow-up that goes out as a reply in the thread of the first email.","type":["string","null"]},"body":{"type":"string"},"weight":{"type":"integer","description":"Its share of the recipients, relative to the other versions."},"stats":{"type":"object","properties":{"sent":{"type":"integer"},"opened":{"type":"integer","description":"Emails opened at least once. Counted only when `track_opens` is on."},"clicked":{"type":"integer"},"replied":{"type":"integer","description":"Replies that came after this email and before the next one."}},"required":["sent","opened","clicked","replied"],"additionalProperties":false,"description":"How this version did."}},"required":["subject","body","weight","stats"],"additionalProperties":false},"description":"The text of the step. More than one when versions are tested against each other."}},"required":["delay_days","versions"],"additionalProperties":false},"description":"The sequence, in order."},"schedule":{"type":"object","properties":{"timezone":{"type":"string","description":"IANA time zone the hours are read in when a recipient's own is not known."},"days":{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]}},"start_hour":{"type":"integer"},"end_hour":{"type":"integer"}},"required":["timezone","days","start_hour","end_hour"],"additionalProperties":false,"description":"When emails go out: on these days, between these hours, in the recipient's time."},"daily_limit":{"type":"integer","description":"The most emails the campaign sends on one day. What its sender's domains can send is the limit above it."},"stop_on_company_reply":{"type":"boolean","description":"One person at a company answers: nobody else at that company gets another email."},"track_opens":{"type":"boolean"},"track_clicks":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your own keys and values, as you gave them. Empty when none were."},"stats":{"type":"object","properties":{"recipients":{"type":"integer","description":"People in the campaign."},"waiting":{"type":"integer","description":"Still being checked, or waiting for their first email."},"in_sequence":{"type":"integer","description":"Got at least one email and have more to come."},"finished":{"type":"integer","description":"Got every email and did not answer."},"replied":{"type":"integer"},"bounced":{"type":"integer"},"unsubscribed":{"type":"integer"},"excluded":{"type":"integer","description":"Left out or stopped: invalid address, suppressed, or stopped by you."},"emails_sent":{"type":"integer"},"emails_opened":{"type":"integer"},"emails_clicked":{"type":"integer"}},"required":["recipients","waiting","in_sequence","finished","replied","bounced","unsubscribed","excluded","emails_sent","emails_opened","emails_clicked"],"additionalProperties":false,"description":"Where the campaign stands."},"test":{"type":"boolean","description":"Made with a test key: sending and replies are simulated."},"created_at":{"type":"string","description":"When it was created, as an ISO 8601 time in UTC."},"started_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"next_check_after":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Seconds until something is likely to have changed. Asking sooner tells you nothing new. Null when the campaign is not running."}},"required":["id","name","sender_id","status","pause_reason","waiting","steps","schedule","daily_limit","stop_on_company_reply","track_opens","track_clicks","metadata","stats","test","created_at","started_at","completed_at","next_check_after"],"additionalProperties":false},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"id":"cmp_7p1q8w3e5r4k2m9x","name":"US chair importers, November","sender_id":"snd_4k2m9x7p1q8w3e5r","status":"canceled","pause_reason":null,"waiting":null,"steps":[{"delay_days":0,"versions":[{"subject":"Office chairs for {{company}}","body":"Hi {{first_name|there}},\n\nI saw that {{company}} imports office seating. We make mesh task chairs in Leeds and ship to the US in four weeks.\n\nWould a price list be useful?\n\n{{sender_first_name}}","weight":1,"stats":{"sent":42,"opened":0,"clicked":0,"replied":3}}]},{"delay_days":3,"versions":[{"subject":null,"body":"Hi {{first_name|there}},\n\nJust checking that my note reached the right person. Who looks after seating suppliers at {{company}}?\n\n{{sender_first_name}}","weight":1,"stats":{"sent":17,"opened":0,"clicked":0,"replied":1}}]}],"schedule":{"timezone":"America/New_York","days":["mon","tue","wed","thu","fri"],"start_hour":9,"end_hour":17},"daily_limit":30,"stop_on_company_reply":true,"track_opens":false,"track_clicks":false,"metadata":{"customer_id":"c_812"},"stats":{"recipients":120,"waiting":74,"in_sequence":38,"finished":0,"replied":4,"bounced":1,"unsubscribed":1,"excluded":2,"emails_sent":59,"emails_opened":0,"emails_clicked":0},"test":false,"created_at":"2026-11-18T14:03:10.000Z","started_at":"2026-11-18T14:03:11.000Z","completed_at":"2026-11-21T10:00:00.000Z","next_check_after":null},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/email/campaigns/{id}/recipients":{"post":{"operationId":"email_recipients_add","summary":"Add recipients","description":"Adds up to 1000 people to a campaign, at any time before it ends. Each address is checked while you wait (form, suppression lists, whether the person is already in a running campaign of yours, region rules, missing placeholder values), and the answer gives the reason for each address left out and the recipient ID of each one in the campaign. Accepted addresses are then checked for an existing mailbox: the campaign's first 50 within minutes, the others about a day before their first email, so a long list is not checked months ahead. The ones that fail become `invalid`. Sending the same list twice changes nothing. A recipient can be anyone an endpoint returned to you with an email: pass their `per_` ID as `contact_id` instead of the address. Free.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/recipients-add"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"id","in":"path","required":true,"description":"Campaign ID, such as `cmp_7p1q8w3e5r4k2m9x`.","schema":{"type":"string","maxLength":40},"example":"cmp_7p1q8w3e5r4k2m9x"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"recipients":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"email":{"description":"The person's work email.","type":"string","maxLength":254},"contact_id":{"description":"A person ID this account was given in the last 90 days, such as `per_8f3k2m9x4p1q`, instead of `email`: from a contact search, a people search, or any endpoint that returns a person. Their email, name, company and country on file are used. A person found without an email needs one first: `POST /enrich/people/email/find` with `person_id`.","type":"string","maxLength":40},"first_name":{"description":"The person's first name, for `{{first_name}}`.","type":"string","maxLength":80},"last_name":{"description":"The person's last name, for `{{last_name}}`.","type":"string","maxLength":80},"company":{"description":"The company the person works at, for `{{company}}`.","type":"string","maxLength":160},"country":{"description":"Where the person is, as an ISO code such as `US`. It decides their office hours and which rules apply. Guessed from the address when left out. An address that shows a country itself, such as one ending in `.de`, stays under that country's rules whatever is given here.","type":"string","pattern":"^[A-Za-z]{2}$"},"timezone":{"description":"The person's IANA time zone, when you know it better than the country says.","type":"string","maxLength":60},"variables":{"description":"Values for your own placeholders, such as `{ \"product\": \"mesh chairs\" }` for `{{product}}`. Names are lowercase letters, digits and underscores.","type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"additionalProperties":{"type":"string","maxLength":500}},"metadata":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, such as `{\"customer_id\": \"c_812\"}`: up to 20 keys of at most 40 characters, each value a string of at most 500. Returned with the recipient, and in the events about them over the campaign's keys of the same name."}},"additionalProperties":false},"description":"Up to 1000 people to add. Each needs `email` or `contact_id`."},"dry_run":{"default":false,"description":"Only check the list and say what would happen. Nothing is added.","type":"boolean"}},"required":["recipients"],"additionalProperties":false},"example":{"id":"cmp_7p1q8w3e5r4k2m9x","recipients":[{"email":"sam.ortiz@brightdesk.example","first_name":"Sam","company":"Brightdesk"},{"email":"noreply@brightdesk.example","company":"Brightdesk"}]}}}},"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"accepted":{"type":"integer","description":"Addresses taken into the campaign."},"duplicates":{"type":"integer","description":"Addresses that were in the campaign already. Nothing changed for them."},"rejected":{"type":"integer","description":"Addresses left out. `results` says why for each."},"results":{"type":"array","items":{"type":"object","properties":{"email":{"type":["string","null"]},"status":{"type":"string","enum":["accepted","duplicate","rejected"]},"recipient_id":{"description":"The recipient's ID in the campaign, as in `recipient_ids`. Null for an address that was left out, and for an accepted one on a dry run, which adds nobody.","type":["string","null"]},"reason":{"description":"Why it was rejected: `invalid_address`, `blocked_mailbox`, `duplicate_in_request`, `suppressed`, `complained`, `undeliverable`, `active_in_other_campaign`, `region_blocked`, `region_not_declared`, `personal_mailbox_in_region`, `missing_variable`, `contact_not_found` or `campaign_full`.","type":["string","null"]},"message":{"description":"The same in a sentence, with what to do about it.","type":["string","null"]},"warnings":{"type":"array","items":{"type":"string"},"description":"For an accepted address: `shared_mailbox` (such as info@, read by whoever is on duty) or `personal_mailbox` (a private mail service)."}},"required":["email","status","recipient_id","reason","message","warnings"],"additionalProperties":false},"description":"One entry for each address that was rejected, was a duplicate, or was accepted with a warning. Addresses accepted without remark are only counted."},"recipient_ids":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"The recipient ID of each address of this request that is in the campaign, accepted or already there, keyed by address. The replies, the emails and the events name people by it. On a dry run, which adds nobody, only the ones already there."},"dry_run":{"type":"boolean","description":"True when nothing was added: the answer to `dry_run: true`."}},"required":["accepted","duplicates","rejected","results","recipient_ids","dry_run"],"additionalProperties":false,"description":"What became of each address."},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"dry_run":false,"accepted":1,"duplicates":0,"rejected":1,"results":[{"email":"noreply@brightdesk.example","status":"rejected","recipient_id":null,"reason":"blocked_mailbox","message":"This mailbox is not read by a person (such as noreply@ or postmaster@).","warnings":[]}],"recipient_ids":{"sam.ortiz@brightdesk.example":"rcp_8n2v6c4z1x9b3m7k"}},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"email_recipients_list","summary":"List recipients","description":"The people in a campaign and how far each one is: how many emails they got, when the next is due, and why the sequence ended for those it ended for. In the order they were added. Free.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/recipients-list"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"id","in":"path","required":true,"description":"Campaign ID, such as `cmp_7p1q8w3e5r4k2m9x`.","schema":{"type":"string","maxLength":40},"example":"cmp_7p1q8w3e5r4k2m9x"},{"name":"status","in":"query","required":false,"description":"Only recipients in this status.","schema":{"type":"string","enum":["verifying","scheduled","active","replied","completed","bounced","unsubscribed","suppressed","invalid","stopped"]},"example":"active"},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"example":1},{"name":"cursor","in":"query","required":false,"description":"To get the next page, pass `next_cursor` of the previous response back unchanged, with the same parameters.","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Recipient ID, such as `rcp_9x7p1q8w3e5r4k2m`."},"conversation_id":{"type":"string","description":"Its conversation with the person, such as `cnv_9x7p1q8w3e5r4k2m`."},"campaign_id":{"type":"string"},"email":{"type":"string"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"company":{"type":["string","null"]},"country":{"description":"ISO 3166-1 alpha-2, as given or as read off the address.","type":["string","null"]},"contact_id":{"description":"The person ID it was added by.","type":["string","null"]},"status":{"type":"string","enum":["verifying","scheduled","active","replied","completed","bounced","unsubscribed","suppressed","invalid","stopped"],"description":"`verifying` 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`."},"reason":{"description":"Why, for `invalid`, `stopped`, `bounced` and `suppressed`.","type":["string","null"]},"risky":{"type":"boolean","description":"The address could not be confirmed: its domain accepts mail for any name."},"emails_sent":{"type":"integer"},"next_send_at":{"description":"When the next email is due at the earliest.","type":["string","null"]},"last_sent_at":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your own keys and values, as you gave them. Empty when none were."},"created_at":{"type":"string","description":"When it was added, as an ISO 8601 time in UTC."}},"required":["id","conversation_id","campaign_id","email","first_name","last_name","company","country","contact_id","status","reason","risky","emails_sent","next_send_at","last_sent_at","metadata","created_at"],"additionalProperties":false},"description":"The recipients of this page."},"has_more":{"type":"boolean","description":"Whether more follow this page."},"next_cursor":{"description":"Pass it as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","has_more","next_cursor","notice","usage"],"additionalProperties":false},"example":{"data":[{"id":"rcp_9x7p1q8w3e5r4k2m","conversation_id":"cnv_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-19T15:07:31.000Z","metadata":{"crm_id":"lead_4471"},"created_at":"2026-11-18T14:03:10.000Z"}],"has_more":true,"next_cursor":"cur_Qm9vVGhpc0lzQVNhbXBsZQ","notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/email/recipients/{id}/stop":{"post":{"operationId":"email_recipients_stop","summary":"Stop a recipient","description":"Ends the sequence for one person: they get no further email from this campaign. Use it when you reached them another way. It does not put them on the suppression list; for that use `POST /email/suppressions`. Stopping someone whose sequence has already ended changes nothing. Free.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/recipients-stop"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"id","in":"path","required":true,"description":"Recipient ID, such as `rcp_9x7p1q8w3e5r4k2m`.","schema":{"type":"string","maxLength":40},"example":"rcp_9x7p1q8w3e5r4k2m"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Recipient ID, such as `rcp_9x7p1q8w3e5r4k2m`."},"conversation_id":{"type":"string","description":"Its conversation with the person, such as `cnv_9x7p1q8w3e5r4k2m`."},"campaign_id":{"type":"string"},"email":{"type":"string"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"company":{"type":["string","null"]},"country":{"description":"ISO 3166-1 alpha-2, as given or as read off the address.","type":["string","null"]},"contact_id":{"description":"The person ID it was added by.","type":["string","null"]},"status":{"type":"string","enum":["verifying","scheduled","active","replied","completed","bounced","unsubscribed","suppressed","invalid","stopped"],"description":"`verifying` 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`."},"reason":{"description":"Why, for `invalid`, `stopped`, `bounced` and `suppressed`.","type":["string","null"]},"risky":{"type":"boolean","description":"The address could not be confirmed: its domain accepts mail for any name."},"emails_sent":{"type":"integer"},"next_send_at":{"description":"When the next email is due at the earliest.","type":["string","null"]},"last_sent_at":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your own keys and values, as you gave them. Empty when none were."},"created_at":{"type":"string","description":"When it was added, as an ISO 8601 time in UTC."}},"required":["id","conversation_id","campaign_id","email","first_name","last_name","company","country","contact_id","status","reason","risky","emails_sent","next_send_at","last_sent_at","metadata","created_at"],"additionalProperties":false},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"id":"rcp_9x7p1q8w3e5r4k2m","conversation_id":"cnv_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":"stopped","reason":"manual","risky":false,"emails_sent":1,"next_send_at":null,"last_sent_at":"2026-11-19T15:07:31.000Z","metadata":{"crm_id":"lead_4471"},"created_at":"2026-11-18T14:03:10.000Z"},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/conversations":{"get":{"operationId":"conversations_list","summary":"List conversations","description":"The inbox: one conversation for each person who wrote back, the latest activity first, in three folders. `inbox` holds the ones whose last reply waits for an answer, `low` the ones whose last reply needs nobody (an automatic answer, a no, an unsubscribe), and `done` the ones answered or marked done; a reply that comes later takes a conversation out of `done` again. The console shows the same folders, so what is read or done here is read or done there, and the other way round. Each conversation says what its last reply means and gives the start of it; read the whole exchange with `GET /conversations/{id}`. `total` says how many match on every page: with `limit=1`, it is how many wait in a folder. For now every conversation is in `email`: `channel` names the channel, and the object of that name holds what is particular to it. Free.","tags":["conversations"],"externalDocs":{"url":"https://won.dev/docs/email/conversations-list"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"folder","in":"query","required":false,"description":"The folder to list.","schema":{"default":"inbox","type":"string","enum":["inbox","low","done"]},"example":"inbox"},{"name":"intent","in":"query","required":false,"description":"Only the ones whose last reply means one of these, such as `interested,question`. Default: all.","schema":{"default":[],"maxItems":7,"type":"array","items":{"type":"string","enum":["interested","question","not_interested","wrong_person","unsubscribe","out_of_office","other"]}},"style":"form","explode":false},{"name":"campaign_id","in":"query","required":false,"description":"Only this campaign, such as `cmp_7p1q8w3e5r4k2m9x`.","schema":{"type":"string","maxLength":40}},{"name":"unread","in":"query","required":false,"description":"Only unread ones (`true`) or only read ones (`false`).","schema":{"type":"boolean"}},{"name":"search","in":"query","required":false,"description":"Only the ones whose name, company or email address contains this.","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"example":1},{"name":"cursor","in":"query","required":false,"description":"To get the next page, pass `next_cursor` of the previous response back unchanged, with the same parameters.","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Conversation ID, such as `cnv_9x7p1q8w3e5r4k2m`."},"channel":{"type":"string","enum":["email"],"description":"Where it runs: `email` for now. What only a channel has is in the object of its name."},"folder":{"anyOf":[{"type":"string","enum":["inbox","low","done"]},{"type":"null"}],"description":"`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."},"unread":{"type":"boolean","description":"A reply came after it was last read."},"answered":{"type":"boolean","description":"The last word is yours: an answer or a single email went out after the last reply. False while they have not written back."},"name":{"description":"The person's name, when it is known.","type":["string","null"]},"company":{"type":["string","null"]},"country":{"description":"ISO 3166-1 alpha-2.","type":["string","null"]},"campaign":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false,"description":"The campaign that wrote to them."},"replies":{"type":"integer","description":"Replies in it, automatic ones included."},"last_reply":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Reply ID, such as `rpl_1q8w3e5r4k2m9x7p`."},"intent":{"type":"string","enum":["interested","question","not_interested","wrong_person","unsubscribe","out_of_office","other"],"description":"What it means."},"automated":{"type":"boolean","description":"An automatic answer, such as an out-of-office note."},"text":{"type":"string","description":"The start of its text, up to 300 characters."},"has_attachments":{"type":"boolean"},"received_at":{"type":"string","description":"When it arrived, as an ISO 8601 time in UTC."}},"required":["id","intent","automated","text","has_attachments","received_at"],"additionalProperties":false},{"type":"null"}],"description":"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."},"activity_at":{"type":"string","description":"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."},"email":{"anyOf":[{"type":"object","properties":{"recipient_id":{"type":"string","description":"The recipient, such as `rcp_9x7p1q8w3e5r4k2m`, to write to again with `POST /email/messages`."},"address":{"type":"string","description":"The address the campaign wrote to."},"status":{"type":"string","enum":["verifying","scheduled","active","replied","completed","bounced","unsubscribed","suppressed","invalid","stopped"],"description":"Where their sequence stands, as a recipient's `status`: someone `unsubscribed`, `bounced`, `suppressed` or `invalid` cannot be written to."},"reply_from":{"description":"The address the last reply came from: another one when a colleague answered. Null while they have not written back.","type":["string","null"]},"subject":{"description":"The subject of the last reply. Null while they have not written back.","type":["string","null"]}},"required":["recipient_id","address","status","reply_from","subject"],"additionalProperties":false},{"type":"null"}],"description":"With `channel` `email`: what is particular to email. Null in other channels."}},"required":["id","channel","folder","unread","answered","name","company","country","campaign","replies","last_reply","activity_at","email"],"additionalProperties":false},"description":"The conversations of this page."},"total":{"type":"integer","description":"How many conversations of the folder match, on every page."},"has_more":{"type":"boolean","description":"Whether more follow this page."},"next_cursor":{"description":"Pass it as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","total","has_more","next_cursor","notice","usage"],"additionalProperties":false},"example":{"data":[{"id":"cnv_9x7p1q8w3e5r4k2m","channel":"email","folder":"inbox","unread":true,"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"}}],"total":4,"has_more":true,"next_cursor":"cur_Qm9vVGhpc0lzQVNhbXBsZQ","notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"conversations_update_many","summary":"Change conversations","description":"Marks up to 50 conversations at once, as `PATCH /conversations/{id}` marks one: read or unread, done or back in the inbox. Each ID gets its own result, in the order given: `updated` is false for an ID the key has no conversation with, and for a conversation nobody wrote back in yet, which is in no folder; the others are changed all the same. Free.","tags":["conversations"],"externalDocs":{"url":"https://won.dev/docs/email/conversations-update-many"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":40,"description":"Conversation ID, such as `cnv_9x7p1q8w3e5r4k2m`."},"description":"Up to 50 conversation IDs."},"read":{"description":"`true` marks it read, `false` unread.","type":"boolean"},"done":{"description":"`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.","type":"boolean"}},"required":["ids"],"additionalProperties":false},"example":{"ids":["cnv_9x7p1q8w3e5r4k2m","cnv_5r4k2m9x7p1q8w3e"],"done":true}}}},"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID as it was given."},"updated":{"type":"boolean","description":"Whether it was changed. False when the key has no conversation with it, or nobody wrote back in it yet."},"conversation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Conversation ID, such as `cnv_9x7p1q8w3e5r4k2m`."},"channel":{"type":"string","enum":["email"],"description":"Where it runs: `email` for now. What only a channel has is in the object of its name."},"folder":{"anyOf":[{"type":"string","enum":["inbox","low","done"]},{"type":"null"}],"description":"`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."},"unread":{"type":"boolean","description":"A reply came after it was last read."},"answered":{"type":"boolean","description":"The last word is yours: an answer or a single email went out after the last reply. False while they have not written back."},"name":{"description":"The person's name, when it is known.","type":["string","null"]},"company":{"type":["string","null"]},"country":{"description":"ISO 3166-1 alpha-2.","type":["string","null"]},"campaign":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false,"description":"The campaign that wrote to them."},"replies":{"type":"integer","description":"Replies in it, automatic ones included."},"last_reply":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Reply ID, such as `rpl_1q8w3e5r4k2m9x7p`."},"intent":{"type":"string","enum":["interested","question","not_interested","wrong_person","unsubscribe","out_of_office","other"],"description":"What it means."},"automated":{"type":"boolean","description":"An automatic answer, such as an out-of-office note."},"text":{"type":"string","description":"The start of its text, up to 300 characters."},"has_attachments":{"type":"boolean"},"received_at":{"type":"string","description":"When it arrived, as an ISO 8601 time in UTC."}},"required":["id","intent","automated","text","has_attachments","received_at"],"additionalProperties":false},{"type":"null"}],"description":"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."},"activity_at":{"type":"string","description":"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."},"email":{"anyOf":[{"type":"object","properties":{"recipient_id":{"type":"string","description":"The recipient, such as `rcp_9x7p1q8w3e5r4k2m`, to write to again with `POST /email/messages`."},"address":{"type":"string","description":"The address the campaign wrote to."},"status":{"type":"string","enum":["verifying","scheduled","active","replied","completed","bounced","unsubscribed","suppressed","invalid","stopped"],"description":"Where their sequence stands, as a recipient's `status`: someone `unsubscribed`, `bounced`, `suppressed` or `invalid` cannot be written to."},"reply_from":{"description":"The address the last reply came from: another one when a colleague answered. Null while they have not written back.","type":["string","null"]},"subject":{"description":"The subject of the last reply. Null while they have not written back.","type":["string","null"]}},"required":["recipient_id","address","status","reply_from","subject"],"additionalProperties":false},{"type":"null"}],"description":"With `channel` `email`: what is particular to email. Null in other channels."}},"required":["id","channel","folder","unread","answered","name","company","country","campaign","replies","last_reply","activity_at","email"],"additionalProperties":false},{"type":"null"}],"description":"The conversation as it is now. Null when it was not found."}},"required":["id","updated","conversation"],"additionalProperties":false},"description":"A result for each ID, in the order given."},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"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}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/conversations/{id}":{"get":{"operationId":"conversations_get","summary":"Get a conversation","description":"One conversation, with where it stands and everything written in it, oldest first. Everyone a campaign writes to has one, also before they write back. In `email` that is the steps that went out, what came back (also from colleagues at the same company), your answers and single emails, each with its full text, and `email.recipient` says where their sequence stands; replies carry their files, with links to download them. Read it before you answer someone or write to them again. Reading it does not mark it read: `PATCH /conversations/{id}` does. The latest 100 messages are returned; `truncated` says when there were more. Free.","tags":["conversations"],"externalDocs":{"url":"https://won.dev/docs/email/conversations-get"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"id","in":"path","required":true,"description":"Conversation ID, such as `cnv_9x7p1q8w3e5r4k2m`.","schema":{"type":"string","maxLength":40},"example":"cnv_9x7p1q8w3e5r4k2m"}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Conversation ID, such as `cnv_9x7p1q8w3e5r4k2m`."},"channel":{"type":"string","enum":["email"],"description":"Where it runs: `email` for now. What only a channel has is in the object of its name."},"folder":{"anyOf":[{"type":"string","enum":["inbox","low","done"]},{"type":"null"}],"description":"`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."},"unread":{"type":"boolean","description":"A reply came after it was last read."},"answered":{"type":"boolean","description":"The last word is yours: an answer or a single email went out after the last reply. False while they have not written back."},"name":{"description":"The person's name, when it is known.","type":["string","null"]},"company":{"type":["string","null"]},"country":{"description":"ISO 3166-1 alpha-2.","type":["string","null"]},"campaign":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false,"description":"The campaign that wrote to them."},"replies":{"type":"integer","description":"Replies in it, automatic ones included."},"last_reply":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Reply ID, such as `rpl_1q8w3e5r4k2m9x7p`."},"intent":{"type":"string","enum":["interested","question","not_interested","wrong_person","unsubscribe","out_of_office","other"],"description":"What it means."},"automated":{"type":"boolean","description":"An automatic answer, such as an out-of-office note."},"text":{"type":"string","description":"The start of its text, up to 300 characters."},"has_attachments":{"type":"boolean"},"received_at":{"type":"string","description":"When it arrived, as an ISO 8601 time in UTC."}},"required":["id","intent","automated","text","has_attachments","received_at"],"additionalProperties":false},{"type":"null"}],"description":"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."},"activity_at":{"type":"string","description":"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."},"email":{"anyOf":[{"type":"object","properties":{"recipient_id":{"type":"string","description":"The recipient, such as `rcp_9x7p1q8w3e5r4k2m`, to write to again with `POST /email/messages`."},"address":{"type":"string","description":"The address the campaign wrote to."},"status":{"type":"string","enum":["verifying","scheduled","active","replied","completed","bounced","unsubscribed","suppressed","invalid","stopped"],"description":"Where their sequence stands, as a recipient's `status`: someone `unsubscribed`, `bounced`, `suppressed` or `invalid` cannot be written to."},"reply_from":{"description":"The address the last reply came from: another one when a colleague answered. Null while they have not written back.","type":["string","null"]},"subject":{"description":"The subject of the last reply. Null while they have not written back.","type":["string","null"]},"recipient":{"type":"object","properties":{"id":{"type":"string","description":"Recipient ID, such as `rcp_9x7p1q8w3e5r4k2m`."},"conversation_id":{"type":"string","description":"Its conversation with the person, such as `cnv_9x7p1q8w3e5r4k2m`."},"campaign_id":{"type":"string"},"email":{"type":"string"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"company":{"type":["string","null"]},"country":{"description":"ISO 3166-1 alpha-2, as given or as read off the address.","type":["string","null"]},"contact_id":{"description":"The person ID it was added by.","type":["string","null"]},"status":{"type":"string","enum":["verifying","scheduled","active","replied","completed","bounced","unsubscribed","suppressed","invalid","stopped"],"description":"`verifying` 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`."},"reason":{"description":"Why, for `invalid`, `stopped`, `bounced` and `suppressed`.","type":["string","null"]},"risky":{"type":"boolean","description":"The address could not be confirmed: its domain accepts mail for any name."},"emails_sent":{"type":"integer"},"next_send_at":{"description":"When the next email is due at the earliest.","type":["string","null"]},"last_sent_at":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your own keys and values, as you gave them. Empty when none were."},"created_at":{"type":"string","description":"When it was added, as an ISO 8601 time in UTC."}},"required":["id","conversation_id","campaign_id","email","first_name","last_name","company","country","contact_id","status","reason","risky","emails_sent","next_send_at","last_sent_at","metadata","created_at"],"additionalProperties":false,"description":"The person the campaign wrote to, with where their sequence stands and your metadata."}},"required":["recipient_id","address","status","reply_from","subject","recipient"],"additionalProperties":false},{"type":"null"}],"description":"With `channel` `email`: what is particular to email. Null in other channels."},"messages":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["sent","received"],"description":"`sent` for an email to them, `received` for one from them or a colleague."},"at":{"type":"string","description":"When it was sent or arrived, as an ISO 8601 time in UTC."},"message":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Message ID, such as `msg_3e5r4k2m9x7p1q8w`."},"conversation_id":{"type":"string","description":"Its conversation with the person, such as `cnv_9x7p1q8w3e5r4k2m`."},"campaign_id":{"type":"string"},"recipient_id":{"type":"string"},"from":{"description":"The address it went out from: a mailbox of the sender's domains.","type":["string","null"]},"to":{"type":"string"},"kind":{"type":"string","enum":["step","reply","single"],"description":"`step` of the sequence, `reply` (your answer to a reply), or `single` (an email you sent on its own with `POST /email/messages`)."},"step":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The step, counted from 1. Null for a reply or a single email."},"version":{"type":"integer","description":"Which version of the step went out, counted from 1."},"status":{"type":"string","enum":["sending","sent","bounced","failed","skipped"],"description":"`sent`, `bounced`, or `sending` for the seconds it takes. `failed` and `skipped` did not go out."},"subject":{"type":"string"},"opens":{"type":"integer","description":"Opens that look like a person's. Machines that fetch mail to scan it are left out."},"clicks":{"type":"integer"},"bounce_type":{"anyOf":[{"type":"string","enum":["hard","soft"]},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"content_type":{"type":"string"},"size":{"type":"integer","description":"In bytes."}},"required":["filename","content_type","size"],"additionalProperties":false,"description":"A file that went with the email. Its content is not kept."},"description":"The files that went with it."},"sent_at":{"type":["string","null"]},"text":{"description":"What it said, placeholders filled in, without the footer and the quoted email.","type":["string","null"]}},"required":["id","conversation_id","campaign_id","recipient_id","from","to","kind","step","version","status","subject","opens","clicks","bounce_type","attachments","sent_at","text"],"additionalProperties":false},{"type":"null"}],"description":"With `sent`: the email. Null otherwise."},"reply":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Reply ID, such as `rpl_1q8w3e5r4k2m9x7p`."},"conversation_id":{"type":"string","description":"Its conversation with the person, such as `cnv_9x7p1q8w3e5r4k2m`."},"campaign_id":{"type":"string"},"recipient_id":{"type":"string"},"from_email":{"type":"string"},"from_name":{"type":["string","null"]},"subject":{"type":"string"},"text":{"type":"string","description":"What the person wrote, without the quoted email underneath."},"intent":{"type":"string","enum":["interested","question","not_interested","wrong_person","unsubscribe","out_of_office","other"],"description":"What the reply means: `interested`, `question`, `not_interested`, `wrong_person`, `unsubscribe`, `out_of_office` or `other`."},"confidence":{"type":"number","description":"How sure the intent is, 0 to 1. Read the text when it is low."},"automated":{"type":"boolean","description":"An automatic answer, such as an out-of-office note."},"matched_by":{"type":"string","enum":["thread","address","domain"],"description":"How it was tied to the recipient: it answers our email, it comes from their address, or from a colleague at the same company."},"has_attachments":{"type":"boolean","description":"The email came with files. They are listed in `attachments` within a minute or two of the reply showing up."},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Attachment ID, such as `att_6m2k9x7p1q8w3e5r`."},"filename":{"type":"string"},"content_type":{"type":"string","description":"As the sender's mail program declared it."},"size":{"type":"integer","description":"In bytes."},"status":{"type":"string","enum":["pending","stored","failed","skipped"],"description":"`stored` once we have a copy, `pending` for the minute or two before. `skipped` files are not copied: programs and scripts (`reason: blocked_type`) and files over 15 MB (`too_large`). `failed` could not be read from the mailbox."},"reason":{"description":"Why it was skipped or failed.","type":["string","null"]},"download_url":{"description":"Where to download it, without an API key, for one hour from this response. Null for a skipped or failed file.","type":["string","null"]}},"required":["id","filename","content_type","size","status","reason","download_url"],"additionalProperties":false,"description":"A file the reply came with."},"description":"The files it came with, in their order."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"The campaign's metadata with the recipient's over it, as they were when the reply arrived: up to 40 keys."},"received_at":{"type":"string","description":"When it arrived, as an ISO 8601 time in UTC."}},"required":["id","conversation_id","campaign_id","recipient_id","from_email","from_name","subject","text","intent","confidence","automated","matched_by","has_attachments","attachments","metadata","received_at"],"additionalProperties":false},{"type":"null"}],"description":"With `received`: the reply. Null otherwise."}},"required":["type","at","message","reply"],"additionalProperties":false,"description":"One email of the conversation."},"description":"With `channel` `email`: the emails, oldest first."},"truncated":{"type":"boolean","description":"Whether there were more than 100 and the oldest were left out."}},"required":["id","channel","folder","unread","answered","name","company","country","campaign","replies","last_reply","activity_at","email","messages","truncated"],"additionalProperties":false,"description":"The conversation, and everything written in it."},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"id":"cnv_9x7p1q8w3e5r4k2m","channel":"email","folder":"inbox","unread":true,"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","recipient":{"id":"rcp_9x7p1q8w3e5r4k2m","conversation_id":"cnv_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-19T15:07:31.000Z","metadata":{"crm_id":"lead_4471"},"created_at":"2026-11-18T14:03:10.000Z"}},"messages":[{"type":"sent","at":"2026-11-19T15:07:31.000Z","message":{"id":"msg_3e5r4k2m9x7p1q8w","conversation_id":"cnv_9x7p1q8w3e5r4k2m","campaign_id":"cmp_7p1q8w3e5r4k2m9x","recipient_id":"rcp_9x7p1q8w3e5r4k2m","from":"alex@northwindseating.example","to":"dana.whitfield@harborline-imports.example","kind":"step","step":1,"version":1,"status":"sent","subject":"Office chairs for Harborline Imports","opens":0,"clicks":0,"bounce_type":null,"attachments":[],"sent_at":"2026-11-19T15:07:31.000Z","text":"Hi Dana,\n\nI saw that Harborline Imports imports office seating. We make mesh task chairs in Leeds and ship to the US in four weeks.\n\nWould a price list be useful?\n\nAlex"},"reply":null},{"type":"received","at":"2026-11-20T13:41:02.000Z","message":null,"reply":{"id":"rpl_1q8w3e5r4k2m9x7p","conversation_id":"cnv_9x7p1q8w3e5r4k2m","campaign_id":"cmp_7p1q8w3e5r4k2m9x","recipient_id":"rcp_9x7p1q8w3e5r4k2m","from_email":"dana.whitfield@harborline-imports.example","from_name":"Dana Whitfield","subject":"Re: Office chairs for Harborline Imports","text":"Hi, yes, please send the price list. Our spec sheet for the tender is attached.","intent":"interested","confidence":0.7,"automated":false,"matched_by":"thread","has_attachments":true,"attachments":[{"id":"att_6m2k9x7p1q8w3e5r","filename":"tender-spec.pdf","content_type":"application/pdf","size":248113,"status":"stored","reason":null,"download_url":"https://won.dev/e/a/eyJhIjoiYXR0XzZtMms5eDdwMXE4dzNlNXIifQ.c2FtcGxl"}],"metadata":{"customer_id":"c_812","crm_id":"lead_4471"},"received_at":"2026-11-20T13:41:02.000Z"}}],"truncated":false},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"conversations_update","summary":"Change a conversation","description":"Marks a conversation read or unread (`read`), or done or back in the inbox (`done`), for everyone in the account: the console shows it too. Done files it under `done` and marks it read, until a later reply takes it out again. `done: false` moves it back to the inbox, where it stays until it is answered or marked done again, also when it was answered or its last reply needs nobody. Answering moves a conversation to `done` by itself: this is for the ones that need no answer from you. A conversation nobody wrote back in is in no folder yet, so marking it fails with `invalid_state`. Free.","tags":["conversations"],"externalDocs":{"url":"https://won.dev/docs/email/conversations-update"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"id","in":"path","required":true,"description":"Conversation ID, such as `cnv_9x7p1q8w3e5r4k2m`.","schema":{"type":"string","maxLength":40},"example":"cnv_9x7p1q8w3e5r4k2m"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"read":{"description":"`true` marks it read, `false` unread.","type":"boolean"},"done":{"description":"`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.","type":"boolean"}},"required":[],"additionalProperties":false},"example":{"id":"cnv_9x7p1q8w3e5r4k2m","done":true}}}},"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Conversation ID, such as `cnv_9x7p1q8w3e5r4k2m`."},"channel":{"type":"string","enum":["email"],"description":"Where it runs: `email` for now. What only a channel has is in the object of its name."},"folder":{"anyOf":[{"type":"string","enum":["inbox","low","done"]},{"type":"null"}],"description":"`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."},"unread":{"type":"boolean","description":"A reply came after it was last read."},"answered":{"type":"boolean","description":"The last word is yours: an answer or a single email went out after the last reply. False while they have not written back."},"name":{"description":"The person's name, when it is known.","type":["string","null"]},"company":{"type":["string","null"]},"country":{"description":"ISO 3166-1 alpha-2.","type":["string","null"]},"campaign":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false,"description":"The campaign that wrote to them."},"replies":{"type":"integer","description":"Replies in it, automatic ones included."},"last_reply":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Reply ID, such as `rpl_1q8w3e5r4k2m9x7p`."},"intent":{"type":"string","enum":["interested","question","not_interested","wrong_person","unsubscribe","out_of_office","other"],"description":"What it means."},"automated":{"type":"boolean","description":"An automatic answer, such as an out-of-office note."},"text":{"type":"string","description":"The start of its text, up to 300 characters."},"has_attachments":{"type":"boolean"},"received_at":{"type":"string","description":"When it arrived, as an ISO 8601 time in UTC."}},"required":["id","intent","automated","text","has_attachments","received_at"],"additionalProperties":false},{"type":"null"}],"description":"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."},"activity_at":{"type":"string","description":"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."},"email":{"anyOf":[{"type":"object","properties":{"recipient_id":{"type":"string","description":"The recipient, such as `rcp_9x7p1q8w3e5r4k2m`, to write to again with `POST /email/messages`."},"address":{"type":"string","description":"The address the campaign wrote to."},"status":{"type":"string","enum":["verifying","scheduled","active","replied","completed","bounced","unsubscribed","suppressed","invalid","stopped"],"description":"Where their sequence stands, as a recipient's `status`: someone `unsubscribed`, `bounced`, `suppressed` or `invalid` cannot be written to."},"reply_from":{"description":"The address the last reply came from: another one when a colleague answered. Null while they have not written back.","type":["string","null"]},"subject":{"description":"The subject of the last reply. Null while they have not written back.","type":["string","null"]}},"required":["recipient_id","address","status","reply_from","subject"],"additionalProperties":false},{"type":"null"}],"description":"With `channel` `email`: what is particular to email. Null in other channels."}},"required":["id","channel","folder","unread","answered","name","company","country","campaign","replies","last_reply","activity_at","email"],"additionalProperties":false},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"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"}},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/conversations/{id}/reply":{"post":{"operationId":"conversations_reply","summary":"Answer a conversation","description":"Sends your answer in a conversation, in the same thread and from the same mailbox it runs in, so the person sees one conversation with one sender. It answers the conversation's `last_reply`, or the reply given as `reply_id`, such as a colleague's; 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. The conversation then moves to `done` and is read, until they write again. It is free, and never held back by the day's limit. Someone who unsubscribed or bounced cannot be answered, and a conversation nobody wrote back in has nothing to answer: write again with `POST /email/messages`. The same answer to the same reply within 24 hours is taken as a repeat: you get the first answer back and nothing is sent twice.","tags":["conversations"],"externalDocs":{"url":"https://won.dev/docs/email/conversations-reply"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"id","in":"path","required":true,"description":"Conversation ID, such as `cnv_9x7p1q8w3e5r4k2m`.","schema":{"type":"string","maxLength":40},"example":"cnv_9x7p1q8w3e5r4k2m"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reply_id":{"description":"A reply of this conversation to answer instead of its last one, such as `rpl_1q8w3e5r4k2m9x7p`: the `messages` of `GET /conversations/{id}` have them all.","type":"string","maxLength":40},"text":{"type":"string","minLength":1,"maxLength":4000,"description":"Your answer, as plain text."},"attachments":{"default":[],"description":"Up to 3 files, 10 MB together: PDFs, pictures, office documents, CSV and text. Each needs `content` or `url`.","maxItems":3,"type":"array","items":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":120,"description":"The name the recipient sees, with its extension: `.pdf`, `.png`, `.jpg`, `.jpeg`, `.gif`, `.webp`, `.docx`, `.xlsx`, `.pptx`, `.doc`, `.xls`, `.ppt`, `.csv`, `.txt`."},"content":{"description":"The file, base64-encoded. Up to about 3 MB this way; pass `url` for a larger file.","type":"string","maxLength":4500000},"url":{"description":"Instead of `content`: a public `https://` address we fetch the file from while the email is sent.","type":"string","maxLength":2000}},"required":["filename"],"additionalProperties":false}}},"required":["text"],"additionalProperties":false},"example":{"id":"cnv_9x7p1q8w3e5r4k2m","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"}]}}}},"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Message ID, such as `msg_3e5r4k2m9x7p1q8w`."},"conversation_id":{"type":"string","description":"Its conversation with the person, such as `cnv_9x7p1q8w3e5r4k2m`."},"campaign_id":{"type":"string"},"recipient_id":{"type":"string"},"from":{"description":"The address it went out from: a mailbox of the sender's domains.","type":["string","null"]},"to":{"type":"string"},"kind":{"type":"string","enum":["step","reply","single"],"description":"`step` of the sequence, `reply` (your answer to a reply), or `single` (an email you sent on its own with `POST /email/messages`)."},"step":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The step, counted from 1. Null for a reply or a single email."},"version":{"type":"integer","description":"Which version of the step went out, counted from 1."},"status":{"type":"string","enum":["sending","sent","bounced","failed","skipped"],"description":"`sent`, `bounced`, or `sending` for the seconds it takes. `failed` and `skipped` did not go out."},"subject":{"type":"string"},"opens":{"type":"integer","description":"Opens that look like a person's. Machines that fetch mail to scan it are left out."},"clicks":{"type":"integer"},"bounce_type":{"anyOf":[{"type":"string","enum":["hard","soft"]},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"content_type":{"type":"string"},"size":{"type":"integer","description":"In bytes."}},"required":["filename","content_type","size"],"additionalProperties":false,"description":"A file that went with the email. Its content is not kept."},"description":"The files that went with it."},"sent_at":{"type":["string","null"]}},"required":["id","conversation_id","campaign_id","recipient_id","from","to","kind","step","version","status","subject","opens","clicks","bounce_type","attachments","sent_at"],"additionalProperties":false},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"id":"msg_9x7p1q8w3e5r4k2m","conversation_id":"cnv_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}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/email/messages":{"get":{"operationId":"email_messages_list","summary":"List sent emails","description":"The emails that went out, newest first: to whom, which step and version, whether it bounced, and the address it went out from. Opens and clicks are counted only for campaigns that track them. Free.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/messages-list"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"campaign_id","in":"query","required":false,"description":"Only this campaign, such as `cmp_7p1q8w3e5r4k2m9x`.","schema":{"type":"string","maxLength":40},"example":"cmp_7p1q8w3e5r4k2m9x"},{"name":"recipient_id","in":"query","required":false,"description":"Only emails to this recipient.","schema":{"type":"string","maxLength":40}},{"name":"status","in":"query","required":false,"description":"Only emails in this status.","schema":{"type":"string","enum":["sending","sent","bounced","failed","skipped"]}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"example":1},{"name":"cursor","in":"query","required":false,"description":"To get the next page, pass `next_cursor` of the previous response back unchanged, with the same parameters.","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Message ID, such as `msg_3e5r4k2m9x7p1q8w`."},"conversation_id":{"type":"string","description":"Its conversation with the person, such as `cnv_9x7p1q8w3e5r4k2m`."},"campaign_id":{"type":"string"},"recipient_id":{"type":"string"},"from":{"description":"The address it went out from: a mailbox of the sender's domains.","type":["string","null"]},"to":{"type":"string"},"kind":{"type":"string","enum":["step","reply","single"],"description":"`step` of the sequence, `reply` (your answer to a reply), or `single` (an email you sent on its own with `POST /email/messages`)."},"step":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The step, counted from 1. Null for a reply or a single email."},"version":{"type":"integer","description":"Which version of the step went out, counted from 1."},"status":{"type":"string","enum":["sending","sent","bounced","failed","skipped"],"description":"`sent`, `bounced`, or `sending` for the seconds it takes. `failed` and `skipped` did not go out."},"subject":{"type":"string"},"opens":{"type":"integer","description":"Opens that look like a person's. Machines that fetch mail to scan it are left out."},"clicks":{"type":"integer"},"bounce_type":{"anyOf":[{"type":"string","enum":["hard","soft"]},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"content_type":{"type":"string"},"size":{"type":"integer","description":"In bytes."}},"required":["filename","content_type","size"],"additionalProperties":false,"description":"A file that went with the email. Its content is not kept."},"description":"The files that went with it."},"sent_at":{"type":["string","null"]}},"required":["id","conversation_id","campaign_id","recipient_id","from","to","kind","step","version","status","subject","opens","clicks","bounce_type","attachments","sent_at"],"additionalProperties":false},"description":"The emails of this page."},"has_more":{"type":"boolean","description":"Whether more follow this page."},"next_cursor":{"description":"Pass it as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","has_more","next_cursor","notice","usage"],"additionalProperties":false},"example":{"data":[{"id":"msg_3e5r4k2m9x7p1q8w","conversation_id":"cnv_9x7p1q8w3e5r4k2m","campaign_id":"cmp_7p1q8w3e5r4k2m9x","recipient_id":"rcp_9x7p1q8w3e5r4k2m","from":"alex@northwindseating.example","to":"dana.whitfield@harborline-imports.example","kind":"step","step":1,"version":1,"status":"sent","subject":"Office chairs for Harborline Imports","opens":0,"clicks":0,"bounce_type":null,"attachments":[],"sent_at":"2026-11-19T15:07:31.000Z"}],"has_more":true,"next_cursor":"cur_Qm9vVGhpc0lzQVNhbXBsZQ","notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"email_messages_send","summary":"Send a single email","description":"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`. It is free, and counts toward what the sender's domains may send today, together with the campaigns: past that it fails with `daily_limit_reached`. 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.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/messages-send"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"recipient_id":{"description":"Write again to this recipient, such as `rcp_9x7p1q8w3e5r4k2m`. They must have had an email of the campaign.","type":"string","maxLength":40},"reply_id":{"description":"Instead of `recipient_id`: write to someone this reply pointed to, such as `rpl_1q8w3e5r4k2m9x7p`. Needs `to`.","type":"string","maxLength":40},"to":{"description":"With `reply_id`: the colleague's email address.","type":"string","maxLength":254},"first_name":{"description":"With `reply_id`: the colleague's first name, for `{{first_name}}`.","type":"string","maxLength":80},"last_name":{"description":"With `reply_id`: the colleague's last name.","type":"string","maxLength":80},"subject":{"description":"The subject line of a new thread. Leave it out to write in the thread of the last email.","type":"string","minLength":1,"maxLength":300},"text":{"type":"string","minLength":1,"maxLength":4000,"description":"The 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."},"attachments":{"default":[],"description":"Up to 3 files, 10 MB together: PDFs, pictures, office documents, CSV and text. Each needs `content` or `url`.","maxItems":3,"type":"array","items":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":120,"description":"The name the recipient sees, with its extension: `.pdf`, `.png`, `.jpg`, `.jpeg`, `.gif`, `.webp`, `.docx`, `.xlsx`, `.pptx`, `.doc`, `.xls`, `.ppt`, `.csv`, `.txt`."},"content":{"description":"The file, base64-encoded. Up to about 3 MB this way; pass `url` for a larger file.","type":"string","maxLength":4500000},"url":{"description":"Instead of `content`: a public `https://` address we fetch the file from while the email is sent.","type":"string","maxLength":2000}},"required":["filename"],"additionalProperties":false}}},"required":["text"],"additionalProperties":false},"example":{"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"}]}}}},"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Message ID, such as `msg_3e5r4k2m9x7p1q8w`."},"conversation_id":{"type":"string","description":"Its conversation with the person, such as `cnv_9x7p1q8w3e5r4k2m`."},"campaign_id":{"type":"string"},"recipient_id":{"type":"string"},"from":{"description":"The address it went out from: a mailbox of the sender's domains.","type":["string","null"]},"to":{"type":"string"},"kind":{"type":"string","enum":["step","reply","single"],"description":"`step` of the sequence, `reply` (your answer to a reply), or `single` (an email you sent on its own with `POST /email/messages`)."},"step":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The step, counted from 1. Null for a reply or a single email."},"version":{"type":"integer","description":"Which version of the step went out, counted from 1."},"status":{"type":"string","enum":["sending","sent","bounced","failed","skipped"],"description":"`sent`, `bounced`, or `sending` for the seconds it takes. `failed` and `skipped` did not go out."},"subject":{"type":"string"},"opens":{"type":"integer","description":"Opens that look like a person's. Machines that fetch mail to scan it are left out."},"clicks":{"type":"integer"},"bounce_type":{"anyOf":[{"type":"string","enum":["hard","soft"]},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"content_type":{"type":"string"},"size":{"type":"integer","description":"In bytes."}},"required":["filename","content_type","size"],"additionalProperties":false,"description":"A file that went with the email. Its content is not kept."},"description":"The files that went with it."},"sent_at":{"type":["string","null"]},"recipient":{"type":"object","properties":{"id":{"type":"string","description":"Recipient ID, such as `rcp_9x7p1q8w3e5r4k2m`."},"conversation_id":{"type":"string","description":"Its conversation with the person, such as `cnv_9x7p1q8w3e5r4k2m`."},"campaign_id":{"type":"string"},"email":{"type":"string"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"company":{"type":["string","null"]},"country":{"description":"ISO 3166-1 alpha-2, as given or as read off the address.","type":["string","null"]},"contact_id":{"description":"The person ID it was added by.","type":["string","null"]},"status":{"type":"string","enum":["verifying","scheduled","active","replied","completed","bounced","unsubscribed","suppressed","invalid","stopped"],"description":"`verifying` 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`."},"reason":{"description":"Why, for `invalid`, `stopped`, `bounced` and `suppressed`.","type":["string","null"]},"risky":{"type":"boolean","description":"The address could not be confirmed: its domain accepts mail for any name."},"emails_sent":{"type":"integer"},"next_send_at":{"description":"When the next email is due at the earliest.","type":["string","null"]},"last_sent_at":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your own keys and values, as you gave them. Empty when none were."},"created_at":{"type":"string","description":"When it was added, as an ISO 8601 time in UTC."}},"required":["id","conversation_id","campaign_id","email","first_name","last_name","company","country","contact_id","status","reason","risky","emails_sent","next_send_at","last_sent_at","metadata","created_at"],"additionalProperties":false,"description":"Who it went to. A colleague a reply pointed to is added to the campaign, outside its sequence."}},"required":["id","conversation_id","campaign_id","recipient_id","from","to","kind","step","version","status","subject","opens","clicks","bounce_type","attachments","sent_at","recipient"],"additionalProperties":false,"description":"The email, with who it went to."},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"id":"msg_2k9x7p1q8w3e5r4m","conversation_id":"cnv_9x7p1q8w3e5r4k2m","campaign_id":"cmp_7p1q8w3e5r4k2m9x","recipient_id":"rcp_9x7p1q8w3e5r4k2m","from":"alex@northwindseating.example","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,"attachments":[{"filename":"quote-harborline.pdf","content_type":"application/pdf","size":96540}],"sent_at":"2026-11-27T15:12:40.000Z","recipient":{"id":"rcp_9x7p1q8w3e5r4k2m","conversation_id":"cnv_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":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/email/replies":{"get":{"operationId":"email_replies_list","summary":"List replies","description":"What recipients answered, newest first, each with what it means (`intent`) and how sure that is. A reply ends the sequence for its sender by itself; nothing has to be done for that. Out-of-office notes are left out unless `include_automated` is true, and they do not end a sequence. Pass the `received_at` of the newest reply you have seen as `since` to get what is new: a reply counts from when it was filed here, which can be later than it was sent, so one you have seen can come again; tell them apart by `id`. Replies show up a few minutes after they are sent. Files a reply came with are in `attachments`, each with a link to download it. Free.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/replies-list"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"campaign_id","in":"query","required":false,"description":"Only this campaign, such as `cmp_7p1q8w3e5r4k2m9x`.","schema":{"type":"string","maxLength":40},"example":"cmp_7p1q8w3e5r4k2m9x"},{"name":"sender_id","in":"query","required":false,"description":"Only replies to the campaigns of this sender.","schema":{"type":"string","maxLength":40}},{"name":"intent","in":"query","required":false,"description":"Only replies with these intents, such as `interested,question`. Default: all.","schema":{"default":[],"maxItems":7,"type":"array","items":{"type":"string","enum":["interested","question","not_interested","wrong_person","unsubscribe","out_of_office","other"]}},"example":["interested"],"style":"form","explode":false},{"name":"since","in":"query","required":false,"description":"Only replies filed after this ISO 8601 time, such as `2026-11-20T13:41:02Z`.","schema":{"type":"string","maxLength":40}},{"name":"include_automated","in":"query","required":false,"description":"Also return automatic answers such as out-of-office notes.","schema":{"default":false,"type":"boolean"}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"example":1},{"name":"cursor","in":"query","required":false,"description":"To get the next page, pass `next_cursor` of the previous response back unchanged, with the same parameters.","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Reply ID, such as `rpl_1q8w3e5r4k2m9x7p`."},"conversation_id":{"type":"string","description":"Its conversation with the person, such as `cnv_9x7p1q8w3e5r4k2m`."},"campaign_id":{"type":"string"},"recipient_id":{"type":"string"},"from_email":{"type":"string"},"from_name":{"type":["string","null"]},"subject":{"type":"string"},"text":{"type":"string","description":"What the person wrote, without the quoted email underneath."},"intent":{"type":"string","enum":["interested","question","not_interested","wrong_person","unsubscribe","out_of_office","other"],"description":"What the reply means: `interested`, `question`, `not_interested`, `wrong_person`, `unsubscribe`, `out_of_office` or `other`."},"confidence":{"type":"number","description":"How sure the intent is, 0 to 1. Read the text when it is low."},"automated":{"type":"boolean","description":"An automatic answer, such as an out-of-office note."},"matched_by":{"type":"string","enum":["thread","address","domain"],"description":"How it was tied to the recipient: it answers our email, it comes from their address, or from a colleague at the same company."},"has_attachments":{"type":"boolean","description":"The email came with files. They are listed in `attachments` within a minute or two of the reply showing up."},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Attachment ID, such as `att_6m2k9x7p1q8w3e5r`."},"filename":{"type":"string"},"content_type":{"type":"string","description":"As the sender's mail program declared it."},"size":{"type":"integer","description":"In bytes."},"status":{"type":"string","enum":["pending","stored","failed","skipped"],"description":"`stored` once we have a copy, `pending` for the minute or two before. `skipped` files are not copied: programs and scripts (`reason: blocked_type`) and files over 15 MB (`too_large`). `failed` could not be read from the mailbox."},"reason":{"description":"Why it was skipped or failed.","type":["string","null"]},"download_url":{"description":"Where to download it, without an API key, for one hour from this response. Null for a skipped or failed file.","type":["string","null"]}},"required":["id","filename","content_type","size","status","reason","download_url"],"additionalProperties":false,"description":"A file the reply came with."},"description":"The files it came with, in their order."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"The campaign's metadata with the recipient's over it, as they were when the reply arrived: up to 40 keys."},"received_at":{"type":"string","description":"When it arrived, as an ISO 8601 time in UTC."}},"required":["id","conversation_id","campaign_id","recipient_id","from_email","from_name","subject","text","intent","confidence","automated","matched_by","has_attachments","attachments","metadata","received_at"],"additionalProperties":false},"description":"The replies of this page."},"has_more":{"type":"boolean","description":"Whether more follow this page."},"next_cursor":{"description":"Pass it as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","has_more","next_cursor","notice","usage"],"additionalProperties":false},"example":{"data":[{"id":"rpl_1q8w3e5r4k2m9x7p","conversation_id":"cnv_9x7p1q8w3e5r4k2m","campaign_id":"cmp_7p1q8w3e5r4k2m9x","recipient_id":"rcp_9x7p1q8w3e5r4k2m","from_email":"dana.whitfield@harborline-imports.example","from_name":"Dana Whitfield","subject":"Re: Office chairs for Harborline Imports","text":"Hi, yes, please send the price list. We are reviewing suppliers for next quarter.","intent":"interested","confidence":0.7,"automated":false,"matched_by":"thread","has_attachments":false,"attachments":[],"metadata":{"customer_id":"c_812","crm_id":"lead_4471"},"received_at":"2026-11-20T13:41:02.000Z"}],"has_more":false,"next_cursor":null,"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/email/replies/{id}":{"get":{"operationId":"email_replies_get","summary":"Get a reply","description":"One reply, with the files it came with. Each stored file has a `download_url` that works without an API key for one hour; ask again for a fresh one. Programs and scripts are not copied, nor files over 15 MB. Files show up a minute or two after the reply; asking for the reply also fetches them when that has not happened yet. Free.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/replies-get"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"id","in":"path","required":true,"description":"Reply ID, such as `rpl_1q8w3e5r4k2m9x7p`.","schema":{"type":"string","maxLength":40},"example":"rpl_1q8w3e5r4k2m9x7p"}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Reply ID, such as `rpl_1q8w3e5r4k2m9x7p`."},"conversation_id":{"type":"string","description":"Its conversation with the person, such as `cnv_9x7p1q8w3e5r4k2m`."},"campaign_id":{"type":"string"},"recipient_id":{"type":"string"},"from_email":{"type":"string"},"from_name":{"type":["string","null"]},"subject":{"type":"string"},"text":{"type":"string","description":"What the person wrote, without the quoted email underneath."},"intent":{"type":"string","enum":["interested","question","not_interested","wrong_person","unsubscribe","out_of_office","other"],"description":"What the reply means: `interested`, `question`, `not_interested`, `wrong_person`, `unsubscribe`, `out_of_office` or `other`."},"confidence":{"type":"number","description":"How sure the intent is, 0 to 1. Read the text when it is low."},"automated":{"type":"boolean","description":"An automatic answer, such as an out-of-office note."},"matched_by":{"type":"string","enum":["thread","address","domain"],"description":"How it was tied to the recipient: it answers our email, it comes from their address, or from a colleague at the same company."},"has_attachments":{"type":"boolean","description":"The email came with files. They are listed in `attachments` within a minute or two of the reply showing up."},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Attachment ID, such as `att_6m2k9x7p1q8w3e5r`."},"filename":{"type":"string"},"content_type":{"type":"string","description":"As the sender's mail program declared it."},"size":{"type":"integer","description":"In bytes."},"status":{"type":"string","enum":["pending","stored","failed","skipped"],"description":"`stored` once we have a copy, `pending` for the minute or two before. `skipped` files are not copied: programs and scripts (`reason: blocked_type`) and files over 15 MB (`too_large`). `failed` could not be read from the mailbox."},"reason":{"description":"Why it was skipped or failed.","type":["string","null"]},"download_url":{"description":"Where to download it, without an API key, for one hour from this response. Null for a skipped or failed file.","type":["string","null"]}},"required":["id","filename","content_type","size","status","reason","download_url"],"additionalProperties":false,"description":"A file the reply came with."},"description":"The files it came with, in their order."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"The campaign's metadata with the recipient's over it, as they were when the reply arrived: up to 40 keys."},"received_at":{"type":"string","description":"When it arrived, as an ISO 8601 time in UTC."}},"required":["id","conversation_id","campaign_id","recipient_id","from_email","from_name","subject","text","intent","confidence","automated","matched_by","has_attachments","attachments","metadata","received_at"],"additionalProperties":false},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"id":"rpl_1q8w3e5r4k2m9x7p","conversation_id":"cnv_9x7p1q8w3e5r4k2m","campaign_id":"cmp_7p1q8w3e5r4k2m9x","recipient_id":"rcp_9x7p1q8w3e5r4k2m","from_email":"dana.whitfield@harborline-imports.example","from_name":"Dana Whitfield","subject":"Re: Office chairs for Harborline Imports","text":"Hi, yes, please send the price list. Our spec sheet for the tender is attached.","intent":"interested","confidence":0.7,"automated":false,"matched_by":"thread","has_attachments":true,"attachments":[{"id":"att_6m2k9x7p1q8w3e5r","filename":"tender-spec.pdf","content_type":"application/pdf","size":248113,"status":"stored","reason":null,"download_url":"https://won.dev/e/a/eyJhIjoiYXR0XzZtMms5eDdwMXE4dzNlNXIifQ.c2FtcGxl"}],"metadata":{"customer_id":"c_812","crm_id":"lead_4471"},"received_at":"2026-11-20T13:41:02.000Z"},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/email/suppressions":{"get":{"operationId":"email_suppressions_list","summary":"List suppressions","description":"The addresses and domains you never write to, newest first: people who unsubscribed, addresses that bounced, people who complained, and whatever you added yourself. Every campaign of yours leaves them out. An entry with a `sender_id` holds only for that sender's campaigns: someone who unsubscribes from one sender's emails is on its list, not on your other senders'. A complaint and an address that does not exist hold for all of your mail. A test key has a list of its own: what a sandbox run simulated is on that one, and never on this. Free.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/suppressions-list"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"reason","in":"query","required":false,"description":"Only entries with this reason, such as `unsubscribed`.","schema":{"type":"string","enum":["unsubscribed","bounced","complained","manual"]},"example":"unsubscribed"},{"name":"sender_id","in":"query","required":false,"description":"Only the entries of this sender. Entries without a `sender_id` hold for it too, and are not among them.","schema":{"type":"string","maxLength":40}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"example":1},{"name":"cursor","in":"query","required":false,"description":"To get the next page, pass `next_cursor` of the previous response back unchanged, with the same parameters.","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Suppression ID, such as `sup_8w3e5r4k2m9x7p1q`."},"type":{"type":"string","enum":["email","domain"]},"value":{"type":"string"},"reason":{"type":"string","enum":["unsubscribed","bounced","complained","manual"]},"campaign_id":{"type":["string","null"]},"sender_id":{"description":"The sender whose emails it holds back. Null: all of the account's emails.","type":["string","null"]},"created_at":{"type":"string","description":"When it was added, as an ISO 8601 time in UTC."}},"required":["id","type","value","reason","campaign_id","sender_id","created_at"],"additionalProperties":false},"description":"The suppressions of this page."},"has_more":{"type":"boolean","description":"Whether more follow this page."},"next_cursor":{"description":"Pass it as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","has_more","next_cursor","notice","usage"],"additionalProperties":false},"example":{"data":[{"id":"sup_8w3e5r4k2m9x7p1q","type":"email","value":"lee.park@coastal-office.example","reason":"unsubscribed","campaign_id":"cmp_7p1q8w3e5r4k2m9x","sender_id":"snd_4k2m9x7p1q8w3e5r","created_at":"2026-11-20T08:15:09.000Z"}],"has_more":false,"next_cursor":null,"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"email_suppressions_add","summary":"Add suppressions","description":"Puts addresses or whole company domains on your do-not-contact list: existing customers, competitors, anyone who asked you elsewhere not to be written to. It holds from the next email on, in every campaign, including the ones already running; with `sender_id`, in that sender's campaigns only. Adding something twice changes nothing. Up to 1000 addresses and 100 domains in one call. A test key has a list of its own, which real campaigns do not obey. Free.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/suppressions-add"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"emails":{"default":[],"description":"Addresses never to write to, such as `lee.park@coastal-office.example`.","maxItems":1000,"type":"array","items":{"type":"string","maxLength":254}},"domains":{"default":[],"description":"Company domains never to write to, such as `coastal-office.example`: every address at them is left out. Mail services such as gmail.com cannot be suppressed as a whole.","maxItems":100,"type":"array","items":{"type":"string","maxLength":253}},"sender_id":{"description":"Hold them back from this sender's campaigns only, such as `snd_4k2m9x7p1q8w3e5r`. Without it, from all of yours.","type":"string","maxLength":40}},"required":[],"additionalProperties":false},"example":{"emails":["lee.park@coastal-office.example"],"domains":["brightdesk.example"]}}}},"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"added":{"type":"integer","description":"Entries that are new on the list."},"already_listed":{"type":"integer","description":"Entries that were on the list already."},"rejected":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"message":{"type":"string"}},"required":["value","message"],"additionalProperties":false},"description":"Entries that were not added, each with the reason."}},"required":["added","already_listed","rejected"],"additionalProperties":false,"description":"What became of the entries."},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"added":2,"already_listed":0,"rejected":[]},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/email/suppressions/{id}":{"delete":{"operationId":"email_suppressions_remove","summary":"Remove a suppression","description":"Takes an entry you added yourself, or an address that bounced, off the list, for when it was put there by mistake. Someone who unsubscribed or complained stays on it: that was their decision, not yours. An address that bounced is still left out until 90 days after the bounce, when it is tried again. Removing an entry does not restart a sequence that ended because of it. Free.","tags":["email"],"externalDocs":{"url":"https://won.dev/docs/email/suppressions-remove"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"id","in":"path","required":true,"description":"Suppression ID, such as `sup_8w3e5r4k2m9x7p1q`.","schema":{"type":"string","maxLength":40},"example":"sup_8w3e5r4k2m9x7p1q"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key returns the first response, instead of `not_found` for what is already gone.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"The entry that was removed."},"deleted":{"type":"boolean","description":"Always true: the entry is gone."}},"required":["id","deleted"],"additionalProperties":false,"description":"The entry that was removed."},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"id":"sup_8w3e5r4k2m9x7p1q","deleted":true},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/events":{"get":{"operationId":"events_list","summary":"List events","description":"What happened since you last asked, oldest first: a reply came in, an email bounced, a campaign finished. This is how to keep up without a webhook: call it with the `next_cursor` of your previous call as `cursor`, and you get exactly what is new, each event once. Unlike other lists, `next_cursor` is set on the last page too, and it does not expire while the event is kept. An empty `data` means nothing happened; ask again in a few minutes. Events are kept for 30 days. Types: `sender.approved`, `sender.rejected`, `sender.suspended`, `domain.ready`, `domain.failed`, `domain.renewal_upcoming`, `domain.renewal_failed`, `domain.released`, `campaign.started`, `campaign.paused`, `campaign.resumed`, `campaign.completed`, `campaign.canceled`, `email.sent`, `email.opened`, `email.clicked`, `email.bounced`, `reply.received`, `recipient.unsubscribed`, `task.completed`. Free.","tags":["events"],"externalDocs":{"url":"https://won.dev/docs/email/events-list"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"cursor","in":"query","required":false,"description":"Only events after the previous call: its `next_cursor`, passed back unchanged.","schema":{"type":"string","maxLength":40}},{"name":"since","in":"query","required":false,"description":"Only events after this ISO 8601 time, such as `2026-11-20T13:41:02Z`. For the first call, when there is no `cursor` yet.","schema":{"type":"string","maxLength":40}},{"name":"types","in":"query","required":false,"description":"Only these types, such as `reply.received,email.bounced`. Default: all.","schema":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","enum":["sender.approved","sender.rejected","sender.suspended","domain.ready","domain.failed","domain.renewal_upcoming","domain.renewal_failed","domain.released","campaign.started","campaign.paused","campaign.resumed","campaign.completed","campaign.canceled","email.sent","email.opened","email.clicked","email.bounced","reply.received","recipient.unsubscribed","task.completed"]}},"example":["reply.received"],"style":"form","explode":false},{"name":"campaign_id","in":"query","required":false,"description":"Only events of this campaign.","schema":{"type":"string","maxLength":40}},{"name":"sender_id","in":"query","required":false,"description":"Only events of this sender: of its campaigns and their emails, and of the sender and its domains.","schema":{"type":"string","maxLength":40}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":50,"type":"integer","minimum":1,"maximum":100},"example":1}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Event ID, such as `evt_5r4k2m9x7p1q8w3e`. Pass the last one as `after`."},"type":{"type":"string","description":"What happened, such as `reply.received`."},"created_at":{"type":"string","description":"When it happened, as an ISO 8601 time in UTC."},"campaign_id":{"type":["string","null"]},"sender_id":{"description":"The sender it is about: the campaign's, or the sender of the domain it is about. Null when it is about no sender.","type":["string","null"]},"test":{"type":"boolean","description":"From a test key's sandbox: nothing real happened."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your metadata of what it is about, as it was when it happened: the campaign's, with the recipient's over it when it is about a recipient (up to 40 keys then), or the task's. Empty when there is none."},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The details. Their shape depends on `type`."}},"required":["id","type","created_at","campaign_id","sender_id","test","metadata","data"],"additionalProperties":false},"description":"The events, oldest first."},"has_more":{"type":"boolean","description":"Whether more are waiting. Call again with `next_cursor` to get them."},"next_cursor":{"description":"Pass it as `cursor` in the next call, now or later. When `data` is empty it is the `cursor` you sent, so it can always be passed on. Null only when the call had no `cursor` and found no events: call again with `since`.","type":["string","null"]},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","has_more","next_cursor","notice","usage"],"additionalProperties":false},"example":{"data":[{"id":"evt_5r4k2m9x7p1q8w3e","type":"reply.received","created_at":"2026-11-20T13:44:10.000Z","campaign_id":"cmp_7p1q8w3e5r4k2m9x","sender_id":"snd_4k2m9x7p1q8w3e5r","test":false,"metadata":{"customer_id":"c_812","crm_id":"lead_4471"},"data":{"reply_id":"rpl_1q8w3e5r4k2m9x7p","conversation_id":"cnv_9x7p1q8w3e5r4k2m","recipient_id":"rcp_9x7p1q8w3e5r4k2m","email":"dana.whitfield@harborline-imports.example","from_email":"dana.whitfield@harborline-imports.example","subject":"Re: Office chairs for Harborline Imports","text":"Hi, yes, please send the price list. We are reviewing suppliers for next quarter.","intent":"interested","confidence":0.7,"automated":false,"has_attachments":false}}],"has_more":false,"next_cursor":"evt_5r4k2m9x7p1q8w3e","notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks":{"post":{"operationId":"webhooks_create","summary":"Create a webhook","description":"Has events sent to a URL of yours as they happen, as a JSON POST with the same object `GET /events` returns. Answer with any 2xx within 10 seconds; anything else is tried again, eight times over about a day, and an endpoint that fails for three days is switched off. The same event can arrive twice: tell them apart by `id`. Each delivery carries `Won-Signature: t=<unix time>,v1=<hex>`, where the hex is the HMAC-SHA256 of `<t>.<raw body>` with the `signing_secret` this call returns. The secret is shown this once. `*` means every type except the frequent ones (`email.sent`, `email.opened`, `email.clicked`), which are only sent when named. Up to 10 webhooks. A webhook made with a test key gets the events of the sandbox, and only those. Free.","tags":["webhooks"],"externalDocs":{"url":"https://won.dev/docs/email/webhooks-create"},"x-mode":"proxy","x-billing":"free","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"description":"Where to send events: an `https://` URL that is reachable from the internet."},"events":{"default":["*"],"description":"The types to send, such as `[\"reply.received\", \"email.bounced\"]`. Default `[\"*\"]`.","minItems":1,"maxItems":21,"type":"array","items":{"anyOf":[{"type":"string","const":"*"},{"type":"string","enum":["sender.approved","sender.rejected","sender.suspended","domain.ready","domain.failed","domain.renewal_upcoming","domain.renewal_failed","domain.released","campaign.started","campaign.paused","campaign.resumed","campaign.completed","campaign.canceled","email.sent","email.opened","email.clicked","email.bounced","reply.received","recipient.unsubscribed","task.completed"]}]}},"campaign_id":{"description":"Only events of this campaign.","type":"string","maxLength":40},"metadata":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, such as `{\"customer_id\": \"c_812\"}`: up to 20 keys of at most 40 characters, each value a string of at most 500. Returned with the webhook. Events do not carry it: the same event goes to every webhook."}},"required":["url"],"additionalProperties":false},"example":{"url":"https://agent.example/hooks/won","events":["reply.received","email.bounced"]}}}},"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Webhook ID, such as `whk_2m9x7p1q8w3e5r4k`."},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"campaign_id":{"type":["string","null"]},"status":{"type":"string","enum":["enabled","disabled"]},"disabled_reason":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your own keys and values, as you gave them. Empty when none were."},"created_at":{"type":"string","description":"When it was created, as an ISO 8601 time in UTC."},"signing_secret":{"type":"string","description":"The key deliveries are signed with. Store it now: it is not shown again."}},"required":["id","url","events","campaign_id","status","disabled_reason","metadata","created_at","signing_secret"],"additionalProperties":false,"description":"The webhook, with the secret its deliveries are signed with."},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"id":"whk_2m9x7p1q8w3e5r4k","url":"https://agent.example/hooks/won","events":["reply.received","email.bounced"],"campaign_id":null,"status":"enabled","disabled_reason":null,"metadata":{},"created_at":"2026-11-18T13:58:00.000Z","signing_secret":"whsec_4Zb1rW8sQ0nT7vYcK3mL9xDfH2gJ6pA5"},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"webhooks_list","summary":"List webhooks","description":"Your webhooks, oldest first, and whether each is still switched on. `disabled_reason` says why one was switched off. Free.","tags":["webhooks"],"externalDocs":{"url":"https://won.dev/docs/email/webhooks-list"},"x-mode":"proxy","x-billing":"free","responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Webhook ID, such as `whk_2m9x7p1q8w3e5r4k`."},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"campaign_id":{"type":["string","null"]},"status":{"type":"string","enum":["enabled","disabled"]},"disabled_reason":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your own keys and values, as you gave them. Empty when none were."},"created_at":{"type":"string","description":"When it was created, as an ISO 8601 time in UTC."}},"required":["id","url","events","campaign_id","status","disabled_reason","metadata","created_at"],"additionalProperties":false}},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":[{"id":"whk_2m9x7p1q8w3e5r4k","url":"https://agent.example/hooks/won","events":["*"],"campaign_id":null,"status":"enabled","disabled_reason":null,"metadata":{},"created_at":"2026-11-18T13:58:00.000Z"}],"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/deliveries":{"get":{"operationId":"webhooks_deliveries","summary":"List webhook deliveries","description":"The latest deliveries to a webhook, newest first, with what your server answered. For finding out why events do not arrive. Free.","tags":["webhooks"],"externalDocs":{"url":"https://won.dev/docs/email/webhooks-deliveries"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"id","in":"path","required":true,"description":"Webhook ID, such as `whk_2m9x7p1q8w3e5r4k`.","schema":{"type":"string","maxLength":40},"example":"whk_2m9x7p1q8w3e5r4k"},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"example":1}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"event_id":{"type":"string"},"event_type":{"type":"string"},"status":{"type":"string","enum":["pending","delivered","failed"],"description":"`pending` is waiting for its next attempt. `failed` was given up after eight."},"attempts":{"type":"integer"},"response_status":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The HTTP status your server answered with."},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"error":{"description":"What went wrong, when no 2xx came.","type":["string","null"]},"next_attempt_at":{"type":["string","null"]},"created_at":{"type":"string"},"delivered_at":{"type":["string","null"]}},"required":["event_id","event_type","status","attempts","response_status","duration_ms","error","next_attempt_at","created_at","delivered_at"],"additionalProperties":false}},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":[{"event_id":"evt_5r4k2m9x7p1q8w3e","event_type":"reply.received","status":"delivered","attempts":1,"response_status":200,"duration_ms":184,"error":null,"next_attempt_at":null,"created_at":"2026-11-20T13:44:10.000Z","delivered_at":"2026-11-20T13:44:41.000Z"}],"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}":{"delete":{"operationId":"webhooks_delete","summary":"Delete a webhook","description":"Stops sending events to a webhook and forgets it, with the deliveries that were still waiting. The events themselves stay readable with `GET /events`. Free.","tags":["webhooks"],"externalDocs":{"url":"https://won.dev/docs/email/webhooks-delete"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"id","in":"path","required":true,"description":"Webhook ID, such as `whk_2m9x7p1q8w3e5r4k`.","schema":{"type":"string","maxLength":40},"example":"whk_2m9x7p1q8w3e5r4k"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key returns the first response, instead of `not_found` for what is already gone.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"The webhook that was deleted."},"deleted":{"type":"boolean","description":"Always true: the webhook is gone."}},"required":["id","deleted"],"additionalProperties":false,"description":"The webhook that was deleted."},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"id":"whk_2m9x7p1q8w3e5r4k","deleted":true},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tasks":{"post":{"operationId":"tasks_create","summary":"Create a task","description":"Runs many calls of one endpoint in the background: up to 100 work email lookups (`enrich.people.email.find`), address checks (`enrich.email.verify`) or company signal checks (`signals.find`), one per item of `inputs`, or up to 500 leads (`trade.leads.find`) from one `input` whose `limit` goes up to 500. Each part runs exactly like a call of its own: it is billed at the endpoint's price for what it returns, and repeats and results paid for in the last 30 days are free. Creating the task is free. `max_cost` refuses a task that could cost more, and `dry_run: true` says the most it can cost. A task that runs out of balance or of its key's budget stops as `failed` and keeps what it did. Follow it with `GET /tasks/{id}`, or wait for the `task.completed` event. Results are kept for 7 days after the end. With an `Idempotency-Key` header a retry never creates a second task. Endpoints: `trade.leads.find`, `enrich.people.email.find`, `enrich.email.verify`, `signals.find`.","tags":["tasks"],"externalDocs":{"url":"https://won.dev/docs/tasks#create"},"x-mode":"composite","x-billing":"free","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"string","enum":["trade.leads.find","enrich.people.email.find","enrich.email.verify","signals.find"],"description":"What to run: `trade.leads.find`, `enrich.people.email.find`, `enrich.email.verify`, `signals.find`."},"inputs":{"description":"For a batch: up to 100 parts, each the body of one call of the endpoint, such as `{\"email\": \"jane@example.com\"}`.","minItems":1,"maxItems":100,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"input":{"description":"For `trade.leads.find`: the body of one call, with `limit` up to 500 (default 100). The task goes down the ranked list until it has `limit` leads or the list ends.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"max_cost":{"description":"The most the whole task may cost, in US dollars. A task that could cost more is refused before anything runs.","type":"number","exclusiveMinimum":0},"dry_run":{"default":false,"description":"Only say the most the task can cost. Nothing is created or charged.","type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, such as `{\"customer_id\": \"c_812\"}`: up to 20 keys of at most 40 characters, each value a string of at most 500. Returned as given, and in the events about it."}},"required":["operation"],"additionalProperties":false},"example":{"operation":"enrich.people.email.find","inputs":[{"first_name":"Dana","last_name":"Reyes","domain":"harbor-chairs.com"},{"linkedin_url":"https://www.linkedin.com/in/lee-okafor"}],"max_cost":3,"metadata":{"customer_id":"c_812"}}}}},"responses":{"200":{"description":"Nothing was started: the answer to `dry_run: true`.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"dry_run":{"type":"boolean","description":"True when nothing was created: the answer to `dry_run: true`."},"max_cost":{"type":"number","description":"The most the task can cost, in US dollars."},"task":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Task ID, such as `task_7p1q8w3e5r4k2m9x`."},"operation":{"type":"string","description":"The endpoint it runs, such as `enrich.email.verify`."},"status":{"type":"string","enum":["running","completed","failed","canceled"],"description":"`running`, then `completed`, `failed` (it stopped early, and `error` says why) or `canceled`."},"progress":{"type":"object","properties":{"done":{"type":"integer","description":"Parts answered, or for leads the leads found."},"total":{"type":"integer","description":"Parts of the batch, or the leads asked for."},"failed":{"type":"integer","description":"Parts answered with an error. They cost nothing."}},"required":["done","total","failed"],"additionalProperties":false,"description":"How far it got."},"cost":{"type":"number","description":"What it cost so far, in US dollars."},"max_cost":{"type":"number","description":"The most it can cost, in US dollars."},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}],"description":"Why it stopped early: the error of the call that stopped it, such as `insufficient_balance`. Null otherwise."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your own keys and values, as you gave them. Empty when none were."},"created_at":{"type":"string","description":"When it was created, ISO 8601."},"completed_at":{"description":"When it ended. Null while it runs.","type":["string","null"]},"results_expire_at":{"description":"When the results are deleted: 7 days after the end, 1 day when a source does not allow keeping them. Null while it runs.","type":["string","null"]}},"required":["id","operation","status","progress","cost","max_cost","error","metadata","created_at","completed_at","results_expire_at"],"additionalProperties":false},{"type":"null"}],"description":"The task. Null on a dry run."}},"required":["dry_run","max_cost","task"],"additionalProperties":false,"description":"The task, and the most it can cost."},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false}}}},"202":{"description":"Started. It goes on in the background: follow it at the URL in `Location` until its `status` is no longer `running`.","headers":{"Location":{"$ref":"#/components/headers/Location"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"dry_run":{"type":"boolean","description":"True when nothing was created: the answer to `dry_run: true`."},"max_cost":{"type":"number","description":"The most the task can cost, in US dollars."},"task":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Task ID, such as `task_7p1q8w3e5r4k2m9x`."},"operation":{"type":"string","description":"The endpoint it runs, such as `enrich.email.verify`."},"status":{"type":"string","enum":["running","completed","failed","canceled"],"description":"`running`, then `completed`, `failed` (it stopped early, and `error` says why) or `canceled`."},"progress":{"type":"object","properties":{"done":{"type":"integer","description":"Parts answered, or for leads the leads found."},"total":{"type":"integer","description":"Parts of the batch, or the leads asked for."},"failed":{"type":"integer","description":"Parts answered with an error. They cost nothing."}},"required":["done","total","failed"],"additionalProperties":false,"description":"How far it got."},"cost":{"type":"number","description":"What it cost so far, in US dollars."},"max_cost":{"type":"number","description":"The most it can cost, in US dollars."},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}],"description":"Why it stopped early: the error of the call that stopped it, such as `insufficient_balance`. Null otherwise."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your own keys and values, as you gave them. Empty when none were."},"created_at":{"type":"string","description":"When it was created, ISO 8601."},"completed_at":{"description":"When it ended. Null while it runs.","type":["string","null"]},"results_expire_at":{"description":"When the results are deleted: 7 days after the end, 1 day when a source does not allow keeping them. Null while it runs.","type":["string","null"]}},"required":["id","operation","status","progress","cost","max_cost","error","metadata","created_at","completed_at","results_expire_at"],"additionalProperties":false},{"type":"null"}],"description":"The task. Null on a dry run."}},"required":["dry_run","max_cost","task"],"additionalProperties":false,"description":"The task, and the most it can cost."},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"dry_run":false,"max_cost":0.06,"task":{"id":"task_7p1q8w3e5r4k2m9x","operation":"enrich.people.email.find","status":"running","progress":{"done":0,"total":2,"failed":0},"cost":0,"max_cost":0.06,"error":null,"metadata":{"customer_id":"c_812"},"created_at":"2026-11-20T13:40:00.000Z","completed_at":null,"results_expire_at":null}},"notice":null,"usage":{"cost":0,"balance":48.14,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"tasks_list","summary":"List tasks","description":"Your tasks, newest first, with their status, progress and cost. Their results come with `GET /tasks/{id}`. Free.","tags":["tasks"],"externalDocs":{"url":"https://won.dev/docs/tasks#list"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"example":1},{"name":"cursor","in":"query","required":false,"description":"To get the next page, pass `next_cursor` of the previous response back unchanged, with the same parameters.","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Task ID, such as `task_7p1q8w3e5r4k2m9x`."},"operation":{"type":"string","description":"The endpoint it runs, such as `enrich.email.verify`."},"status":{"type":"string","enum":["running","completed","failed","canceled"],"description":"`running`, then `completed`, `failed` (it stopped early, and `error` says why) or `canceled`."},"progress":{"type":"object","properties":{"done":{"type":"integer","description":"Parts answered, or for leads the leads found."},"total":{"type":"integer","description":"Parts of the batch, or the leads asked for."},"failed":{"type":"integer","description":"Parts answered with an error. They cost nothing."}},"required":["done","total","failed"],"additionalProperties":false,"description":"How far it got."},"cost":{"type":"number","description":"What it cost so far, in US dollars."},"max_cost":{"type":"number","description":"The most it can cost, in US dollars."},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}],"description":"Why it stopped early: the error of the call that stopped it, such as `insufficient_balance`. Null otherwise."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your own keys and values, as you gave them. Empty when none were."},"created_at":{"type":"string","description":"When it was created, ISO 8601."},"completed_at":{"description":"When it ended. Null while it runs.","type":["string","null"]},"results_expire_at":{"description":"When the results are deleted: 7 days after the end, 1 day when a source does not allow keeping them. Null while it runs.","type":["string","null"]}},"required":["id","operation","status","progress","cost","max_cost","error","metadata","created_at","completed_at","results_expire_at"],"additionalProperties":false},"description":"The tasks, newest first."},"has_more":{"type":"boolean","description":"Whether more follow this page."},"next_cursor":{"description":"Pass it as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","has_more","next_cursor","notice","usage"],"additionalProperties":false},"example":{"data":[{"id":"task_7p1q8w3e5r4k2m9x","operation":"enrich.people.email.find","status":"completed","progress":{"done":100,"total":100,"failed":2},"cost":1.86,"max_cost":3,"error":null,"metadata":{"customer_id":"c_812"},"created_at":"2026-11-20T13:40:00.000Z","completed_at":"2026-11-20T13:46:12.000Z","results_expire_at":"2026-11-27T13:46:12.000Z"}],"has_more":false,"next_cursor":null,"notice":null,"usage":{"cost":0,"balance":48.14,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tasks/{id}":{"get":{"operationId":"tasks_get","summary":"Get a task","description":"A task, how far it got and what it cost, with its results in order: each one the answer a call of the endpoint gives, with its HTTP status. Page through the results with `cursor`. While `status` is `running`, ask again in a minute, or wait for the `task.completed` event. Results are deleted 7 days after the end (`results_expire_at`). Free.","tags":["tasks"],"externalDocs":{"url":"https://won.dev/docs/tasks#get"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"id","in":"path","required":true,"description":"Task ID, such as `task_7p1q8w3e5r4k2m9x`.","schema":{"type":"string","maxLength":40},"example":"task_7p1q8w3e5r4k2m9x"},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":20,"type":"integer","minimum":1,"maximum":100},"example":1},{"name":"cursor","in":"query","required":false,"description":"To get the next page, pass `next_cursor` of the previous response back unchanged, with the same parameters.","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"task":{"type":"object","properties":{"id":{"type":"string","description":"Task ID, such as `task_7p1q8w3e5r4k2m9x`."},"operation":{"type":"string","description":"The endpoint it runs, such as `enrich.email.verify`."},"status":{"type":"string","enum":["running","completed","failed","canceled"],"description":"`running`, then `completed`, `failed` (it stopped early, and `error` says why) or `canceled`."},"progress":{"type":"object","properties":{"done":{"type":"integer","description":"Parts answered, or for leads the leads found."},"total":{"type":"integer","description":"Parts of the batch, or the leads asked for."},"failed":{"type":"integer","description":"Parts answered with an error. They cost nothing."}},"required":["done","total","failed"],"additionalProperties":false,"description":"How far it got."},"cost":{"type":"number","description":"What it cost so far, in US dollars."},"max_cost":{"type":"number","description":"The most it can cost, in US dollars."},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}],"description":"Why it stopped early: the error of the call that stopped it, such as `insufficient_balance`. Null otherwise."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your own keys and values, as you gave them. Empty when none were."},"created_at":{"type":"string","description":"When it was created, ISO 8601."},"completed_at":{"description":"When it ended. Null while it runs.","type":["string","null"]},"results_expire_at":{"description":"When the results are deleted: 7 days after the end, 1 day when a source does not allow keeping them. Null while it runs.","type":["string","null"]}},"required":["id","operation","status","progress","cost","max_cost","error","metadata","created_at","completed_at","results_expire_at"],"additionalProperties":false},"results":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","description":"The part of `inputs` it answers, or the page of leads, from 0."},"status":{"type":"integer","description":"The HTTP status of the call: 200, or the status of its error."},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The answer, exactly as a call of the endpoint returns it: its body or its error."}},"required":["index","status","body"],"additionalProperties":false},"description":"The results of this page, in order."}},"required":["task","results"],"additionalProperties":false,"description":"The task, and a page of its results."},"has_more":{"type":"boolean","description":"Whether more results follow this page."},"next_cursor":{"description":"Pass it as `cursor` to get the next page of results. Null on the last page.","type":["string","null"]},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","has_more","next_cursor","notice","usage"],"additionalProperties":false},"example":{"data":{"task":{"id":"task_7p1q8w3e5r4k2m9x","operation":"enrich.people.email.find","status":"completed","progress":{"done":100,"total":100,"failed":2},"cost":1.86,"max_cost":3,"error":null,"metadata":{"customer_id":"c_812"},"created_at":"2026-11-20T13:40:00.000Z","completed_at":"2026-11-20T13:46:12.000Z","results_expire_at":"2026-11-27T13:46:12.000Z"},"results":[{"index":0,"status":200,"body":{"data":{"email":{"address":"dana.reyes@harbor-chairs.com","status":"verified"},"person":null},"query":{"first_name":"Dana","last_name":"Reyes","domain":"harbor-chairs.com"},"notice":null,"usage":{"unit":"person_email","records":1,"already_paid":0,"cost":0.03,"balance":49.97,"replayed":false}}}]},"has_more":true,"next_cursor":"cur_Zx81kQp4b2JtMW0uMXJ6ZzQ","notice":null,"usage":{"cost":0,"balance":48.14,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tasks/{id}/cancel":{"post":{"operationId":"tasks_cancel","summary":"Cancel a task","description":"Stops a running task: no further part starts. Parts that were already running finish and are charged as usual, and everything it did is kept. Sends `task.completed` with `status: canceled`. Free.","tags":["tasks"],"externalDocs":{"url":"https://won.dev/docs/tasks#cancel"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"id","in":"path","required":true,"description":"Task ID, such as `task_7p1q8w3e5r4k2m9x`.","schema":{"type":"string","maxLength":40},"example":"task_7p1q8w3e5r4k2m9x"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. A retry with the same key and the same body returns the first response and is not charged again.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Task ID, such as `task_7p1q8w3e5r4k2m9x`."},"operation":{"type":"string","description":"The endpoint it runs, such as `enrich.email.verify`."},"status":{"type":"string","enum":["running","completed","failed","canceled"],"description":"`running`, then `completed`, `failed` (it stopped early, and `error` says why) or `canceled`."},"progress":{"type":"object","properties":{"done":{"type":"integer","description":"Parts answered, or for leads the leads found."},"total":{"type":"integer","description":"Parts of the batch, or the leads asked for."},"failed":{"type":"integer","description":"Parts answered with an error. They cost nothing."}},"required":["done","total","failed"],"additionalProperties":false,"description":"How far it got."},"cost":{"type":"number","description":"What it cost so far, in US dollars."},"max_cost":{"type":"number","description":"The most it can cost, in US dollars."},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}],"description":"Why it stopped early: the error of the call that stopped it, such as `insufficient_balance`. Null otherwise."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your own keys and values, as you gave them. Empty when none were."},"created_at":{"type":"string","description":"When it was created, ISO 8601."},"completed_at":{"description":"When it ended. Null while it runs.","type":["string","null"]},"results_expire_at":{"description":"When the results are deleted: 7 days after the end, 1 day when a source does not allow keeping them. Null while it runs.","type":["string","null"]}},"required":["id","operation","status","progress","cost","max_cost","error","metadata","created_at","completed_at","results_expire_at"],"additionalProperties":false,"description":"The task, canceled."},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","notice","usage"],"additionalProperties":false},"example":{"data":{"id":"task_7p1q8w3e5r4k2m9x","operation":"enrich.people.email.find","status":"canceled","progress":{"done":35,"total":100,"failed":0},"cost":0.84,"max_cost":3,"error":null,"metadata":{"customer_id":"c_812"},"created_at":"2026-11-20T13:40:00.000Z","completed_at":"2026-11-20T13:46:12.000Z","results_expire_at":"2026-11-27T13:46:12.000Z"},"notice":null,"usage":{"cost":0,"balance":48.14,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/account":{"get":{"operationId":"account_get","summary":"Check balance and usage","description":"What the account can still spend and what it spent: the balance, this key's budget and what is left of it, the charges of the last `days` days by operation, the latest charges, and the price of each kind of result. What a sender can still send today is in `GET /email/domains`, and how far it is from its circuit breakers in `GET /email/senders/{id}`. Use it before a large job to check the budget, or afterwards to report what a task cost. Not needed after every call: each paid response already ends with `usage`, the cost of that call and the balance left. Every charge is listed with `GET /account/charges`. Free.","tags":["account"],"externalDocs":{"url":"https://won.dev/docs/account#get"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"days","in":"query","required":false,"description":"How many days back to add up, 1 to 90.","schema":{"default":30,"type":"integer","minimum":1,"maximum":90},"example":30}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"balance":{"type":"number","description":"What the account can spend right now. A call can spend this much, or `key.remaining` when that is less, in US dollars."},"key":{"type":"object","properties":{"test":{"type":"boolean","description":"True for a test key: it returns sample data and is never charged."},"budget":{"description":"The most this key may spend in total, in US dollars. Null when it has no limit of its own.","type":["number","null"]},"spent":{"type":"number","description":"What this key has spent so far, in US dollars."},"remaining":{"description":"What is left of the key's budget, in US dollars. Null when it has no limit.","type":["number","null"]},"daily_limit":{"description":"The most this key may spend from midnight to midnight UTC, in US dollars. Null when it has no daily limit.","type":["number","null"]},"spent_today":{"type":"number","description":"What this key has spent since midnight UTC, in US dollars."},"products":{"anyOf":[{"type":"array","items":{"type":"string","enum":["trade","enrich","signals","email"]}},{"type":"null"}],"description":"The products this key may use. Null when it may use all of them. The account can always be read."},"read_only":{"type":"boolean","description":"True when the key may only read: nothing that sends, buys, changes or deletes."}},"required":["test","budget","spent","remaining","daily_limit","spent_today","products","read_only"],"additionalProperties":false,"description":"The key this call uses, and what it may do."},"period":{"type":"object","properties":{"since":{"type":"string","description":"First day, `YYYY-MM-DD`."},"until":{"type":"string","description":"Last day, `YYYY-MM-DD`."}},"required":["since","until"],"additionalProperties":false,"description":"The days that `spent`, `by_operation` and `recent` cover."},"spent":{"type":"number","description":"What the account was charged in the period, with all of its keys, in US dollars."},"by_operation":{"type":"array","items":{"type":"object","properties":{"operation":{"type":"string","description":"The operation that was charged, such as `trade.companies.search`."},"calls":{"type":"integer","description":"How many calls were charged."},"cost":{"type":"number","description":"What they cost, in US dollars."}},"required":["operation","calls","cost"],"additionalProperties":false},"description":"The charges of the period by operation, the largest first."},"recent":{"type":"array","items":{"type":"object","properties":{"request_id":{"type":"string","description":"The request ID, to quote to support."},"operation":{"type":"string","description":"The operation that was charged, such as `trade.companies.search`."},"cost":{"type":"number","description":"What the call cost, in US dollars."},"at":{"type":"string","description":"When, as an ISO 8601 timestamp in UTC."}},"required":["request_id","operation","cost","at"],"additionalProperties":false},"description":"The 10 latest charges of the period, newest first."},"prices":{"type":"object","propertyNames":{"type":"string","enum":["trade_record","trade_company","trade_company_profile","trade_lookup","person_email","company_channels","trade_stats","trade_official_stats","market_search","market_listings","market_estimates","email_domain_day","person_record","person_profile","person_phone","email_verification","company_record","company_listing","company_technologies","company_funding","company_news","company_lookalikes","job_posting","signal_hiring","signal_funding","signal_import_surge"]},"additionalProperties":{"type":"number"},"required":["trade_record","trade_company","trade_company_profile","trade_lookup","person_email","company_channels","trade_stats","trade_official_stats","market_search","market_listings","market_estimates","email_domain_day","person_record","person_profile","person_phone","email_verification","company_record","company_listing","company_technologies","company_funding","company_news","company_lookalikes","job_posting","signal_hiring","signal_funding","signal_import_surge"],"description":"What one result of each kind costs, in US dollars."}},"required":["balance","key","period","spent","by_operation","recent","prices"],"additionalProperties":false,"description":"The balance, the key's budget and what was charged."},"query":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The request as it was understood, with `days` filled in."},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","query","notice","usage"],"additionalProperties":false},"example":{"data":{"balance":48.08,"key":{"test":false,"budget":100,"spent":33.52,"remaining":66.48,"daily_limit":10,"spent_today":0.6,"products":null,"read_only":false},"period":{"since":"2026-10-23","until":"2026-11-22"},"spent":33.52,"by_operation":[{"operation":"email.domains.create","calls":1,"cost":28.8},{"operation":"trade.companies.search","calls":23,"cost":4.6},{"operation":"enrich.people.email.find","calls":3,"cost":0.12}],"recent":[{"request_id":"req_7f3k2m9x4p1q8w3e","operation":"trade.companies.search","cost":0.2,"at":"2026-11-22T09:14:03.000Z"}],"prices":{"trade_record":0.005,"trade_company":0.01,"trade_company_profile":0.04,"trade_lookup":0.02,"person_email":0.03,"company_channels":0.02,"trade_stats":0.1,"trade_official_stats":0.02,"market_search":0.15,"market_listings":0.03,"market_estimates":0.05,"email_domain_day":0.9,"person_record":0.005,"person_profile":0.02,"person_phone":0.1,"email_verification":0.003,"company_record":0.01,"company_listing":0.002,"company_technologies":0.02,"company_funding":0.03,"company_news":0.03,"company_lookalikes":0.03,"job_posting":0.003,"signal_hiring":0.03,"signal_funding":0.2,"signal_import_surge":0.05}},"query":{"days":30},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/account/charges":{"get":{"operationId":"account_charges","summary":"List charges","description":"Every charge of the account, newest first: each paid call with what it returned and cost, and each renewal of a sending domain. Calls that cost nothing are left out, and so are calls with a test key. Use it to reconcile what the account spent, for example per customer when each customer has a key of their own. Free.","tags":["account"],"externalDocs":{"url":"https://won.dev/docs/account#charges"},"x-mode":"proxy","x-billing":"free","parameters":[{"name":"since","in":"query","required":false,"description":"Only charges from this ISO 8601 time on, such as `2026-11-01T00:00:00Z`.","schema":{"type":"string","maxLength":40}},{"name":"operation","in":"query","required":false,"description":"Only charges of this operation, such as `email.domains.create` (or its `operationId`, `email_domains_create`), or `email.domains.renew` for the renewals of sending domains.","schema":{"type":"string","maxLength":80}},{"name":"this_key","in":"query","required":false,"description":"Only the charges of the key this call uses.","schema":{"default":false,"type":"boolean"}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"example":2},{"name":"cursor","in":"query","required":false,"description":"To get the next page, pass `next_cursor` of the previous response back unchanged, with the same parameters.","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"The result.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The request ID, such as `req_7f3k2m9x4p1q8w3e`. A sending domain's renewal has an ID of its own."},"operation":{"type":"string","description":"The operation that was charged, such as `trade.companies.search`."},"domain_id":{"description":"For the renewal of a sending domain: which domain. Null for a call.","type":["string","null"]},"by_this_key":{"type":"boolean","description":"Whether the key of this call made it."},"cost":{"type":"number","description":"What it cost, in US dollars."},"results":{"type":"array","items":{"type":"object","properties":{"unit":{"type":"string","description":"What was charged for, such as `email_domain_day`."},"records":{"type":"integer"}},"required":["unit","records"],"additionalProperties":false},"description":"What was charged for, by unit."},"at":{"type":"string","description":"When, as an ISO 8601 timestamp in UTC."}},"required":["id","operation","domain_id","by_this_key","cost","results","at"],"additionalProperties":false},"description":"The charges of this page."},"has_more":{"type":"boolean","description":"Whether more follow this page."},"next_cursor":{"description":"Pass it as `cursor` to get the next page. Null on the last page.","type":["string","null"]},"notice":{"description":"A plain sentence when there is something to know about this answer. Null otherwise.","type":["string","null"]},"usage":{"type":"object","properties":{"cost":{"type":"number","description":"What this call cost, in US dollars."},"balance":{"type":"number","description":"The balance left after this call, in US dollars."},"replayed":{"type":"boolean","description":"True when this is a repeat of a request from the last 24 hours. Repeats are free."}},"required":["cost","balance","replayed"],"additionalProperties":false,"description":"Nothing is charged here. The balance, for reference."}},"required":["data","has_more","next_cursor","notice","usage"],"additionalProperties":false},"example":{"data":[{"id":"req_7f3k2m9x4p1q8w3e","operation":"trade.companies.search","domain_id":null,"by_this_key":true,"cost":0.2,"results":[{"unit":"company_record","records":1}],"at":"2026-11-22T09:14:03.000Z"},{"id":"ren_dom_5r4k2m9x7p1q8w3e_2026-11-28","operation":"email.domains.renew","domain_id":"dom_5r4k2m9x7p1q8w3e","by_this_key":true,"cost":27,"results":[{"unit":"email_domain_day","records":30}],"at":"2026-11-25T00:10:00.000Z"}],"has_more":true,"next_cursor":"cur_Qm9vVGhpc0lzQVNhbXBsZQ","notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"`Authorization: Bearer won_live_...`, a key from the console."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","hint","docs_url","retry_after","request_id"],"properties":{"code":{"type":"string","enum":["invalid_input","unauthorized","insufficient_balance","budget_exceeded","forbidden","sending_suspended","not_found","idempotency_conflict","request_in_progress","invalid_state","no_domains","sender_not_ready","content_rejected","daily_limit_reached","rate_limited","internal_error","out_of_stock","upstream_unavailable"]},"message":{"type":"string"},"hint":{"type":"string","description":"What to do next."},"issues":{"type":"array","description":"On `invalid_input`: every parameter that needs fixing.","items":{"type":"object","required":["param","message"],"properties":{"param":{"type":"string"},"message":{"type":"string"}}}},"docs_url":{"type":"string"},"retry_after":{"type":["integer","null"],"description":"Seconds to wait before retrying."},"request_id":{"type":"string"}}}}},"DryRun":{"type":"object","properties":{"data":{"type":"object","properties":{"dry_run":{"type":"boolean","const":true},"max_cost":{"type":"number","description":"The most this call can cost, in US dollars."},"breakdown":{"type":"array","items":{"type":"object","properties":{"unit":{"type":"string","enum":["trade_record","trade_company","trade_company_profile","trade_lookup","person_email","company_channels","trade_stats","trade_official_stats","market_search","market_listings","market_estimates","email_domain_day","person_record","person_profile","person_phone","email_verification","company_record","company_listing","company_technologies","company_funding","company_news","company_lookalikes","job_posting","signal_hiring","signal_funding","signal_import_surge"]},"max_records":{"type":"integer"},"unit_price":{"type":"number"},"max_cost":{"type":"number"}},"required":["unit","max_records","unit_price","max_cost"],"additionalProperties":false},"description":"The most it can cost by billing unit."}},"required":["dry_run","max_cost","breakdown"],"additionalProperties":false,"description":"What the call would cost. Nothing ran."},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"How many results match, when already known. Null when it is not."},"query":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The request as it was understood."},"notice":{"type":"null"},"usage":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Nothing is charged. The balance, for reference."}},"required":["data","total","query","notice","usage"],"additionalProperties":false}},"headers":{"RateLimit-Limit":{"description":"Requests the key can send back to back. Only to a request with a valid key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"How many more it can send before it has to pause. Only to a request with a valid key.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds of quiet after which the count starts over. Only to a request with a valid key.","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"The limit every key has, `20;w=1`: 20 requests back to back, then a 1-second pause. On every response, also without a key.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before sending the request again, when waiting helps.","schema":{"type":"integer"}},"Location":{"description":"Where to follow the work that was started, such as `GET /tasks/{id}`.","schema":{"type":"string","format":"uri"}},"Deprecation":{"description":"Since when the operation is deprecated, as a Unix time such as `@1798761600` (RFC 9745). Sent only by a deprecated operation, at least 6 months before its `Sunset`.","schema":{"type":"string"}},"Sunset":{"description":"When the operation stops working, as an HTTP date (RFC 8594). Sent only by a deprecated operation, with `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"The docs page of a deprecated operation, with `rel=\"deprecation\"`. Sent only with `Deprecation`.","schema":{"type":"string"}}}},"x-prices":{"trade_record":0.005,"trade_company":0.01,"trade_company_profile":0.04,"trade_lookup":0.02,"person_email":0.03,"company_channels":0.02,"trade_stats":0.1,"trade_official_stats":0.02,"market_search":0.15,"market_listings":0.03,"market_estimates":0.05,"email_domain_day":0.9,"person_record":0.005,"person_profile":0.02,"person_phone":0.1,"email_verification":0.003,"company_record":0.01,"company_listing":0.002,"company_technologies":0.02,"company_funding":0.03,"company_news":0.03,"company_lookalikes":0.03,"job_posting":0.003,"signal_hiring":0.03,"signal_funding":0.2,"signal_import_surge":0.05}}