Tarefas
Execute em segundo plano até 100 buscas ou 500 leads, com cobrança por parte, e leia os resultados quando terminarem.
Uma tarefa faz por você, em segundo plano, muitas chamadas a um mesmo endpoint, para que um agente não precise enviá-las uma a uma nem manter uma conexão aberta enquanto elas rodam.
enrich.people.email.find,enrich.email.verifyesignals.findrecebeminputs: até 100 partes, cada uma o corpo de uma chamada.trade.leads.findrecebe um únicoinputcujolimitvai até 500, e a tarefa percorre a lista por você.- Cada parte roda e é cobrada exatamente como uma chamada avulsa, então uma tarefa custa o que as chamadas dela custam. Criar, consultar, listar e cancelar uma tarefa é grátis.
max_costrecusa uma tarefa que possa custar mais, edry_run: trueinforma o máximo que ela pode custar. - Criar uma tarefa responde
202 Acceptedna hora, com a URL da tarefa no cabeçalhoLocation: acompanhe-a ali comGET /tasks/{id}até questatusdeixe de serrunning. - Uma tarefa que fica sem saldo, ou sem o orçamento da chave, para como
failede mantém o que fez. - Quando uma tarefa termina,
task.completedvai para os seus webhooks e paraGET /events. A sua própriametadata, como o ID de um cliente, volta na tarefa e nesse evento. - Os resultados ficam guardados por 7 dias depois do fim, ou 1 dia quando uma fonte não permite guardá-los. A tarefa em si aparece na lista por 30 dias.
- Uma chave de teste roda cada parte no sandbox, nunca gera cobrança e só vê as tarefas criadas com chave de teste.
- O mesmo está nas ferramentas
task_createetask_getdo servidor MCP.
Criar uma tarefa
Executa em segundo plano muitas chamadas a um mesmo endpoint: até 100 buscas de e-mail corporativo (enrich.people.email.find), verificações de endereço (enrich.email.verify) ou checagens de sinais de empresas (signals.find), uma por item de inputs, ou até 500 leads (trade.leads.find) a partir de um único input cujo limit vai até 500. Cada parte funciona exatamente como uma chamada avulsa: é cobrada pelo preço do endpoint pelo que retorna, e repetições e resultados pagos nos últimos 30 dias são grátis. Criar a tarefa é grátis. max_cost recusa uma tarefa que possa custar mais, e dry_run: true informa o máximo que ela pode custar. Uma tarefa que fica sem saldo ou sem orçamento da chave termina como failed e mantém o que fez. Acompanhe com GET /tasks/{id} ou espere o evento task.completed. Os resultados ficam guardados por 7 dias depois do fim. Com um cabeçalho Idempotency-Key, uma nova tentativa nunca cria uma segunda tarefa. Endpoints: trade.leads.find, enrich.people.email.find, enrich.email.verify, signals.find.
apiKeyAuthorizationBearer <chave de API>Authorization: Bearer won_live_..., a key from the console.
Idempotency-Key?stringAny unique string. A retry with the same key and the same body returns the first response and is not charged again.
length <= 255application/json- body
operation*stringWhat to run: trade.leads.find, enrich.people.email.find, enrich.email.verify, signals.find.
"trade.leads.find""enrich.people.email.find""enrich.email.verify""signals.find"inputs?array<>For a batch: up to 100 parts, each the body of one call of the endpoint, such as {"email": "jane@example.com"}.
1 <= items <= 100input?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.
max_cost?numberThe most the whole task may cost, in US dollars. A task that could cost more is refused before anything runs.
0 < valuedry_run?booleanOnly say the most the task can cost. Nothing is created or charged.
falsemetadata?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.
Nothing was started: the answer to dry_run: true.
application/json- response
data*The task, and the most it can cost.
notice*|A plain sentence when there is something to know about this answer. Null otherwise.
usage*Nothing is charged here. The balance, for reference.
curl -X POST 'https://api.won.dev/v1/tasks' \ -H 'Content-Type: application/json' \ -d '{ "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" }}'{ "data": { "dry_run": true, "max_cost": 0, "task": { "id": "string", "operation": "string", "status": "running", "progress": { "done": 0, "total": 0, "failed": 0 }, "cost": 0, "max_cost": 0, "error": { "code": "string", "message": "string" }, "metadata": { "property1": "string", "property2": "string" }, "created_at": "string", "completed_at": "string", "results_expire_at": "string" } }, "notice": "string", "usage": { "cost": 0, "balance": 0, "replayed": true }}Consultar uma tarefa
Uma tarefa, até onde ela chegou e quanto custou, com os resultados em ordem: cada um é a resposta que uma chamada ao endpoint dá, com o status HTTP. Navegue pelos resultados com cursor. Enquanto status for running, consulte de novo em um minuto ou espere o evento task.completed. Os resultados são apagados 7 dias depois do fim (results_expire_at). Grátis.
apiKeyAuthorizationBearer <chave de API>Authorization: Bearer won_live_..., a key from the console.
id*stringTask ID, such as task_7p1q8w3e5r4k2m9x.
length <= 40limit?integerHow many to return, 1 to 100.
1 <= value <= 10020cursor?stringTo get the next page, pass next_cursor of the previous response back unchanged, with the same parameters.
length <= 200The result.
application/json- response
data*The task, and a page of its results.
has_more*booleanWhether more results follow this page.
next_cursor*|Pass it as cursor to get the next page of results. Null on the last page.
notice*|A plain sentence when there is something to know about this answer. Null otherwise.
usage*Nothing is charged here. The balance, for reference.
curl -X GET 'https://api.won.dev/v1/tasks/task_7p1q8w3e5r4k2m9x?limit=1'{ "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 }}Listar tarefas
As suas tarefas, da mais recente para a mais antiga, com status, progresso e custo. Os resultados vêm com GET /tasks/{id}. Grátis.
apiKeyAuthorizationBearer <chave de API>Authorization: Bearer won_live_..., a key from the console.
limit?integerHow many to return, 1 to 100.
1 <= value <= 10025cursor?stringTo get the next page, pass next_cursor of the previous response back unchanged, with the same parameters.
length <= 200The result.
application/json- response
data*array<>The tasks, newest first.
has_more*booleanWhether more follow this page.
next_cursor*|Pass it as cursor to get the next page. Null on the last page.
notice*|A plain sentence when there is something to know about this answer. Null otherwise.
usage*Nothing is charged here. The balance, for reference.
curl -X GET 'https://api.won.dev/v1/tasks?limit=1'{ "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 }}Cancelar uma tarefa
Interrompe uma tarefa em andamento: nenhuma parte nova começa. As partes que já estavam em andamento terminam e são cobradas normalmente, e tudo o que ela fez fica guardado. Envia task.completed com status: canceled. Grátis.
apiKeyAuthorizationBearer <chave de API>Authorization: Bearer won_live_..., a key from the console.
id*stringTask ID, such as task_7p1q8w3e5r4k2m9x.
length <= 40Idempotency-Key?stringAny unique string. A retry with the same key and the same body returns the first response and is not charged again.
length <= 255The result.
application/json- response
data*The task, canceled.
notice*|A plain sentence when there is something to know about this answer. Null otherwise.
usage*Nothing is charged here. The balance, for reference.
curl -X POST 'https://api.won.dev/v1/tasks/task_7p1q8w3e5r4k2m9x/cancel'{ "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 }}Última atualização em