Send a test notification

Attention

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

Sends a test notification to the URL specified in the subscription.

Request

Production version
Sandbox
POST https://toloka.dev/api/v1/webhook-subscriptions/<subscription_id>/test
Authorization: OAuth <OAuth token>

Path parameters

ParameterOverview
subscription_idID of the subscription.

Headers

TitleOverview
AuthorizationA token for account authorization. Add OAuth as a prefix.

Example of the notification body

{
"uuid": "uuid",
"event_time": "2020-02-14T12:22:58",
"project_id": "projectId",
"pool_id": "poolId",
"type": "TEST_EVENT"
}
ParameterOverview
uuidstring | required

Unique event number generated for each new request.
event_timestring | required

Time when the event occurs.
project_idstring | required

ID of the project that the pool was created for.
pool_idstring | required

ID of the pool that the subscription was created for.
typestring | required

Notification type.

Takes the TEST_EVENT value indicating a test notification.

Response

If the request is successful, the server returns the "200 Ok" or "404 Not Found" HTTP operation status.

{
"success": true,
"responseReceivedAt": "2020-02-14T12:22:58",
"errorType": "WRONG_STATUS_CODE",
"originalStatusCode": 1,
"uuids": ["uuid1", ..."uuid5"]
}
ParameterOverview
successboolean

Request execution status.

True or False.
responseReceivedAtstring

The UTC date and time when the subscription was created, in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].
errorType

string

Error type.

Acceptable values:

  • WRONG_STATUS_CODE — Invalid status code.
  • TOO_MANY_CONNECTIONS — Connection limit exceeded.
  • REQUEST_TIMEOUT — Request timeout.
  • CONNECTION_ERROR — Connection error.
  • INTERNAL_ERROR — Internal error.
  • UNKNOWN — Unknown error.
originalStatusCodeint

Status code of the response from the subscription URL.
uuidsarray of strings

Array of unique event numbers.
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