Create multiple task suites

Attention

The toloka.yandex.com domain will be disabled starting May 1, 2023. Please use the toloka.dev domain for API requests.

Creates multiple task suites.

Restriction

You can add a maximum of 100,000 tasks per minute and a maximum of 2,000,000 tasks per day. Refer to the Rate limiting section for the complete list of the request limitations in Toloka API.

Request

Production version
Sandbox
POST https://toloka.dev/api/v1/task-suites
Authorization: OAuth <OAuth token>
Content-Type: application/JSON
[{task suite 1}, {task suite 2},... {task suite N}]

Headers

TitleOverview
AuthorizationA token for account authorization. Add OAuth as a prefix.
Content-TypeSpecifies the data format in the request body.

Query parameters

Specified in the link after the question mark; separated by &.

ParameterOverview
async_mode

boolean

Mode for request processing:

  • true — Asynchronous. Creates an asynchronous operation that runs in the background. The response contains information about the operation (start and  completion time, status).
  • false — Synchronous. The response contains information about one or multiple task suites created.

    The default value is false.
allow_defaults

boolean

Overlap settings:

skip_invalid_items

boolean

Validation parameters for JSON objects:

  • true — Create the task suites that passed validation.
  • false — If at least one of the task suites didn't pass validation, stop the operation and don't create the task suites.

    The default value is false.
open_poolboolean

Open the pool immediately after the operation is completed, if the pool is closed. The default value is false.
operation_idstring

Operation ID for asynchronously loading one or more task suites (if async_mode=true).

We recommend sending the ID in the POST request to avoid accidental errors, such as creating the operation multiple times for the same task suites.

The ID should conform to the RFC4122 standard.

You can use this ID in the future to get information about the operation.

Response

The response format depends on the value of async_mode.

The task suites (async_mode=false)
Information about the operation (async_mode=true)
{
"items": {
"0": {<task suite>},
"2": {<task suite>}, ...
"<n>": {<task suite N>}
},
"validation_errors": {
"1": {<validation errors for the task suite>},
"3": {<validation errors for the task suite>}, ...
"<n>": {<validation errors for task suite N>}
}
}
ParameterOverview
itemsobject

An object with the created task suites.
validation_errorsobject

An object with the errors in task suites. Returned if the request has the parameter skip_invalid_items=true.
<n>object

Sequential number of the task suite in the array (starting from 0).
Contact support
Toloka API
OverviewAccessing the APIRate limiting
Quick start
Reference
Project
Pools
Training
Subscriptions to events
Toloker selection
Ways to upload tasks
Tasks
Task suites
Tracking operations
Getting responses
Checking completed tasks
Rewards
Messages for Tolokers
Various parameters
Libraries