Change task assignment state

Guides Tasks Assigning tasks Change task assignment state
Edit this page

Change task assignment state

To update a task assignment's state call the PUT /tasks/:task_id/assignments API and include a resolution_state, such as completed, incomplete, approved, or rejected.

curl -i -X PUT "" \
     -H "authorization: Bearer <ACCESS_TOKEN>" \
     -H "content-type: application/json" \
     -d '{
       "message": "New message",
       "resolution_state": "completed"
var requestParams = new BoxTaskAssignmentUpdateRequest()
    Id = "12345",
    ResolutionState = ResolutionStateType.approved
BoxTaskAssignment updatedAssignment = await client.TasksManager.UpdateTaskAssignmentAsync(requestParams);
String assignmentID = "12345";
BoxTaskAssignment taskAssignment = new BoxTaskAssignment(api, assignmentID);
BoxTaskAssignment.Info info = taskAssignment.getInfo();
from boxsdk.object.task_assignment import ResolutionState
updated_task = {'resolution_state': ResolutionState.APPROVED}
updated_assignment = client.task_assignment(assignment_id='12345').update_info(data=updated_task)
print(f'Assignment ID is {} and resolution state is {updated_assignment.resolution_state}')
// Complete a task
		message: 'Done!',
		resolution_state: client.tasks.resolutionStates.COMPLETE
	.then(assignment => {
		/* assignment -> {
			type: 'task_assignment',
			id: '12345',
			{ type: 'file',
				id: '33333',
				sequence_id: '0',
				etag: '0',
				sha1: '7840095ee096ee8297676a138d4e316eabb3ec96',
				name: 'script.js' },
			{ type: 'user',
				id: '22222',
				name: 'Sample Assignee',
				login: '' },
			message: 'Done!',
			completed_at: null,
			assigned_at: '2013-05-10T11:43:41-07:00',
			reminded_at: null,
			resolution_state: 'complete',
			{ type: 'user',
				id: '33333',
				name: 'Example User',
				login: '' } }
TypeScript Gen
await client.taskAssignments.updateTaskAssignmentById(!, {
  requestBody: {
    message: 'updated message',
      'approved' as UpdateTaskAssignmentByIdRequestBodyResolutionStateField,
  } satisfies UpdateTaskAssignmentByIdRequestBody,
} satisfies UpdateTaskAssignmentByIdOptionalsInput);
Python Gen
    message="updated message",
.NET (Beta)
await client.TaskAssignments.UpdateTaskAssignmentByIdAsync(taskAssignmentId: NullableUtils.Unwrap(taskAssignment.Id), requestBody: new UpdateTaskAssignmentByIdRequestBody() { Message = "updated message", ResolutionState = UpdateTaskAssignmentByIdRequestBodyResolutionStateField.Approved });

Resolution states

Box currently supports two types of tasks defined by the action value: review tasks and complete tasks.

The type of task determines the possible resolution states a task can be in and the interface shown to a user in the web and mobile apps.

Task actionPossible resolution states
reviewincomplete, approved, rejected
completeincomplete, complete

A review task starts out in an incomplete state and can be marked as incomplete, approved, or rejected. In the user interface a user is provided with a text box and an pair of buttons to approve or reject the task.

A complete task starts out in an incomplete state and can be marked incomplete or completed. Once a this task is marked completed, no further changes can be made to the task's state. In the user interface a user is provided with a text box and an button to mark the task as completed.