{"openapi":"3.1.0","info":{"title":"Won.dev API","version":"1","description":"Trade data 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."},"servers":[{"url":"https://api.won.dev/v1"}],"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"],"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}},{"name":"limit","in":"query","required":false,"description":"How many codes to return, 1 to 50.","schema":{"default":10,"type":"integer","minimum":1,"maximum":50}},{"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.","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`.","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"],"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}}],"responses":{"200":{"description":"The result.","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`.","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`.","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"],"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.","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","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"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"],"description":"What is counted."},"records":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many were returned and charged."},"already_paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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`.","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"],"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.","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","minimum":-9007199254740991,"maximum":9007199254740991,"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"],"description":"What is counted."},"records":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many were returned and charged."},"already_paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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`.","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"],"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}},{"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}},{"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.","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"}]},"website":{"description":"Bare domain, such as `example.com`. Often null.","type":["string","null"]},"shipments":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"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"],"description":"What is counted."},"records":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many were returned and charged."},"already_paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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`.","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; $0.02 when the website has any). A part that cannot be loaded is null and is not charged. For other filters or more rows, call the partners, shipments and contacts endpoints of the company.","tags":["trade"],"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}},{"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"]}},"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.","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"}]},"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","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"All shipment records of the company."},"suppliers":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Number of distinct suppliers."},"buyers":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"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","minimum":-9007199254740991,"maximum":9007199254740991,"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`. 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"],"description":"What is counted."},"records":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many were returned and charged."},"already_paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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`.","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"],"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}},{"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}},{"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.","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","minimum":-9007199254740991,"maximum":9007199254740991,"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"],"description":"What is counted."},"records":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many were returned and charged."},"already_paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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`.","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"],"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}},{"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"]}},{"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}},{"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.","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","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"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"],"description":"What is counted."},"records":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many were returned and charged."},"already_paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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`.","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"],"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}},{"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"]}},"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}},{"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.","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`. 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","minimum":-9007199254740991,"maximum":9007199254740991,"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"],"description":"What is counted."},"records":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many were returned and charged."},"already_paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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`.","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. 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, 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"],"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.","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","minimum":-9007199254740991,"maximum":9007199254740991,"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`. 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, 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","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many companies of the ranked list were looked at for this page."}},"required":["data_through","scanned"],"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, `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"],"description":"What is counted."},"records":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many were returned and charged."},"already_paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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,"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`.","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"],"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.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"type":"object","properties":{"records":{"anyOf":[{"type":"object","properties":{"shipments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"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."},"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"],"description":"What is counted."},"records":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many were returned and charged."},"already_paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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`.","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"],"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.","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","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many were returned and charged."},"already_paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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`.","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"],"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.","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, such as `Furniture`.","type":["string","null"]},"employees":{"description":"Headcount or a range, such as `51-200`, as the source states it.","type":["string","null"]},"founded":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"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","minimum":-9007199254740991,"maximum":9007199254740991},{"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":{"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many were returned and charged."},"already_paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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`.","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`.","tags":["enrich"],"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},"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.","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","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How many postings match in all, beyond this answer. Null when not known."},"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many were returned and charged."},"already_paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","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,"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`.","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"],"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.","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","minimum":-9007199254740991,"maximum":9007199254740991},{"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`. 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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many were returned and charged."},"already_paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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_car9xn4yt1xg","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_gzbfmsxvm0n4","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`.","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"],"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.","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`. 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. The same person can come back under another ID from another endpoint; each one works. To match people across calls, compare `linkedin_url`."},"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","minimum":-9007199254740991,"maximum":9007199254740991},{"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"]},"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many were returned and charged."},"already_paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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":"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","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`.","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"],"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.","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`. 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. The same person can come back under another ID from another endpoint; each one works. To match people across calls, compare `linkedin_url`."},"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`."},"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many were returned and charged."},"already_paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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":{"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"}},"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`.","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"],"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.","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`. 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. The same person can come back under another ID from another endpoint; each one works. To match people across calls, compare `linkedin_url`."},"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."},"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many were returned and charged."},"already_paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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":{"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"}},"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`.","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"],"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.","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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many were returned and charged."},"already_paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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`.","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"],"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.","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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many were returned and charged."},"already_paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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`.","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"],"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.","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 or a range, such as `51-200`, when known.","type":["string","null"]},"industry":{"description":"Its industry, when 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","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991}},"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","minimum":-9007199254740991,"maximum":9007199254740991},{"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many were returned and charged."},"already_paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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`.","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"],"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.","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 or a range, such as `51-200`, when known.","type":["string","null"]},"industry":{"description":"Its industry, when 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","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991}},"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","minimum":-9007199254740991,"maximum":9007199254740991},{"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many were returned and charged."},"already_paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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-100","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`.","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"],"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.","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 or a range, such as `51-200`, when known.","type":["string","null"]},"industry":{"description":"Its industry, when 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","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991}},"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","minimum":-9007199254740991,"maximum":9007199254740991},{"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many were returned and charged."},"already_paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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`.","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"],"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.","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 or a range, such as `51-200`, when known.","type":["string","null"]},"industry":{"description":"Its industry, when 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","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991}},"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many were returned and charged."},"already_paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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`.","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. You do not bring a mailbox or a domain: we send from mailboxes of our own that are already warmed up, each writing under its own name, and 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, or an agent working for several companies, registers each client as a sender of its own. A platform that sends for its own customers also sets `tenant_id` to the customer's ID: each tenant's recipients, unsubscribes, daily limit and standing are kept apart from the others', so one customer's mail cannot cost another's. The mailboxes are shared, but a mailbox writes to a company for one sender at a time, and replies go only to the sender whose emails they answer. A new sender can send at once. 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"],"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}},"tenant_id":{"description":"Your own customer this sender writes for, when you send for customers of yours, such as `cus_4821`. Their campaigns are kept apart from your other tenants' and from your own. It cannot be changed later. Without it, the sender is your own.","type":"string","pattern":"^[A-Za-z0-9_.:-]{1,64}$"}},"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.","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."},"tenant_id":{"description":"The customer of yours the sender writes for, as you named it when you registered the sender. Null: the account itself.","type":["string","null"]},"status":{"type":"string","enum":["active","rejected","suspended"],"description":"`active`: it can send, from the moment it is registered. `rejected` or `suspended` when we stopped it, with the reason in `review_note`."},"review_note":{"description":"Why we stopped the sender, when we did.","type":["string","null"]},"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`."},"test":{"type":"boolean","description":"Made with a test key: approved at once, never sends."},"created_at":{"type":"string","description":"When it was created, as an ISO 8601 time in UTC."}},"required":["id","company_name","address","website","purpose","tenant_id","status","review_note","regions","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","tenant_id":null,"review_note":null,"regions":[],"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`.","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"],"x-mode":"proxy","x-billing":"free","parameters":[{"name":"tenant_id","in":"query","required":false,"description":"Only the senders of this tenant.","schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,64}$"}},{"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.","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."},"tenant_id":{"description":"The customer of yours the sender writes for, as you named it when you registered the sender. Null: the account itself.","type":["string","null"]},"status":{"type":"string","enum":["active","rejected","suspended"],"description":"`active`: it can send, from the moment it is registered. `rejected` or `suspended` when we stopped it, with the reason in `review_note`."},"review_note":{"description":"Why we stopped the sender, when we did.","type":["string","null"]},"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`."},"test":{"type":"boolean","description":"Made with a test key: approved at once, never sends."},"created_at":{"type":"string","description":"When it was created, as an ISO 8601 time in UTC."}},"required":["id","company_name","address","website","purpose","tenant_id","status","review_note","regions","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","tenant_id":null,"review_note":null,"regions":[],"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`.","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. Free.","tags":["email"],"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}}],"responses":{"200":{"description":"The result.","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."},"tenant_id":{"description":"The customer of yours the sender writes for, as you named it when you registered the sender. Null: the account itself.","type":["string","null"]},"status":{"type":"string","enum":["active","rejected","suspended"],"description":"`active`: it can send, from the moment it is registered. `rejected` or `suspended` when we stopped it, with the reason in `review_note`."},"review_note":{"description":"Why we stopped the sender, when we did.","type":["string","null"]},"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`."},"test":{"type":"boolean","description":"Made with a test key: approved at once, never sends."},"created_at":{"type":"string","description":"When it was created, as an ISO 8601 time in UTC."}},"required":["id","company_name","address","website","purpose","tenant_id","status","review_note","regions","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","tenant_id":null,"review_note":null,"regions":[],"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`.","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. We send from warmed-up mailboxes of our own, 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. Creating is free. Sending costs $0.03 for each email handed over; an email that hard-bounces is refunded. A running campaign sets aside the cost of about a week of sending from your balance and pauses, without sending on credit, when the balance runs out. Set `dry_run: true` first: it checks the texts and the list, shows the first email as the first recipients would get it and what the campaign costs at most, and creates nothing. 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"],"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. A new account also has a daily limit across its campaigns, which rises as it sends without bounces and complaints.","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"},"max_cost":{"description":"The most the campaign may spend in its whole life, in US dollars. It pauses when the next email would go over.","type":"number","exclusiveMinimum":0},"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,"max_cost":25,"start":false}}}},"responses":{"200":{"description":"The result.","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"},"tenant_id":{"description":"Its sender's `tenant_id`. Null: the account itself.","type":["string","null"]},"status":{"type":"string","enum":["draft","in_review","active","paused","completed","canceled","suspended"],"description":"`draft` until started. `active` sends. `paused` waits for `resume`. `completed`, `canceled` and `suspended` are final. `in_review` is no longer given: a campaign left waiting for a review from before starts by itself within minutes."},"pause_reason":{"anyOf":[{"type":"string","enum":["manual","insufficient_balance","max_cost","list_quality","sending_suspended"]},{"type":"null"}],"description":"Why it is paused: `manual`, `insufficient_balance` (top up, then resume), `max_cost` (the campaign's own cap is reached), `list_quality` (too many invalid addresses; resuming accepts the list as it is), `sending_suspended`."},"steps":{"type":"array","items":{"type":"object","properties":{"delay_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its share of the recipients, relative to the other versions."},"stats":{"type":"object","properties":{"sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"opened":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Emails opened at least once. Counted only when `track_opens` is on."},"clicked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"replied":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991},"end_hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The most emails the campaign sends on one day."},"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"},"max_cost":{"description":"The most the campaign may spend in its life, in US dollars. Null when not set.","type":["number","null"]},"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"People in the campaign."},"waiting":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Still being checked, or waiting for their first email."},"in_sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Got at least one email and have more to come."},"finished":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Got every email and did not answer."},"replied":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bounced":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unsubscribed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"excluded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Left out or stopped: invalid address, suppressed, or stopped by you."},"emails_sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"emails_opened":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"emails_clicked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"spent":{"type":"number","description":"What the campaign has cost so far, in US dollars."},"reserved":{"type":"number","description":"Set aside from the balance for the emails of the next days, in US dollars."}},"required":["recipients","waiting","in_sequence","finished","replied","bounced","unsubscribed","excluded","emails_sent","emails_opened","emails_clicked","spent","reserved"],"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","tenant_id","status","pause_reason","steps","schedule","daily_limit","stop_on_company_reply","track_opens","track_clicks","max_cost","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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Addresses taken into the campaign."},"duplicates":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Addresses that were in the campaign already. Nothing changed for them."},"rejected":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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":{"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."}},"required":["accepted","duplicates","rejected","results"],"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The step, counted from 1."},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The step, counted from 1."},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Emails if nobody answers: recipients times steps."},"max_cost":{"type":"number","description":"What that would cost, in US dollars. Replies, bounces and unsubscribes make it less."},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"About how many days until the last email, at the daily limit."}},"required":["emails","max_cost","days"],"additionalProperties":false,"description":"What the campaign comes to at most."}},"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","tenant_id":null,"status":"draft","pause_reason":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,"max_cost":25,"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,"spent":0,"reserved":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"]}]},"content":{"problems":[],"advice":[],"variables":[{"name":"company","required":true},{"name":"first_name","required":false}]},"preview":[],"estimate":{"emails":4,"max_cost":0.12,"days":4}},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","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 what it has cost. Free.","tags":["email"],"x-mode":"proxy","x-billing":"free","parameters":[{"name":"status","in":"query","required":false,"description":"Only campaigns in this status.","schema":{"type":"string","enum":["draft","in_review","active","paused","completed","canceled","suspended"]}},{"name":"tenant_id","in":"query","required":false,"description":"Only the campaigns of this tenant's senders.","schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,64}$"}},{"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.","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"},"tenant_id":{"description":"Its sender's `tenant_id`. Null: the account itself.","type":["string","null"]},"status":{"type":"string","enum":["draft","in_review","active","paused","completed","canceled","suspended"],"description":"`draft` until started. `active` sends. `paused` waits for `resume`. `completed`, `canceled` and `suspended` are final. `in_review` is no longer given: a campaign left waiting for a review from before starts by itself within minutes."},"pause_reason":{"anyOf":[{"type":"string","enum":["manual","insufficient_balance","max_cost","list_quality","sending_suspended"]},{"type":"null"}],"description":"Why it is paused: `manual`, `insufficient_balance` (top up, then resume), `max_cost` (the campaign's own cap is reached), `list_quality` (too many invalid addresses; resuming accepts the list as it is), `sending_suspended`."},"steps":{"type":"array","items":{"type":"object","properties":{"delay_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its share of the recipients, relative to the other versions."},"stats":{"type":"object","properties":{"sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"opened":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Emails opened at least once. Counted only when `track_opens` is on."},"clicked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"replied":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991},"end_hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The most emails the campaign sends on one day."},"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"},"max_cost":{"description":"The most the campaign may spend in its life, in US dollars. Null when not set.","type":["number","null"]},"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"People in the campaign."},"waiting":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Still being checked, or waiting for their first email."},"in_sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Got at least one email and have more to come."},"finished":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Got every email and did not answer."},"replied":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bounced":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unsubscribed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"excluded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Left out or stopped: invalid address, suppressed, or stopped by you."},"emails_sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"emails_opened":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"emails_clicked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"spent":{"type":"number","description":"What the campaign has cost so far, in US dollars."},"reserved":{"type":"number","description":"Set aside from the balance for the emails of the next days, in US dollars."}},"required":["recipients","waiting","in_sequence","finished","replied","bounced","unsubscribed","excluded","emails_sent","emails_opened","emails_clicked","spent","reserved"],"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","tenant_id","status","pause_reason","steps","schedule","daily_limit","stop_on_company_reply","track_opens","track_clicks","max_cost","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","tenant_id":null,"status":"active","pause_reason":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,"max_cost":25,"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,"spent":1.74,"reserved":5.46},"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`.","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"],"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}}],"responses":{"200":{"description":"The result.","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"},"tenant_id":{"description":"Its sender's `tenant_id`. Null: the account itself.","type":["string","null"]},"status":{"type":"string","enum":["draft","in_review","active","paused","completed","canceled","suspended"],"description":"`draft` until started. `active` sends. `paused` waits for `resume`. `completed`, `canceled` and `suspended` are final. `in_review` is no longer given: a campaign left waiting for a review from before starts by itself within minutes."},"pause_reason":{"anyOf":[{"type":"string","enum":["manual","insufficient_balance","max_cost","list_quality","sending_suspended"]},{"type":"null"}],"description":"Why it is paused: `manual`, `insufficient_balance` (top up, then resume), `max_cost` (the campaign's own cap is reached), `list_quality` (too many invalid addresses; resuming accepts the list as it is), `sending_suspended`."},"steps":{"type":"array","items":{"type":"object","properties":{"delay_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its share of the recipients, relative to the other versions."},"stats":{"type":"object","properties":{"sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"opened":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Emails opened at least once. Counted only when `track_opens` is on."},"clicked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"replied":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991},"end_hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The most emails the campaign sends on one day."},"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"},"max_cost":{"description":"The most the campaign may spend in its life, in US dollars. Null when not set.","type":["number","null"]},"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"People in the campaign."},"waiting":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Still being checked, or waiting for their first email."},"in_sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Got at least one email and have more to come."},"finished":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Got every email and did not answer."},"replied":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bounced":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unsubscribed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"excluded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Left out or stopped: invalid address, suppressed, or stopped by you."},"emails_sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"emails_opened":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"emails_clicked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"spent":{"type":"number","description":"What the campaign has cost so far, in US dollars."},"reserved":{"type":"number","description":"Set aside from the balance for the emails of the next days, in US dollars."}},"required":["recipients","waiting","in_sequence","finished","replied","bounced","unsubscribed","excluded","emails_sent","emails_opened","emails_clicked","spent","reserved"],"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","minimum":-9007199254740991,"maximum":9007199254740991},{"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","tenant_id","status","pause_reason","steps","schedule","daily_limit","stop_on_company_reply","track_opens","track_clicks","max_cost","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","tenant_id":null,"status":"active","pause_reason":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,"max_cost":25,"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,"spent":1.74,"reserved":5.46},"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`.","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. A `max_cost` below what the campaign has spent pauses it before its next email; raising it does not resume a paused campaign, `POST /email/campaigns/{id}/resume` does. There is no dry run: a change that fails a check changes nothing. Free.","tags":["email"],"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}},{"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. A new account also has a daily limit across its campaigns, which rises as it sends without bounces and complaints.","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"},"max_cost":{"description":"The most the campaign may spend in its whole life, in US dollars. `null` takes the limit away.","anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]},"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.","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"},"tenant_id":{"description":"Its sender's `tenant_id`. Null: the account itself.","type":["string","null"]},"status":{"type":"string","enum":["draft","in_review","active","paused","completed","canceled","suspended"],"description":"`draft` until started. `active` sends. `paused` waits for `resume`. `completed`, `canceled` and `suspended` are final. `in_review` is no longer given: a campaign left waiting for a review from before starts by itself within minutes."},"pause_reason":{"anyOf":[{"type":"string","enum":["manual","insufficient_balance","max_cost","list_quality","sending_suspended"]},{"type":"null"}],"description":"Why it is paused: `manual`, `insufficient_balance` (top up, then resume), `max_cost` (the campaign's own cap is reached), `list_quality` (too many invalid addresses; resuming accepts the list as it is), `sending_suspended`."},"steps":{"type":"array","items":{"type":"object","properties":{"delay_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its share of the recipients, relative to the other versions."},"stats":{"type":"object","properties":{"sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"opened":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Emails opened at least once. Counted only when `track_opens` is on."},"clicked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"replied":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991},"end_hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The most emails the campaign sends on one day."},"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"},"max_cost":{"description":"The most the campaign may spend in its life, in US dollars. Null when not set.","type":["number","null"]},"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"People in the campaign."},"waiting":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Still being checked, or waiting for their first email."},"in_sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Got at least one email and have more to come."},"finished":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Got every email and did not answer."},"replied":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bounced":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unsubscribed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"excluded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Left out or stopped: invalid address, suppressed, or stopped by you."},"emails_sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"emails_opened":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"emails_clicked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"spent":{"type":"number","description":"What the campaign has cost so far, in US dollars."},"reserved":{"type":"number","description":"Set aside from the balance for the emails of the next days, in US dollars."}},"required":["recipients","waiting","in_sequence","finished","replied","bounced","unsubscribed","excluded","emails_sent","emails_opened","emails_clicked","spent","reserved"],"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","minimum":-9007199254740991,"maximum":9007199254740991},{"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","tenant_id","status","pause_reason","steps","schedule","daily_limit","stop_on_company_reply","track_opens","track_clicks","max_cost","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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The step, counted from 1."},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","tenant_id":null,"status":"active","pause_reason":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,"max_cost":25,"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,"spent":1.74,"reserved":5.46},"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`.","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. The campaign sets aside the cost of about a week of sending; when the balance cannot cover even the first email, the call fails with `insufficient_balance` and the campaign stays a draft. Calling it again on a campaign that already runs changes nothing. Free.","tags":["email"],"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}},{"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.","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"},"tenant_id":{"description":"Its sender's `tenant_id`. Null: the account itself.","type":["string","null"]},"status":{"type":"string","enum":["draft","in_review","active","paused","completed","canceled","suspended"],"description":"`draft` until started. `active` sends. `paused` waits for `resume`. `completed`, `canceled` and `suspended` are final. `in_review` is no longer given: a campaign left waiting for a review from before starts by itself within minutes."},"pause_reason":{"anyOf":[{"type":"string","enum":["manual","insufficient_balance","max_cost","list_quality","sending_suspended"]},{"type":"null"}],"description":"Why it is paused: `manual`, `insufficient_balance` (top up, then resume), `max_cost` (the campaign's own cap is reached), `list_quality` (too many invalid addresses; resuming accepts the list as it is), `sending_suspended`."},"steps":{"type":"array","items":{"type":"object","properties":{"delay_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its share of the recipients, relative to the other versions."},"stats":{"type":"object","properties":{"sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"opened":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Emails opened at least once. Counted only when `track_opens` is on."},"clicked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"replied":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991},"end_hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The most emails the campaign sends on one day."},"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"},"max_cost":{"description":"The most the campaign may spend in its life, in US dollars. Null when not set.","type":["number","null"]},"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"People in the campaign."},"waiting":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Still being checked, or waiting for their first email."},"in_sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Got at least one email and have more to come."},"finished":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Got every email and did not answer."},"replied":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bounced":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unsubscribed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"excluded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Left out or stopped: invalid address, suppressed, or stopped by you."},"emails_sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"emails_opened":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"emails_clicked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"spent":{"type":"number","description":"What the campaign has cost so far, in US dollars."},"reserved":{"type":"number","description":"Set aside from the balance for the emails of the next days, in US dollars."}},"required":["recipients","waiting","in_sequence","finished","replied","bounced","unsubscribed","excluded","emails_sent","emails_opened","emails_clicked","spent","reserved"],"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","minimum":-9007199254740991,"maximum":9007199254740991},{"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","tenant_id","status","pause_reason","steps","schedule","daily_limit","stop_on_company_reply","track_opens","track_clicks","max_cost","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","tenant_id":null,"status":"active","pause_reason":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,"max_cost":25,"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,"spent":1.74,"reserved":5.46},"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`.","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 the money the campaign had set aside is free to use again. Free.","tags":["email"],"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}},{"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.","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"},"tenant_id":{"description":"Its sender's `tenant_id`. Null: the account itself.","type":["string","null"]},"status":{"type":"string","enum":["draft","in_review","active","paused","completed","canceled","suspended"],"description":"`draft` until started. `active` sends. `paused` waits for `resume`. `completed`, `canceled` and `suspended` are final. `in_review` is no longer given: a campaign left waiting for a review from before starts by itself within minutes."},"pause_reason":{"anyOf":[{"type":"string","enum":["manual","insufficient_balance","max_cost","list_quality","sending_suspended"]},{"type":"null"}],"description":"Why it is paused: `manual`, `insufficient_balance` (top up, then resume), `max_cost` (the campaign's own cap is reached), `list_quality` (too many invalid addresses; resuming accepts the list as it is), `sending_suspended`."},"steps":{"type":"array","items":{"type":"object","properties":{"delay_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its share of the recipients, relative to the other versions."},"stats":{"type":"object","properties":{"sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"opened":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Emails opened at least once. Counted only when `track_opens` is on."},"clicked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"replied":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991},"end_hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The most emails the campaign sends on one day."},"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"},"max_cost":{"description":"The most the campaign may spend in its life, in US dollars. Null when not set.","type":["number","null"]},"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"People in the campaign."},"waiting":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Still being checked, or waiting for their first email."},"in_sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Got at least one email and have more to come."},"finished":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Got every email and did not answer."},"replied":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bounced":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unsubscribed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"excluded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Left out or stopped: invalid address, suppressed, or stopped by you."},"emails_sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"emails_opened":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"emails_clicked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"spent":{"type":"number","description":"What the campaign has cost so far, in US dollars."},"reserved":{"type":"number","description":"Set aside from the balance for the emails of the next days, in US dollars."}},"required":["recipients","waiting","in_sequence","finished","replied","bounced","unsubscribed","excluded","emails_sent","emails_opened","emails_clicked","spent","reserved"],"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","minimum":-9007199254740991,"maximum":9007199254740991},{"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","tenant_id","status","pause_reason","steps","schedule","daily_limit","stop_on_company_reply","track_opens","track_clicks","max_cost","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","tenant_id":null,"status":"paused","pause_reason":"manual","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,"max_cost":25,"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,"spent":1.74,"reserved":5.46},"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`.","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 `insufficient_balance` when the balance cannot cover the next email. Resuming a campaign that was paused for `list_quality` accepts the list as it is. Free.","tags":["email"],"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}},{"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.","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"},"tenant_id":{"description":"Its sender's `tenant_id`. Null: the account itself.","type":["string","null"]},"status":{"type":"string","enum":["draft","in_review","active","paused","completed","canceled","suspended"],"description":"`draft` until started. `active` sends. `paused` waits for `resume`. `completed`, `canceled` and `suspended` are final. `in_review` is no longer given: a campaign left waiting for a review from before starts by itself within minutes."},"pause_reason":{"anyOf":[{"type":"string","enum":["manual","insufficient_balance","max_cost","list_quality","sending_suspended"]},{"type":"null"}],"description":"Why it is paused: `manual`, `insufficient_balance` (top up, then resume), `max_cost` (the campaign's own cap is reached), `list_quality` (too many invalid addresses; resuming accepts the list as it is), `sending_suspended`."},"steps":{"type":"array","items":{"type":"object","properties":{"delay_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its share of the recipients, relative to the other versions."},"stats":{"type":"object","properties":{"sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"opened":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Emails opened at least once. Counted only when `track_opens` is on."},"clicked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"replied":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991},"end_hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The most emails the campaign sends on one day."},"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"},"max_cost":{"description":"The most the campaign may spend in its life, in US dollars. Null when not set.","type":["number","null"]},"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"People in the campaign."},"waiting":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Still being checked, or waiting for their first email."},"in_sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Got at least one email and have more to come."},"finished":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Got every email and did not answer."},"replied":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bounced":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unsubscribed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"excluded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Left out or stopped: invalid address, suppressed, or stopped by you."},"emails_sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"emails_opened":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"emails_clicked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"spent":{"type":"number","description":"What the campaign has cost so far, in US dollars."},"reserved":{"type":"number","description":"Set aside from the balance for the emails of the next days, in US dollars."}},"required":["recipients","waiting","in_sequence","finished","replied","bounced","unsubscribed","excluded","emails_sent","emails_opened","emails_clicked","spent","reserved"],"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","minimum":-9007199254740991,"maximum":9007199254740991},{"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","tenant_id","status","pause_reason","steps","schedule","daily_limit","stop_on_company_reply","track_opens","track_clicks","max_cost","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","tenant_id":null,"status":"active","pause_reason":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,"max_cost":25,"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,"spent":1.74,"reserved":5.46},"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`.","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, and what it had set aside returns to the balance. What was sent stays sent and stays charged. Replies to emails already sent are still recorded. Free.","tags":["email"],"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}},{"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.","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"},"tenant_id":{"description":"Its sender's `tenant_id`. Null: the account itself.","type":["string","null"]},"status":{"type":"string","enum":["draft","in_review","active","paused","completed","canceled","suspended"],"description":"`draft` until started. `active` sends. `paused` waits for `resume`. `completed`, `canceled` and `suspended` are final. `in_review` is no longer given: a campaign left waiting for a review from before starts by itself within minutes."},"pause_reason":{"anyOf":[{"type":"string","enum":["manual","insufficient_balance","max_cost","list_quality","sending_suspended"]},{"type":"null"}],"description":"Why it is paused: `manual`, `insufficient_balance` (top up, then resume), `max_cost` (the campaign's own cap is reached), `list_quality` (too many invalid addresses; resuming accepts the list as it is), `sending_suspended`."},"steps":{"type":"array","items":{"type":"object","properties":{"delay_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its share of the recipients, relative to the other versions."},"stats":{"type":"object","properties":{"sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"opened":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Emails opened at least once. Counted only when `track_opens` is on."},"clicked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"replied":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991},"end_hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The most emails the campaign sends on one day."},"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"},"max_cost":{"description":"The most the campaign may spend in its life, in US dollars. Null when not set.","type":["number","null"]},"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"People in the campaign."},"waiting":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Still being checked, or waiting for their first email."},"in_sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Got at least one email and have more to come."},"finished":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Got every email and did not answer."},"replied":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bounced":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unsubscribed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"excluded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Left out or stopped: invalid address, suppressed, or stopped by you."},"emails_sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"emails_opened":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"emails_clicked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"spent":{"type":"number","description":"What the campaign has cost so far, in US dollars."},"reserved":{"type":"number","description":"Set aside from the balance for the emails of the next days, in US dollars."}},"required":["recipients","waiting","in_sequence","finished","replied","bounced","unsubscribed","excluded","emails_sent","emails_opened","emails_clicked","spent","reserved"],"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","minimum":-9007199254740991,"maximum":9007199254740991},{"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","tenant_id","status","pause_reason","steps","schedule","daily_limit","stop_on_company_reply","track_opens","track_clicks","max_cost","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","tenant_id":null,"status":"canceled","pause_reason":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,"max_cost":25,"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,"spent":1.74,"reserved":5.46},"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`.","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 lists every address that was left out, with the reason. Accepted addresses are then checked for an existing mailbox, which takes a few minutes; the ones that fail become `invalid` and cost nothing. 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; emails are charged when they go out.","tags":["email"],"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}},{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"accepted":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Addresses taken into the campaign."},"duplicates":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Addresses that were in the campaign already. Nothing changed for them."},"rejected":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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":{"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."},"dry_run":{"type":"boolean","description":"True when nothing was added: the answer to `dry_run: true`."}},"required":["accepted","duplicates","rejected","results","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":[]}]},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","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"],"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}},{"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"]}},{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Recipient ID, such as `rcp_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","minimum":-9007199254740991,"maximum":9007199254740991},"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","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","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`.","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"],"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}},{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Recipient ID, such as `rcp_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","minimum":-9007199254740991,"maximum":9007199254740991},"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","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","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`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/email/recipients/{id}/conversation":{"get":{"operationId":"email.recipients.conversation","summary":"Get a conversation","description":"Everything written between a campaign and one person, oldest first, each email with its full text: the steps that went out, what came back (also from colleagues at the same company), your answers and single emails. Replies carry their files, with links to download them. Use it to read up on a person before you write to them. The latest 100 emails are returned; `truncated` says when there were more. Free.","tags":["email"],"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}}],"responses":{"200":{"description":"The result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"recipient":{"type":"object","properties":{"id":{"type":"string","description":"Recipient ID, such as `rcp_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","minimum":-9007199254740991,"maximum":9007199254740991},"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","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},"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`."},"campaign_id":{"type":"string"},"recipient_id":{"type":"string"},"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","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The step, counted from 1. Null for a reply or a single email."},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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 and cost nothing."},"subject":{"type":"string"},"opens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Opens that look like a person's. Machines that fetch mail to scan it are left out."},"clicks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bounce_type":{"anyOf":[{"type":"string","enum":["hard","soft"]},{"type":"null"}]},"cost":{"type":"number","description":"What it cost, in US dollars. 0 after a refund."},"attachments":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"content_type":{"type":"string"},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","campaign_id","recipient_id","to","kind","step","version","status","subject","opens","clicks","bounce_type","cost","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`."},"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","minimum":-9007199254740991,"maximum":9007199254740991,"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","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":"The emails, oldest first."},"truncated":{"type":"boolean","description":"Whether there were more than 100 and the oldest were left out."}},"required":["recipient","messages","truncated"],"additionalProperties":false,"description":"The recipient, and every email between you and them."},"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":{"recipient":{"id":"rcp_9x7p1q8w3e5r4k2m","campaign_id":"cmp_7p1q8w3e5r4k2m9x","email":"dana.whitfield@harborline-imports.example","first_name":"Dana","last_name":"Whitfield","company":"Harborline Imports","country":"US","contact_id":null,"status":"active","reason":null,"risky":false,"emails_sent":1,"next_send_at":"2026-11-24T15:20:00.000Z","last_sent_at":"2026-11-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","campaign_id":"cmp_7p1q8w3e5r4k2m9x","recipient_id":"rcp_9x7p1q8w3e5r4k2m","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,"cost":0.03,"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","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"}},{"type":"sent","at":"2026-11-20T14:02:19.000Z","message":{"id":"msg_9x7p1q8w3e5r4k2m","campaign_id":"cmp_7p1q8w3e5r4k2m9x","recipient_id":"rcp_9x7p1q8w3e5r4k2m","to":"dana.whitfield@harborline-imports.example","kind":"reply","step":null,"version":1,"status":"sent","subject":"Re: Office chairs for Harborline Imports","opens":0,"clicks":0,"bounce_type":null,"cost":0.03,"attachments":[{"filename":"price-list.pdf","content_type":"application/pdf","size":182344}],"sent_at":"2026-11-20T14:02:19.000Z","text":"Hi Dana,\n\nThanks. The price list is attached. Shall I send two samples?\n\nAlex"},"reply":null}],"truncated":false},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","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 what it cost. Opens and clicks are counted only for campaigns that track them. Free.","tags":["email"],"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}},{"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}},{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Message ID, such as `msg_3e5r4k2m9x7p1q8w`."},"campaign_id":{"type":"string"},"recipient_id":{"type":"string"},"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","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The step, counted from 1. Null for a reply or a single email."},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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 and cost nothing."},"subject":{"type":"string"},"opens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Opens that look like a person's. Machines that fetch mail to scan it are left out."},"clicks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bounce_type":{"anyOf":[{"type":"string","enum":["hard","soft"]},{"type":"null"}]},"cost":{"type":"number","description":"What it cost, in US dollars. 0 after a refund."},"attachments":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"content_type":{"type":"string"},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","campaign_id","recipient_id","to","kind","step","version","status","subject","opens","clicks","bounce_type","cost","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","campaign_id":"cmp_7p1q8w3e5r4k2m9x","recipient_id":"rcp_9x7p1q8w3e5r4k2m","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,"cost":0.03,"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`.","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`. Costs $0.03 when it goes out; nothing when it cannot be handed over. It counts toward the account's emails for the day, together with the campaigns. People who unsubscribed, bounced or are on a suppression list cannot be written to, and someone new who no reply pointed to belongs in a campaign: `POST /email/campaigns/{id}/recipients`. The same request within 24 hours is taken as a repeat: you get the first answer back and nothing is sent twice.","tags":["email"],"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":{"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}},"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":["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. With `dry_run`, only the maximum cost.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Message ID, such as `msg_3e5r4k2m9x7p1q8w`."},"campaign_id":{"type":"string"},"recipient_id":{"type":"string"},"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","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The step, counted from 1. Null for a reply or a single email."},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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 and cost nothing."},"subject":{"type":"string"},"opens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Opens that look like a person's. Machines that fetch mail to scan it are left out."},"clicks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bounce_type":{"anyOf":[{"type":"string","enum":["hard","soft"]},{"type":"null"}]},"cost":{"type":"number","description":"What it cost, in US dollars. 0 after a refund."},"attachments":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"content_type":{"type":"string"},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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`."},"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","minimum":-9007199254740991,"maximum":9007199254740991},"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","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","campaign_id","recipient_id","to","kind","step","version","status","subject","opens","clicks","bounce_type","cost","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":{"unit":{"type":"string","enum":["email_sent","email_sent_dedicated","email_capacity","email_dedicated_domain"],"description":"What is counted."},"records":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many were returned and charged."},"already_paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","notice","usage"],"additionalProperties":false},{"$ref":"#/components/schemas/DryRun"}]},"example":{"data":{"id":"msg_2k9x7p1q8w3e5r4m","campaign_id":"cmp_7p1q8w3e5r4k2m9x","recipient_id":"rcp_9x7p1q8w3e5r4k2m","to":"dana.whitfield@harborline-imports.example","kind":"single","step":null,"version":1,"status":"sent","subject":"Re: Office chairs for Harborline Imports","opens":0,"clicks":0,"bounce_type":null,"cost":0.03,"attachments":[{"filename":"quote-harborline.pdf","content_type":"application/pdf","size":96540}],"sent_at":"2026-11-27T15:12:40.000Z","recipient":{"id":"rcp_9x7p1q8w3e5r4k2m","campaign_id":"cmp_7p1q8w3e5r4k2m9x","email":"dana.whitfield@harborline-imports.example","first_name":"Dana","last_name":"Whitfield","company":"Harborline Imports","country":"US","contact_id":null,"status":"active","reason":null,"risky":false,"emails_sent":1,"next_send_at":"2026-11-24T15:20:00.000Z","last_sent_at":"2026-11-27T15:12:40.000Z","metadata":{"crm_id":"lead_4471"},"created_at":"2026-11-18T14:03:10.000Z"}},"notice":null,"usage":{"unit":"email_sent","records":1,"already_paid":0,"cost":0.03,"balance":48.05,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","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"],"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}},{"name":"tenant_id","in":"query","required":false,"description":"Only replies to the campaigns of this tenant's senders.","schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,64}$"}},{"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"]}},"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`. A reply held for a check is filed when the check is done, with the time it was sent.","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}},{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Reply ID, such as `rpl_1q8w3e5r4k2m9x7p`."},"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","minimum":-9007199254740991,"maximum":9007199254740991,"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","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","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`.","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"],"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}}],"responses":{"200":{"description":"The result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Reply ID, such as `rpl_1q8w3e5r4k2m9x7p`."},"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","minimum":-9007199254740991,"maximum":9007199254740991,"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","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","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`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/email/replies/{id}/reply":{"post":{"operationId":"email.replies.reply","summary":"Answer a reply","description":"Sends your answer to a reply, in the same thread and from the same mailbox the conversation runs in, so the person sees one conversation with one sender. Their email is quoted underneath. Write as that sender would: plain text, no placeholders. Files such as a price list or a catalogue go in `attachments`. The text is checked as a campaign's texts are. Costs $0.03 when it goes out; nothing when it cannot be handed over. Someone who unsubscribed or bounced cannot be answered. The same request to the same reply within 24 hours is taken as a repeat: you get the first answer back and nothing is sent twice.","tags":["email"],"x-mode":"proxy","x-billing":"per result","parameters":[{"name":"id","in":"path","required":true,"description":"Reply ID, such as `rpl_1q8w3e5r4k2m9x7p`.","schema":{"type":"string","maxLength":40}},{"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":{"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}},"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":["text"],"additionalProperties":false},"example":{"id":"rpl_1q8w3e5r4k2m9x7p","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. With `dry_run`, only the maximum cost.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Message ID, such as `msg_3e5r4k2m9x7p1q8w`."},"campaign_id":{"type":"string"},"recipient_id":{"type":"string"},"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","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The step, counted from 1. Null for a reply or a single email."},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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 and cost nothing."},"subject":{"type":"string"},"opens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Opens that look like a person's. Machines that fetch mail to scan it are left out."},"clicks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bounce_type":{"anyOf":[{"type":"string","enum":["hard","soft"]},{"type":"null"}]},"cost":{"type":"number","description":"What it cost, in US dollars. 0 after a refund."},"attachments":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"content_type":{"type":"string"},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","campaign_id","recipient_id","to","kind","step","version","status","subject","opens","clicks","bounce_type","cost","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":{"unit":{"type":"string","enum":["email_sent","email_sent_dedicated","email_capacity","email_dedicated_domain"],"description":"What is counted."},"records":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many were returned and charged."},"already_paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","notice","usage"],"additionalProperties":false},{"$ref":"#/components/schemas/DryRun"}]},"example":{"data":{"id":"msg_9x7p1q8w3e5r4k2m","campaign_id":"cmp_7p1q8w3e5r4k2m9x","recipient_id":"rcp_9x7p1q8w3e5r4k2m","to":"dana.whitfield@harborline-imports.example","kind":"reply","step":null,"version":1,"status":"sent","subject":"Re: Office chairs for Harborline Imports","opens":0,"clicks":0,"bounce_type":null,"cost":0.03,"attachments":[{"filename":"price-list.pdf","content_type":"application/pdf","size":182344}],"sent_at":"2026-11-20T14:02:19.000Z"},"notice":null,"usage":{"unit":"email_sent","records":1,"already_paid":0,"cost":0.03,"balance":48.05,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","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 `tenant_id` holds only for that tenant's campaigns: someone who unsubscribes from a tenant's emails is on its list, not on the others'. 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"],"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"]}},{"name":"tenant_id","in":"query","required":false,"description":"Only the entries of this tenant. Entries without a `tenant_id` hold for it too, and are not among them.","schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,64}$"}},{"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.","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"]},"tenant_id":{"description":"The tenant 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","tenant_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","tenant_id":null,"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`.","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 `tenant_id`, in that tenant'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"],"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}},"tenant_id":{"description":"Hold them back from this tenant's campaigns only, such as `cus_4821`. Without it, from all of yours.","type":"string","pattern":"^[A-Za-z0-9_.:-]{1,64}$"}},"required":[],"additionalProperties":false},"example":{"emails":["lee.park@coastal-office.example"],"domains":["brightdesk.example"]}}}},"responses":{"200":{"description":"The result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"added":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Entries that are new on the list."},"already_listed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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`.","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"],"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}},{"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.","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`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/email/capacity":{"get":{"operationId":"email.capacity.get","summary":"Get sending capacity","description":"How many emails this account can send a day and what one costs: $0.03 on the shared pool, $0.01 with a dedicated plan. Also lists the capacity added for your campaigns that is still being used up. When a campaign needs more than the shared pool can carry, mailboxes are added for it, and the campaign commits to $0.03 for each email they were added for: the emails it sends use the commitment up, and what is left after 30 days is charged. Free.","tags":["email"],"x-mode":"proxy","x-billing":"free","responses":{"200":{"description":"The result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["shared","dedicated"],"description":"`shared` while your emails leave from mailboxes other customers write from too, `dedicated` while you have a plan of mailboxes of your own."},"daily_limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The most emails this account sends in a day, across all its campaigns."},"sent_today":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Emails sent since midnight UTC."},"price_per_email":{"type":"number","description":"What one email sent costs now, in US dollars."},"dedicated":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["active","grace","ended"],"description":"`active`, `grace` while a period could not be paid (it ends at `grace_until` unless the balance is topped up), or `ended`."},"daily_volume":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The emails a day the plan is for."},"ready_per_day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"What your own mailboxes can send today. New mailboxes start slowly and reach full speed in about a week. Your campaigns send from them once this is as much as the account may send on the shared pool, or as the plan is for."},"price_per_period":{"type":"number","description":"What one period of 30 days costs, in US dollars."},"period_start":{"type":"string","description":"When the current period started, as an ISO 8601 time in UTC."},"period_end":{"type":"string","description":"When it ends, and the next one is charged, as an ISO 8601 time in UTC."},"renews":{"type":"boolean","description":"Whether the next period is charged and the plan goes on."},"grace_until":{"description":"With `grace`: when the plan ends unless the period is paid. Null otherwise.","type":["string","null"]}},"required":["status","daily_volume","ready_per_day","price_per_period","period_start","period_end","renews","grace_until"],"additionalProperties":false},{"type":"null"}],"description":"Your dedicated plan. Null when you never had one."},"commitments":{"type":"array","items":{"type":"object","properties":{"campaign_id":{"type":"string","description":"The campaign the capacity was added for."},"emails":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The emails committed to."},"emails_sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of them were sent."},"held":{"type":"number","description":"What is still set aside for the rest, in US dollars."},"due_at":{"type":"string","description":"When what is still held is charged, as an ISO 8601 time in UTC."}},"required":["campaign_id","emails","emails_sent","held","due_at"],"additionalProperties":false},"description":"Sending capacity added for your campaigns, still being used up. Each email sent uses up its part; what is left at `due_at` is charged."}},"required":["type","daily_limit","sent_today","price_per_email","dedicated","commitments"],"additionalProperties":false,"description":"How much this account can send, and at what 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."},"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":{"type":"shared","daily_limit":500,"sent_today":112,"price_per_email":0.03,"dedicated":null,"commitments":[{"campaign_id":"cmp_7p1q8w3e5r4k2m9x","emails":1500,"emails_sent":620,"held":26.4,"due_at":"2026-12-14T08:40:00.000Z"}]},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"email.capacity.request","summary":"Request dedicated capacity","description":"Gives your account mailboxes of its own, for 200 to 5000 emails a day: nobody else's mail leaves from them, and every email costs $0.01 instead of $0.03. The plan is sold by the sending domain, 50 emails a day each, at $25 a domain for 30 days, charged now and again at the start of every period. New mailboxes start slowly and reach full speed in about 6 days (see `ready_per_day`): until they can carry what your account may send on the shared pool, your campaigns keep sending there, within its usual daily limit, and from then on only from your own, up to the plan's volume. Without `confirm: true` this only quotes the price and changes nothing. To grow a plan, ask for the larger volume: a new period starts at the new size, and the unused part of the current one is credited back. A plan cannot shrink while it runs. Needs an account that has sent on the shared pool for at least 7 days and 200 emails, with few bounces and no complaints. A test key only gets the quote.","tags":["email"],"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":{"daily_volume":{"type":"integer","minimum":200,"maximum":5000,"description":"The emails a day you want to send from mailboxes of your own, 200 to 5000. Rounded up to whole domains of 50."},"confirm":{"default":false,"description":"True starts or grows the plan and charges its first 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":["daily_volume"],"additionalProperties":false},"example":{"daily_volume":400,"confirm":true}}}},"responses":{"200":{"description":"The result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"confirmed":{"type":"boolean","description":"True when the plan was started or grown. False on a quote: nothing changed."},"daily_volume":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The emails a day the plan is for."},"domains":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Sending domains of your own, at 50 emails a day each."},"price_per_period":{"type":"number","description":"What one period of 30 days costs, in US dollars."},"credit":{"type":"number","description":"What the unused part of your current period gives back to your balance when the plan grows, in US dollars. 0 otherwise."},"capacity":{"type":"object","properties":{"type":{"type":"string","enum":["shared","dedicated"],"description":"`shared` while your emails leave from mailboxes other customers write from too, `dedicated` while you have a plan of mailboxes of your own."},"daily_limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The most emails this account sends in a day, across all its campaigns."},"sent_today":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Emails sent since midnight UTC."},"price_per_email":{"type":"number","description":"What one email sent costs now, in US dollars."},"dedicated":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["active","grace","ended"],"description":"`active`, `grace` while a period could not be paid (it ends at `grace_until` unless the balance is topped up), or `ended`."},"daily_volume":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The emails a day the plan is for."},"ready_per_day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"What your own mailboxes can send today. New mailboxes start slowly and reach full speed in about a week. Your campaigns send from them once this is as much as the account may send on the shared pool, or as the plan is for."},"price_per_period":{"type":"number","description":"What one period of 30 days costs, in US dollars."},"period_start":{"type":"string","description":"When the current period started, as an ISO 8601 time in UTC."},"period_end":{"type":"string","description":"When it ends, and the next one is charged, as an ISO 8601 time in UTC."},"renews":{"type":"boolean","description":"Whether the next period is charged and the plan goes on."},"grace_until":{"description":"With `grace`: when the plan ends unless the period is paid. Null otherwise.","type":["string","null"]}},"required":["status","daily_volume","ready_per_day","price_per_period","period_start","period_end","renews","grace_until"],"additionalProperties":false},{"type":"null"}],"description":"Your dedicated plan. Null when you never had one."},"commitments":{"type":"array","items":{"type":"object","properties":{"campaign_id":{"type":"string","description":"The campaign the capacity was added for."},"emails":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The emails committed to."},"emails_sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of them were sent."},"held":{"type":"number","description":"What is still set aside for the rest, in US dollars."},"due_at":{"type":"string","description":"When what is still held is charged, as an ISO 8601 time in UTC."}},"required":["campaign_id","emails","emails_sent","held","due_at"],"additionalProperties":false},"description":"Sending capacity added for your campaigns, still being used up. Each email sent uses up its part; what is left at `due_at` is charged."}},"required":["type","daily_limit","sent_today","price_per_email","dedicated","commitments"],"additionalProperties":false,"description":"Your capacity after this call."}},"required":["confirmed","daily_volume","domains","price_per_period","credit","capacity"],"additionalProperties":false,"description":"The plan and its 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_sent","email_sent_dedicated","email_capacity","email_dedicated_domain"],"description":"What is counted."},"records":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many were returned and charged."},"already_paid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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,"daily_volume":400,"domains":8,"price_per_period":200,"credit":0,"capacity":{"type":"dedicated","daily_limit":500,"sent_today":112,"price_per_email":0.01,"dedicated":{"status":"active","daily_volume":400,"ready_per_day":0,"price_per_period":200,"period_start":"2026-11-21T10:02:00.000Z","period_end":"2026-12-21T10:02:00.000Z","renews":true,"grace_until":null},"commitments":[{"campaign_id":"cmp_7p1q8w3e5r4k2m9x","emails":1500,"emails_sent":620,"held":26.4,"due_at":"2026-12-14T08:40:00.000Z"}]}},"notice":null,"usage":{"cost":200,"breakdown":[{"unit":"email_dedicated_domain","records":8,"already_paid":0,"cost":200}],"balance":248.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"email.capacity.stop","summary":"Stop dedicated capacity","description":"Stops your dedicated plan from renewing. It runs to the end of the period you paid for; after that your emails leave from the shared pool again at $0.03 each, and the mailboxes that were yours are no longer kept for you. Nothing is refunded, and it cannot be undone: once the plan has ended, request capacity again with `POST /email/capacity`. Free.","tags":["email"],"x-mode":"proxy","x-billing":"free","parameters":[{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["shared","dedicated"],"description":"`shared` while your emails leave from mailboxes other customers write from too, `dedicated` while you have a plan of mailboxes of your own."},"daily_limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The most emails this account sends in a day, across all its campaigns."},"sent_today":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Emails sent since midnight UTC."},"price_per_email":{"type":"number","description":"What one email sent costs now, in US dollars."},"dedicated":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["active","grace","ended"],"description":"`active`, `grace` while a period could not be paid (it ends at `grace_until` unless the balance is topped up), or `ended`."},"daily_volume":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The emails a day the plan is for."},"ready_per_day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"What your own mailboxes can send today. New mailboxes start slowly and reach full speed in about a week. Your campaigns send from them once this is as much as the account may send on the shared pool, or as the plan is for."},"price_per_period":{"type":"number","description":"What one period of 30 days costs, in US dollars."},"period_start":{"type":"string","description":"When the current period started, as an ISO 8601 time in UTC."},"period_end":{"type":"string","description":"When it ends, and the next one is charged, as an ISO 8601 time in UTC."},"renews":{"type":"boolean","description":"Whether the next period is charged and the plan goes on."},"grace_until":{"description":"With `grace`: when the plan ends unless the period is paid. Null otherwise.","type":["string","null"]}},"required":["status","daily_volume","ready_per_day","price_per_period","period_start","period_end","renews","grace_until"],"additionalProperties":false},{"type":"null"}],"description":"Your dedicated plan. Null when you never had one."},"commitments":{"type":"array","items":{"type":"object","properties":{"campaign_id":{"type":"string","description":"The campaign the capacity was added for."},"emails":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The emails committed to."},"emails_sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of them were sent."},"held":{"type":"number","description":"What is still set aside for the rest, in US dollars."},"due_at":{"type":"string","description":"When what is still held is charged, as an ISO 8601 time in UTC."}},"required":["campaign_id","emails","emails_sent","held","due_at"],"additionalProperties":false},"description":"Sending capacity added for your campaigns, still being used up. Each email sent uses up its part; what is left at `due_at` is charged."}},"required":["type","daily_limit","sent_today","price_per_email","dedicated","commitments"],"additionalProperties":false,"description":"How much this account can send, and at what 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."},"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":{"type":"dedicated","daily_limit":500,"sent_today":112,"price_per_email":0.01,"dedicated":{"status":"active","daily_volume":400,"ready_per_day":0,"price_per_period":200,"period_start":"2026-11-21T10:02:00.000Z","period_end":"2026-12-21T10:02:00.000Z","renews":false,"grace_until":null},"commitments":[{"campaign_id":"cmp_7p1q8w3e5r4k2m9x","emails":1500,"emails_sent":620,"held":26.4,"due_at":"2026-12-14T08:40:00.000Z"}]},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","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`, `campaign.started`, `campaign.paused`, `campaign.resumed`, `campaign.completed`, `campaign.canceled`, `email.sent`, `email.opened`, `email.clicked`, `email.bounced`, `reply.received`, `recipient.unsubscribed`, `account.suspended`, `task.completed`. Free.","tags":["events"],"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":15,"type":"array","items":{"type":"string","enum":["sender.approved","sender.rejected","campaign.started","campaign.paused","campaign.resumed","campaign.completed","campaign.canceled","email.sent","email.opened","email.clicked","email.bounced","reply.received","recipient.unsubscribed","account.suspended","task.completed"]}},"style":"form","explode":false},{"name":"campaign_id","in":"query","required":false,"description":"Only events of this campaign.","schema":{"type":"string","maxLength":40}},{"name":"tenant_id","in":"query","required":false,"description":"Only events of this tenant: of its senders, its campaigns and their emails, and an `account.suspended` of the whole account, which stops the tenant too.","schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,64}$"}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"The result.","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"]},"tenant_id":{"description":"The tenant it is about: the `tenant_id` of the campaign's sender, or of the sender or the sending it is about. Null for the account itself.","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","tenant_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","tenant_id":null,"test":false,"metadata":{"customer_id":"c_812","crm_id":"lead_4471"},"data":{"reply_id":"rpl_1q8w3e5r4k2m9x7p","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`.","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"],"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":16,"type":"array","items":{"anyOf":[{"type":"string","const":"*"},{"type":"string","enum":["sender.approved","sender.rejected","campaign.started","campaign.paused","campaign.resumed","campaign.completed","campaign.canceled","email.sent","email.opened","email.clicked","email.bounced","reply.received","recipient.unsubscribed","account.suspended","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.","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`.","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"],"x-mode":"proxy","x-billing":"free","responses":{"200":{"description":"The result.","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`.","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"],"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}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"The result.","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","minimum":-9007199254740991,"maximum":9007199254740991},"response_status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The HTTP status your server answered with."},"duration_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"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`.","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"],"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}},{"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.","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`.","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"],"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":"The result.","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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Parts answered, or for leads the leads found."},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Parts of the batch, or the leads asked for."},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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`.","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"],"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}},{"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.","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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Parts answered, or for leads the leads found."},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Parts of the batch, or the leads asked for."},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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`.","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"],"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}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 100.","schema":{"default":20,"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.","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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Parts answered, or for leads the leads found."},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Parts of the batch, or the leads asked for."},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The part of `inputs` it answers, or the page of leads, from 0."},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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`.","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"],"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}},{"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.","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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Parts answered, or for leads the leads found."},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Parts of the batch, or the leads asked for."},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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`.","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, the price of each kind of result, and for cold email what can still be sent today and how far the account is from each circuit breaker, or with `tenant_id` one tenant of it. 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"],"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}},{"name":"tenant_id","in":"query","required":false,"description":"Show `email` for this tenant, such as `cus_4821`, instead of for the account.","schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,64}$"}}],"responses":{"200":{"description":"The result.","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"]}},"required":["test","budget","spent","remaining"],"additionalProperties":false,"description":"The key this call uses."},"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","minimum":-9007199254740991,"maximum":9007199254740991,"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","email_sent","email_sent_dedicated","email_capacity","email_dedicated_domain","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","email_sent","email_sent_dedicated","email_capacity","email_dedicated_domain","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."},"email":{"type":"object","properties":{"tenant_id":{"description":"The tenant this is about, when `tenant_id` was asked for. Null: the account, whose breakers count its own mail, without a tenant.","type":["string","null"]},"status":{"type":"string","enum":["ok","throttled","suspended"],"description":"`ok`; `throttled` when a breaker halved the daily limit; `suspended` when one stopped all sending until a person looks."},"daily_limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The most emails the account, or the tenant, sends on one day across its campaigns, today. It rises as it sends without bounces and complaints. A tenant's is within the account's, which holds for all of its tenants together."},"sent_today":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Emails sent so far today (UTC), campaign steps and single emails, as they count against `daily_limit`."},"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, sending stops."},"measured_over":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many emails the share is of: the last 200 at most."},"counts_from":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The breaker only acts from this many emails on."},"action":{"type":"string","const":"suspend","description":"What happens above the limit: all sending 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","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recipients who reported the emails as spam."},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"At this many, sending stops. One already halves the daily limit."},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The days the complaints are counted over."},"action":{"type":"string","const":"suspend","description":"What happens at the limit: all sending 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 daily limit is halved."},"counts_from":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"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 account is from each of the breakers that protect the mailboxes."}},"required":["tenant_id","status","daily_limit","sent_today","breakers"],"additionalProperties":false,"description":"Cold email: what the account can still send today, and how far it is from being slowed down or stopped. The breakers leave test campaigns out."}},"required":["balance","key","period","spent","by_operation","recent","prices","email"],"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":20,"spent":6.42,"remaining":13.58},"period":{"since":"2026-10-23","until":"2026-11-22"},"spent":11.92,"by_operation":[{"operation":"email.campaigns.send","calls":4,"cost":7.17},{"operation":"trade.companies.search","calls":23,"cost":4.6},{"operation":"email.replies.reply","calls":5,"cost":0.15}],"recent":[{"request_id":"req_7f3k2m9x4p1q8w3e","operation":"email.replies.reply","cost":0.03,"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,"email_sent":0.03,"email_sent_dedicated":0.01,"email_capacity":0.03,"email_dedicated_domain":25,"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},"email":{"tenant_id":null,"status":"ok","daily_limit":150,"sent_today":42,"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"}}}},"query":{"days":30},"notice":null,"usage":{"cost":0,"balance":48.08,"replayed":false}}}}},"default":{"description":"An error. Branch on `error.code`.","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 the emails of each campaign summed up per day. 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"],"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.campaigns.send`.","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}},{"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.","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 campaign's emails are summed up per campaign and day, under an ID of their own."},"operation":{"type":"string","description":"The operation that was charged, such as `trade.companies.search`."},"campaign_id":{"description":"For the emails of a campaign: which campaign. 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_sent`."},"records":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["unit","records"],"additionalProperties":false},"description":"What was charged for, by unit."},"at":{"type":"string","description":"When, as an ISO 8601 timestamp in UTC. For a campaign's day, when it was last added to."}},"required":["id","operation","campaign_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":"email.replies.reply","campaign_id":null,"by_this_key":true,"cost":0.03,"results":[{"unit":"email_sent","records":1}],"at":"2026-11-22T09:14:03.000Z"},{"id":"eml_7p1q8w3e5r4k2m9x_20261121","operation":"email.campaigns.send","campaign_id":"cmp_7p1q8w3e5r4k2m9x","by_this_key":true,"cost":0.87,"results":[{"unit":"email_sent","records":29}],"at":"2026-11-21T21:58:40.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`.","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","sender_not_ready","content_rejected","rate_limited","internal_error","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","email_sent","email_sent_dedicated","email_capacity","email_dedicated_domain","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","minimum":-9007199254740991,"maximum":9007199254740991},"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","minimum":-9007199254740991,"maximum":9007199254740991},{"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}}},"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,"email_sent":0.03,"email_sent_dedicated":0.01,"email_capacity":0.03,"email_dedicated_domain":25,"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}}