Menu
Amazon Mechanical Turk
API Reference (API Version 2017-01-17)

RejectAssignment

Description

The RejectAssignment operation rejects the results of a completed assignment.

You must include a feedback message with the rejection, which the Worker can see in the Status section of the web site. When you include a feedback message with the rejection, it helps the Worker understand why the assignment was rejected, and can improve the quality of the results the Worker submits in the future.

Only the Requester who created the HIT can reject an assignment for the HIT.

Note

To maintain the consistency of the assignments for HITs in a batch, if a HIT is created through the Amazon Mechanical Turk Requester website, you must use the Requester website UI to approve or reject the work.

If you want to be able to approve or reject work through the API, you can use a HITLayout when calling CreateHIT to utilize an existing template from the Amazon Mechanical Turk Requester website

Request Syntax

Copy
{ "AssignmentId": String, "RequesterFeedback": String }

Request Parameters

The request accepts the following data in JSON format:

Name Description Required

AssignmentId

The ID of the assignment. This parameter must correspond to a HIT created by the Requester.

Type: String

Yes

RequesterFeedback

A message for the Worker, which the Worker can see in the Status section of the web site.

Type: String

Constraints: Can be up to 1024 characters (including multi-byte characters). The RequesterFeedback parameter cannot contain ASCII characters 0-8, 11,12, or 14-31. If these characters are present, the operation throws an InvalidParameterValue error.

Yes

Response Elements

A successful request for the RejectAssignment operation returns with no errors and an empty body.

Example

The following example shows how to use the RejectAssignment operation:

Sample Request

The following example rejects an assignment identified by its assignment ID.

Copy
POST / HTTP/1.1 Host: mturk-requester.us-east-1.amazonaws.com Content-Length: <PayloadSizeBytes> X-Amz-Date: <Date> { AssignmentId:"123RVWYBAZW00EXAMPLE456RVWYBAZW00EXAMPLE" }

Sample Response

The following is an example response:

Copy
HTTP/1.1 200 OK x-amzn-RequestId: <RequestId> Content-Type: application/x-amz-json-1.1 Content-Length: <PayloadSizeBytes> Date: <Date>