Box Developer Documentation

Join BoxWorks 2024 to discover what's possible with content and AI!

Register now!

Unassign a task

Unassign a task

To unassign a task, you will need to provide the DELETE /task_assignments API with the id of the task assignment.

cURL
curl -i -X DELETE "https://api.box.com/2.0/task_assignments/12345" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
TypeScript Gen
await client.taskAssignments.deleteTaskAssignmentById(taskAssignment.id!);
Python Gen
client.task_assignments.delete_task_assignment_by_id(task_assignment.id)
.NET Gen
await client.TaskAssignments.DeleteTaskAssignmentByIdAsync(taskAssignmentId: NullableUtils.Unwrap(taskAssignment.Id));
Swift Gen (Beta)
try await client.taskAssignments.deleteTaskAssignmentById(taskAssignmentId: taskAssignment.id!)
Java
BoxTaskAssignment taskAssignment = new BoxTaskAssignment(api, "id");
taskAssignment.delete();
Python
client.task_assignment(assignment_id='12345').delete()
print('The task assignment was successfully delete!')
.NET
await client.TasksManager.DeleteTaskAssignmentAsync("12345");
Node
client.tasks.deleteAssignment('12345')
	.then(() => {
		// deletion succeeded — no value returned
	});

Permissions

The user deleting the assignment needs to be a collaborator on the file.