Tasks

Create a captcha-solving task

Submits a captcha for solving. The task object is a discriminated union keyed by task.type (and, for CustomTask, additionally by task.class). On success returns a taskId to be polled with getTaskResult.

post/createTask

Request body

clientKeystring required

Your account API key (from https://dash.capmonster.cloud). Authenticates the request.

softIdinteger

Optional developer/software identifier.

callbackUrlstring uri

Optional absolute URL. When set, the task result is POSTed to this address once solved, in addition to being available via getTaskResult.

Example request

{
  "clientKey": "API_KEY",
  "task": {
    "proxyAddress": "8.8.8.8",
    "proxyPort": 8080
  }
}

Response

Task accepted, or a business error encoded in the body (errorId non-zero). Auth and balance failures use 403 / 402 (below); other errors come back here with errorId: 1.

errorIdinteger required

0 = success, non-zero = error.

errorCode'ERROR_KEY_DOES_NOT_EXIST' | 'ERROR_ZERO_BALANCE' | 'ERROR_TOO_BIG_CAPTCHA_FILESIZE' | 'ERROR_ZERO_CAPTCHA_FILESIZE' | 'ERROR_NO_SUCH_CAPCHA_ID' | 'WRONG_CAPTCHA_ID' | 'ERROR_CAPTCHA_UNSOLVABLE' | 'CAPTCHA_NOT_READY' | 'ERROR_IP_NOT_ALLOWED' | 'ERROR_IP_BANNED' | 'ERROR_NO_SUCH_METHOD' | 'ERROR_TOO_MUCH_REQUESTS' | 'ERROR_DOMAIN_NOT_ALLOWED' | 'ERROR_TOKEN_EXPIRED' | 'ERROR_NO_SLOT_AVAILABLE' | 'ERROR_RECAPTCHA_INVALID_SITEKEY' | 'ERROR_RECAPTCHA_INVALID_DOMAIN' | 'ERROR_RECAPTCHA_TIMEOUT' | 'ERROR_IP_BLOCKED' | 'ERROR_PROXY_CONNECT_REFUSED' | 'ERROR_PROXY_BANNED' | 'ERROR_PROXY_MISSING' | 'ERROR_PROXY_NOT_AUTHORISED' | 'ERROR_PROXY_READ_TIMEOUT' | 'ERROR_TASK_NOT_SUPPORTED' | 'ERROR_TASK_ABSENT' | 'ERROR_WRONG_USERAGENT'

Machine-readable error code returned when errorId is non-zero.

errorDescriptionstring nullable
taskIdinteger

Identifier of the created task (use with getTaskResult). 0 on error.

Example response

{
  "taskId": 7654321
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.