Skip to content

Tasks API

Create Turnstile tasks, read their results, and follow them live.

Every operation of the API reference is generated from the contract the API serves, version 0.1.0. Replace YOUR_API_KEY in the samples with your key; each response shows an example in the contract's shape.

List tasks

GET/v1/tasks

Authentication. Your API key, as a bearer token: Authorization: Bearer YOUR_API_KEY.

Newest first, with cursor pagination.

Parameters

Parameters of List tasks
FieldWhat it is
statusqueryStatus

Only tasks with this status.

limitqueryinteger

Tasks per page, 1 to 100; 50 by default.

cursorquerystring

nextCursor from the previous page.

idempotencyKeyquerystring

Only the task created with this Idempotency-Key, to recover a reply that was lost.

Responses

Responses of List tasks
StatusWhat it means
200 OK

A page of tasks.

TaskPage (application/json)

429 Too Many Requests

Over a budget for reading (rate_limited); retry after Retry-After, and poll less often.

Problem (application/problem+json)

Any other status

An error, as RFC 9457 problem details.

Problem (application/problem+json)

Error codes

The errors reference says what each means, whether a retry helps and what it costs.

Request

Terminal window
curl https://api.zerocaptcha.io/v1/tasks \
-H "Authorization: Bearer YOUR_API_KEY"

Response

200 OK TaskPage (application/json)

{
  "data": [
    {
      "action": null,
      "attempts": 1,
      "callback": null,
      "cdata": null,
      "cost": "0.000000",
      "createdAt": "2026-10-01T00:00:00Z",
      "deadline": "2026-10-01T00:00:00Z",
      "errorCode": null,
      "errorDescription": null,
      "finishedAt": null,
      "held": "0.000400",
      "id": "0192f3a4-7b1c-7d2e-9f10-3c4d5e6f7a8b",
      "idempotencyKey": null,
      "kind": "turnstile",
      "maxAttempts": 1,
      "price": "0.000400",
      "solution": null,
      "startedAt": null,
      "status": "queued",
      "tokenExpiresAt": null,
      "tokenIssuedAt": null,
      "tokenState": "pending",
      "type": "TurnstileTaskProxyless",
      "updatedAt": "2026-10-01T00:00:00Z",
      "usesProxy": false,
      "version": 1,
      "websiteKey": "0x4AAAAAAAB1cD2eF3gH4iJ5",
      "websiteURL": "https://example.com/login"
    }
  ],
  "liveCursor": "48213",
  "nextCursor": null
}

Example values in the contract's shape, version 0.1.0.

Create a task

POST/v1/tasks

Authentication. Your API key, as a bearer token: Authorization: Bearer YOUR_API_KEY.

Queues a task and holds its price on your balance; the price is charged only if the task succeeds. Send an Idempotency-Key to retry safely: for 24 hours, the same key and request return the first reply instead of a second task, and the same key with a different request is refused. Creations are bounded by your balance and your account's share of the queue, and by no rate budget unless the service sets one.

Parameters

Parameters of Create a task
FieldWhat it is
Idempotency-Keyheaderstring

Your ID for this task, 1 to 255 visible ASCII characters.

Request body JSON · CreateTask

A new task: a Turnstile widget's, or a Cloudflare challenge page's, told apart by type. Surrounding whitespace is trimmed from every field, and an empty optional field counts as absent.

CreateTurnstileTask

A new Turnstile task. Surrounding whitespace is trimmed from every field, and an empty optional field counts as absent.

Fields of CreateTurnstileTask
FieldWhat it is
typestringRequired

TurnstileTaskProxyless, or TurnstileTask to solve the widget through your proxy. The same names with CapSolver's Anti prefix work too, and case does not matter.

One of TurnstileTaskProxyless, TurnstileTask, AntiTurnstileTaskProxyLess, AntiTurnstileTask

websiteKeystringRequired

The widget's site key: 1 to 100 ASCII letters, digits, _ and -.

websiteURLstring (uri)Required

The page the widget is on, or behind the challenge: an http or https URL of at most 2048 characters, without credentials, on its scheme's default port. The server also checks that it names a public domain, not an IP address, a name of one label or one kept for local use such as localhost, *.local or *.internal; the task keeps the URL as the server normalizes it, such as with a lowercase host.

actionstring or null

The widget's action, if it sets one: up to 32 ASCII letters, digits, _ and -.

callbackUrlstring (uri) or null

Where to POST the result once the task ends, signed with your callback secret (ZeroCaptcha-Signature): an http or https URL of at most 2048 characters, without credentials, naming a public domain or a public IP address on a port no other protocol reserves. A call that is not answered 2xx is retried with backoff, eight attempts in all over roughly 65 to 95 minutes; one to a name that resolves to a private address is not made. callbackUrl in this dialect.

cdatastring or null

The widget's cData, if it sets one: up to 255 ASCII letters, digits, _ and -.

proxystring or null

Your proxy as a URL with its port, such as http://user:pass@proxy.example.net:8080: http or https, as SOCKS is not supported yet. TurnstileTask needs one, and TurnstileTaskProxyless takes none. The server also checks that the host is public, that the port is not one another protocol reserves, such as 25, and that the login and password are at most 255 bytes each, a password only with a login. Never logged, and deleted when the task finishes.

CreateChallengeTask

A new Cloudflare challenge page's task, through your proxy: a challenge page has no widget, so no websiteKey, action or cdata. Surrounding whitespace is trimmed from every field, and an empty optional field counts as absent.

Fields of CreateChallengeTask
FieldWhat it is
proxystringRequired

Your proxy as a URL with its port, such as http://user:pass@proxy.example.net:8080: http or https, as SOCKS is not supported yet. The clearance is earned through it and works only from its address, so it must keep one address across connections: a sticky session or a static proxy, not one that rotates. The server also checks that the host is public, that the port is not one another protocol reserves, such as 25, and that the login and password are at most 255 bytes each, a password only with a login. Never logged, and deleted when the task finishes.

typestringRequired

CloudflareChallengeTask, or CapSolver's AntiCloudflareTask, in any case: pass a Cloudflare challenge page (the WAF's managed, JS or interactive challenge) through your proxy, for its cf_clearance cookie. A clearance works only from the IP address and with the user agent that earned it, so there is no proxyless challenge task: CloudflareChallengeTaskProxyless is refused.

One of CloudflareChallengeTask, AntiCloudflareTask

websiteURLstring (uri)Required

The page the widget is on, or behind the challenge: an http or https URL of at most 2048 characters, without credentials, on its scheme's default port. The server also checks that it names a public domain, not an IP address, a name of one label or one kept for local use such as localhost, *.local or *.internal; the task keeps the URL as the server normalizes it, such as with a lowercase host.

callbackUrlstring (uri) or null

Where to POST the result once the task ends, signed with your callback secret (ZeroCaptcha-Signature): an http or https URL of at most 2048 characters, without credentials, naming a public domain or a public IP address on a port no other protocol reserves. A call that is not answered 2xx is retried with backoff, eight attempts in all over roughly 65 to 95 minutes; one to a name that resolves to a private address is not made. callbackUrl in this dialect.

Responses

Responses of Create a task
StatusWhat it means
201 Created

The task, queued; or, for a retry with the same Idempotency-Key, the first reply.

TaskView (application/json)

409 Conflict

A request with this Idempotency-Key is still being processed (idempotency_key_in_use); retry after Retry-After for its reply.

Problem (application/problem+json)

429 Too Many Requests

The queue share is full (queue_full), or a budget for creating the service has set is spent (rate_limited). Nothing was created or charged; retry after Retry-After.

Problem (application/problem+json)

Any other status

An error, as RFC 9457 problem details.

Problem (application/problem+json)

Error codes

The errors reference says what each means, whether a retry helps and what it costs.

Request

Terminal window
curl -X POST https://api.zerocaptcha.io/v1/tasks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: order-4521-attempt-1" \
-H "Content-Type: application/json" \
-d '{
"type": "TurnstileTaskProxyless",
"websiteKey": "0x4AAAAAAAB1cD2eF3gH4iJ5",
"websiteURL": "https://example.com/login"
}'

Response

201 Created TaskView (application/json)

{
  "action": null,
  "attempts": 1,
  "callback": null,
  "cdata": null,
  "cost": "0.000000",
  "createdAt": "2026-10-01T00:00:00Z",
  "deadline": "2026-10-01T00:00:00Z",
  "errorCode": null,
  "errorDescription": null,
  "finishedAt": null,
  "held": "0.000400",
  "id": "0192f3a4-7b1c-7d2e-9f10-3c4d5e6f7a8b",
  "idempotencyKey": null,
  "kind": "turnstile",
  "maxAttempts": 1,
  "price": "0.000400",
  "solution": null,
  "startedAt": null,
  "status": "queued",
  "tokenExpiresAt": null,
  "tokenIssuedAt": null,
  "tokenState": "pending",
  "type": "TurnstileTaskProxyless",
  "updatedAt": "2026-10-01T00:00:00Z",
  "usesProxy": false,
  "version": 1,
  "websiteKey": "0x4AAAAAAAB1cD2eF3gH4iJ5",
  "websiteURL": "https://example.com/login"
}

Example values in the contract's shape, version 0.1.0.

Live task updates

GET/v1/tasks/events

Authentication. Your API key, as a bearer token: Authorization: Bearer YOUR_API_KEY.

Server-sent events for the caller's tasks: task carries a task (without its token) each time it changes, reset asks the client to refetch its list because updates were missed. Start from a list's liveCursor. Opening a stream draws on the caller's budget for reads, as a list read does; keeping it open costs nothing more. The stream ends when its key or session no longer allows it, or when its client stops taking events; an account may hold only a few streams open at once.

Parameters

Parameters of Live task updates
FieldWhat it is
sincequerystring

Where to start: liveCursor from a task list, or the last event's ID.

Last-Event-IDheaderstring

The last event's ID, sent by a reconnecting browser.

Responses

Responses of Live task updates
StatusWhat it means
200 OK

An event stream.

text/event-stream

429 Too Many Requests

Over a budget for reading, or as many streams open as the account, or this server, may hold (rate_limited); reconnect less often, or close a stream, and retry after Retry-After.

Problem (application/problem+json)

Any other status

An error, as RFC 9457 problem details.

Problem (application/problem+json)

Error codes

The errors reference says what each means, whether a retry helps and what it costs.

Request

Terminal window
curl -N https://api.zerocaptcha.io/v1/tasks/events \
-H "Authorization: Bearer YOUR_API_KEY"

Response

200 OK text/event-stream

Server-sent events, as the description says: no single body to show.

Example values in the contract's shape, version 0.1.0.

Get a task

GET/v1/tasks/{id}

Authentication. Your API key, as a bearer token: Authorization: Bearer YOUR_API_KEY.

The task's status, cost and, while it is valid, its token: for a challenge page, its clearance cookie and the user agent it is bound to. A task that named a callback URL shows it with where its delivery stands and each attempt: when, the HTTP status, and when the next is due.

Read with an API key, a task still queued or running is answered as soon as it ends, or after a few seconds as it is then: a client that polls gets its result the moment it is in, not at its next poll. A read with a session is answered at once.

Parameters

Parameters of Get a task
FieldWhat it is
idpathstring (uuid)Required

The task's ID.

Responses

Responses of Get a task
StatusWhat it means
200 OK

The task.

TaskView (application/json)

429 Too Many Requests

Over a budget for reading (rate_limited); retry after Retry-After, and poll less often.

Problem (application/problem+json)

Any other status

An error, as RFC 9457 problem details.

Problem (application/problem+json)

Error codes

The errors reference says what each means, whether a retry helps and what it costs.

Request

Terminal window
curl https://api.zerocaptcha.io/v1/tasks/0192f3a4-7b1c-7d2e-9f10-3c4d5e6f7a8b \
-H "Authorization: Bearer YOUR_API_KEY"

Response

200 OK TaskView (application/json)

{
  "action": null,
  "attempts": 1,
  "callback": null,
  "cdata": null,
  "cost": "0.000000",
  "createdAt": "2026-10-01T00:00:00Z",
  "deadline": "2026-10-01T00:00:00Z",
  "errorCode": null,
  "errorDescription": null,
  "finishedAt": null,
  "held": "0.000400",
  "id": "0192f3a4-7b1c-7d2e-9f10-3c4d5e6f7a8b",
  "idempotencyKey": null,
  "kind": "turnstile",
  "maxAttempts": 1,
  "price": "0.000400",
  "solution": null,
  "startedAt": null,
  "status": "queued",
  "tokenExpiresAt": null,
  "tokenIssuedAt": null,
  "tokenState": "pending",
  "type": "TurnstileTaskProxyless",
  "updatedAt": "2026-10-01T00:00:00Z",
  "usesProxy": false,
  "version": 1,
  "websiteKey": "0x4AAAAAAAB1cD2eF3gH4iJ5",
  "websiteURL": "https://example.com/login"
}

Example values in the contract's shape, version 0.1.0.

Send a task's callback again

POST/v1/tasks/{id}/callback/resend

Authentication. Your API key, as a bearer token: Authorization: Bearer YOUR_API_KEY.

Calls the task's callback URL again, as soon as the worker gets to it, with eight more attempts if it fails: once the callback was delivered or given up, or after its record was deleted. It is signed and shaped as the first call was, and carries the same ZeroCaptcha-Delivery ID while its record lasts. A key needs the tasks:write scope; a session must be an owner's (role_required), with the CSRF token. A suspended account sends none (account_suspended).

Parameters

Parameters of Send a task's callback again
FieldWhat it is
idpathstring (uuid)Required

The task's ID.

Responses

Responses of Send a task's callback again
StatusWhat it means
202 Accepted

Queued: the callback as it stands now.

TaskCallback (application/json)

403 Forbidden

A member's session, not an owner's (role_required), a key without tasks:write (insufficient_scope), or a suspended account (account_suspended).

Problem (application/problem+json)

404 Not Found

No task of this account has this ID, or the task names no callback URL (not_found).

Problem (application/problem+json)

409 Conflict

The task has not ended yet, or its callback is still being delivered (state_conflict).

Problem (application/problem+json)

Any other status

An error, as RFC 9457 problem details.

Problem (application/problem+json)

Error codes

The errors reference says what each means, whether a retry helps and what it costs.

Request

Terminal window
curl -X POST https://api.zerocaptcha.io/v1/tasks/0192f3a4-7b1c-7d2e-9f10-3c4d5e6f7a8b/callback/resend \
-H "Authorization: Bearer YOUR_API_KEY"

Response

202 Accepted TaskCallback (application/json)

{
  "attempts": [
    {
      "attempt": 1,
      "error": null,
      "finishedAt": "2026-10-01T00:00:00Z",
      "nextAttemptAt": null,
      "outcome": "delivered",
      "startedAt": "2026-10-01T00:00:00Z",
      "statusCode": null
    }
  ],
  "maxAttempts": 1,
  "nextAttemptAt": null,
  "resentAt": null,
  "status": "waiting",
  "url": "https://example.com/callback"
}

Example values in the contract's shape, version 0.1.0.

Report a task's token

POST/v1/tasks/{id}/report

Authentication. Your API key, as a bearer token: Authorization: Bearer YOUR_API_KEY.

Says whether the site accepted a solved task's token: bad when it refused it, good when it worked. The report is recorded for our staff, who watch the solvers' quality with it; tasks are final, so it refunds nothing. One report per task, and only on a task that succeeded. Needs the tasks:write scope; with a session, the CSRF token.

Parameters

Parameters of Report a task's token
FieldWhat it is
idpathstring (uuid)Required

The task's ID.

Request body JSON · NewTaskReport

Fields of the request body
FieldWhat it is
verdictVerdictRequired

bad when the site refused the token, good when it accepted it.

One of bad, good

Responses

Responses of Report a task's token
StatusWhat it means
201 Created

Recorded.

TaskReport (application/json)

404 Not Found

No task of this account has this ID (not_found).

Problem (application/problem+json)

409 Conflict

The task did not succeed, so there is no token to report on, or it has a report already (state_conflict).

Problem (application/problem+json)

Any other status

An error, as RFC 9457 problem details.

Problem (application/problem+json)

Error codes

The errors reference says what each means, whether a retry helps and what it costs.

Request

Terminal window
curl -X POST https://api.zerocaptcha.io/v1/tasks/0192f3a4-7b1c-7d2e-9f10-3c4d5e6f7a8b/report \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"verdict": "bad"
}'

Response

201 Created TaskReport (application/json)

{
  "reportedAt": "2026-10-01T00:00:00Z",
  "taskId": "0192f3a4-7b1c-7d2e-9f10-3c4d5e6f7a8b",
  "verdict": "bad"
}

Example values in the contract's shape, version 0.1.0.