# newTask - creating a task

# Description

This method creates a task for solving selected captcha type. In the parameters you need to pass the client authorization data, typed task data and other optional parameters.

# Request parameters required optional

string clientKey Your unique account key, API key (You can find it here)
object task Task object. See list of available object descriptions here.

# Request body example
{
  "clientKey": "67b6bcbb1a728ea8d563de6d169a2057",
  "task": {
    "type": "ImageToTextTask",
    "body": "BASE64_BODY_HERE!"
  }
}
{
  "clientKey":"67b6bcbb1a728ea8d563de6d169a2057",
  "task": 
  {
	"type":"RecaptchaV2Task",
	"websiteURL":"https://example.com/test",
	"websiteKey":"6Lcg7CMUAAAAANphynKgn9YAgA4tQ2KI_iqRyTwd"
  }
}

# Response structure

int errorId Error identificator:
0 - no errors, the task has been successfully created, task ID located in taskId property
1 - error, information about it is in the errorCode property
string errorCode Error code. Check out error list.
int taskId Task ID for further use in result method.

# Response example
{
  "errorId": 0,
  "taskId": 7654321
}
{
	"errorId": 1,
	"errorCode": "ERROR_KEY_DOES_NOT_EXIST",
	"errorDescription": "Account authorization key not found in the system or has incorrect format"
}