Tasks
Run up to 100 lookups or 500 leads in the background, billed per part, and read the results when they are done.
A task makes many calls of one endpoint for you in the background, so an agent does not have to send them one by one or keep a connection open while they run.
enrich.people.email.find,enrich.email.verifyandsignals.findtakeinputs: up to 100 parts, each the body of one call.trade.leads.findtakes oneinputwhoselimitgoes up to 500, and the task pages through the list for you.- Every part runs and is billed exactly like a call of its own, so a task costs what its calls cost. Creating, reading, listing and canceling a task is free.
max_costrefuses a task that could cost more, anddry_run: truesays the most it can cost. - A task that runs out of balance, or of its key's budget, stops as
failedand keeps what it did. - When a task ends,
task.completedgoes to your webhooks and toGET /events.metadataof your own, such as a customer ID, comes back on the task and on that event. - Results are kept for 7 days after the end, 1 day when a source does not allow keeping them. The task itself is listed for 30 days.
- A test key runs every part in the sandbox, is never charged, and only sees tasks made with a test key.
- The same is the
task_createandtask_gettools of the MCP server.
Create a task
POST https://api.won.dev/v1/tasks
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.
Parameters
Parameters go in the JSON body.
| Parameter | Type | Required | Description |
|---|---|---|---|
operation | trade.leads.find | enrich.people.email.find | enrich.email.verify | signals.find | yes | What to run: trade.leads.find, enrich.people.email.find, enrich.email.verify, signals.find. |
inputs | object[] | no | For a batch: up to 100 parts, each the body of one call of the endpoint, such as {"email": "jane@example.com"}. |
input | object | no | 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 | number | no | The most the whole task may cost, in US dollars. A task that could cost more is refused before anything runs. |
dry_run | boolean | no | Only say the most the task can cost. Nothing is created or charged. Default: false. |
metadata | object | no | 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. |
Response
| Field | Type | Description |
|---|---|---|
data | object | The task, and the most it can cost. |
data.dry_run | boolean | True when nothing was created: the answer to dry_run: true. |
data.max_cost | number | The most the task can cost, in US dollars. |
data.task | object | null | The task. Null on a dry run. |
data.task.id | string | Task ID, such as task_7p1q8w3e5r4k2m9x. |
data.task.operation | string | The endpoint it runs, such as enrich.email.verify. |
data.task.status | running | completed | failed | canceled | running, then completed, failed (it stopped early, and error says why) or canceled. |
data.task.progress | object | How far it got. |
data.task.progress.done | integer | Parts answered, or for leads the leads found. |
data.task.progress.total | integer | Parts of the batch, or the leads asked for. |
data.task.progress.failed | integer | Parts answered with an error. They cost nothing. |
data.task.cost | number | What it cost so far, in US dollars. |
data.task.max_cost | number | The most it can cost, in US dollars. |
data.task.error | object | null | Why it stopped early: the error of the call that stopped it, such as insufficient_balance. Null otherwise. |
data.task.error.code | string | |
data.task.error.message | string | |
data.task.metadata | object | Your own keys and values, as you gave them. Empty when none were. |
data.task.created_at | string | When it was created, ISO 8601. |
data.task.completed_at | string | null | When it ended. Null while it runs. |
data.task.results_expire_at | string | null | When the results are deleted: 7 days after the end, 1 day when a source does not allow keeping them. Null while it runs. |
notice | string | null | A plain sentence when there is something to know about this answer. Null otherwise. |
usage | object | Nothing is charged here. The balance, for reference. |
usage.cost | number | What this call cost, in US dollars. |
usage.balance | number | The balance left after this call, in US dollars. |
usage.replayed | boolean | True when this is a repeat of a request from the last 24 hours. Repeats are free. |
Example
curl https://api.won.dev/v1/tasks \
-H "Authorization: Bearer $WON_API_KEY" \
-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": 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
}
}Get a task
GET https://api.won.dev/v1/tasks/{id}
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.
Parameters
id is part of the path. The others go in the query string.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Task ID, such as task_7p1q8w3e5r4k2m9x. |
limit | integer | no | How many to return, 1 to 100. Default: 20. |
cursor | string | no | To get the next page, pass next_cursor of the previous response back unchanged, with the same parameters. |
Response
| Field | Type | Description |
|---|---|---|
data | object | The task, and a page of its results. |
data.task | object | |
data.task.id | string | Task ID, such as task_7p1q8w3e5r4k2m9x. |
data.task.operation | string | The endpoint it runs, such as enrich.email.verify. |
data.task.status | running | completed | failed | canceled | running, then completed, failed (it stopped early, and error says why) or canceled. |
data.task.progress | object | How far it got. |
data.task.progress.done | integer | Parts answered, or for leads the leads found. |
data.task.progress.total | integer | Parts of the batch, or the leads asked for. |
data.task.progress.failed | integer | Parts answered with an error. They cost nothing. |
data.task.cost | number | What it cost so far, in US dollars. |
data.task.max_cost | number | The most it can cost, in US dollars. |
data.task.error | object | null | Why it stopped early: the error of the call that stopped it, such as insufficient_balance. Null otherwise. |
data.task.error.code | string | |
data.task.error.message | string | |
data.task.metadata | object | Your own keys and values, as you gave them. Empty when none were. |
data.task.created_at | string | When it was created, ISO 8601. |
data.task.completed_at | string | null | When it ended. Null while it runs. |
data.task.results_expire_at | string | null | When the results are deleted: 7 days after the end, 1 day when a source does not allow keeping them. Null while it runs. |
data.results | object[] | The results of this page, in order. |
data.results[].index | integer | The part of inputs it answers, or the page of leads, from 0. |
data.results[].status | integer | The HTTP status of the call: 200, or the status of its error. |
data.results[].body | object | The answer, exactly as a call of the endpoint returns it: its body or its error. |
has_more | boolean | Whether more results follow this page. |
next_cursor | string | null | Pass it as cursor to get the next page of results. Null on the last page. |
notice | string | null | A plain sentence when there is something to know about this answer. Null otherwise. |
usage | object | Nothing is charged here. The balance, for reference. |
usage.cost | number | What this call cost, in US dollars. |
usage.balance | number | The balance left after this call, in US dollars. |
usage.replayed | boolean | True when this is a repeat of a request from the last 24 hours. Repeats are free. |
Example
curl "https://api.won.dev/v1/tasks/task_7p1q8w3e5r4k2m9x?limit=1" \
-H "Authorization: Bearer $WON_API_KEY"{
"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
}
}List tasks
GET https://api.won.dev/v1/tasks
Your tasks, newest first, with their status, progress and cost. Their results come with GET /tasks/{id}. Free.
Parameters
Parameters go in the query string.
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | How many to return, 1 to 100. Default: 25. |
cursor | string | no | To get the next page, pass next_cursor of the previous response back unchanged, with the same parameters. |
Response
| Field | Type | Description |
|---|---|---|
data | object[] | The tasks, newest first. |
data[].id | string | Task ID, such as task_7p1q8w3e5r4k2m9x. |
data[].operation | string | The endpoint it runs, such as enrich.email.verify. |
data[].status | running | completed | failed | canceled | running, then completed, failed (it stopped early, and error says why) or canceled. |
data[].progress | object | How far it got. |
data[].progress.done | integer | Parts answered, or for leads the leads found. |
data[].progress.total | integer | Parts of the batch, or the leads asked for. |
data[].progress.failed | integer | Parts answered with an error. They cost nothing. |
data[].cost | number | What it cost so far, in US dollars. |
data[].max_cost | number | The most it can cost, in US dollars. |
data[].error | object | null | Why it stopped early: the error of the call that stopped it, such as insufficient_balance. Null otherwise. |
data[].error.code | string | |
data[].error.message | string | |
data[].metadata | object | Your own keys and values, as you gave them. Empty when none were. |
data[].created_at | string | When it was created, ISO 8601. |
data[].completed_at | string | null | When it ended. Null while it runs. |
data[].results_expire_at | string | null | When the results are deleted: 7 days after the end, 1 day when a source does not allow keeping them. Null while it runs. |
has_more | boolean | Whether more follow this page. |
next_cursor | string | null | Pass it as cursor to get the next page. Null on the last page. |
notice | string | null | A plain sentence when there is something to know about this answer. Null otherwise. |
usage | object | Nothing is charged here. The balance, for reference. |
usage.cost | number | What this call cost, in US dollars. |
usage.balance | number | The balance left after this call, in US dollars. |
usage.replayed | boolean | True when this is a repeat of a request from the last 24 hours. Repeats are free. |
Example
curl "https://api.won.dev/v1/tasks?limit=1" \
-H "Authorization: Bearer $WON_API_KEY"{
"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
}
}Cancel a task
POST https://api.won.dev/v1/tasks/{id}/cancel
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.
Parameters
id is part of the path.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Task ID, such as task_7p1q8w3e5r4k2m9x. |
Response
| Field | Type | Description |
|---|---|---|
data | object | The task, canceled. |
data.id | string | Task ID, such as task_7p1q8w3e5r4k2m9x. |
data.operation | string | The endpoint it runs, such as enrich.email.verify. |
data.status | running | completed | failed | canceled | running, then completed, failed (it stopped early, and error says why) or canceled. |
data.progress | object | How far it got. |
data.progress.done | integer | Parts answered, or for leads the leads found. |
data.progress.total | integer | Parts of the batch, or the leads asked for. |
data.progress.failed | integer | Parts answered with an error. They cost nothing. |
data.cost | number | What it cost so far, in US dollars. |
data.max_cost | number | The most it can cost, in US dollars. |
data.error | object | null | Why it stopped early: the error of the call that stopped it, such as insufficient_balance. Null otherwise. |
data.error.code | string | |
data.error.message | string | |
data.metadata | object | Your own keys and values, as you gave them. Empty when none were. |
data.created_at | string | When it was created, ISO 8601. |
data.completed_at | string | null | When it ended. Null while it runs. |
data.results_expire_at | string | null | When the results are deleted: 7 days after the end, 1 day when a source does not allow keeping them. Null while it runs. |
notice | string | null | A plain sentence when there is something to know about this answer. Null otherwise. |
usage | object | Nothing is charged here. The balance, for reference. |
usage.cost | number | What this call cost, in US dollars. |
usage.balance | number | The balance left after this call, in US dollars. |
usage.replayed | boolean | True when this is a repeat of a request from the last 24 hours. Repeats are free. |
Example
curl https://api.won.dev/v1/tasks/task_7p1q8w3e5r4k2m9x/cancel \
-H "Authorization: Bearer $WON_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'{
"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
}
}