Assign task


Assigns a task to a user.

A task can be assigned to more than one user by creating multiple assignments.



Request Body

objectin body

The user to assign the task to.

stringin bodyrequired

The ID of the user to assign to the task.

To specify a user by their email address use the login parameter.

stringin bodyrequired

The email address of the user to assign to the task. To specify a user by their user ID please use the id parameter.

objectin body

The task to assign to a user.

stringin bodyrequired

The ID of the task

stringin bodyrequired

The type of the item to assign.

Value is always task


application/jsonTask assignment

Returns a new task assignment object.

application/jsonClient error

Returns an error if a change is attempted for a completed task or the user does not have access to the item linked to the task for the given task assignment.

application/jsonClient error

Returns an error when the task cannot be found.

application/jsonClient error

Returns an error if any of the IDs for this request were not valid, or if the targeted user does not have access to the file.

application/jsonClient error

An unexpected client error.

Assign task
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

curl -i -X POST "" \
     -H "authorization: Bearer <ACCESS_TOKEN>" \
     -H "content-type: application/json" \
     -d '{
       "task": {
         "id": "11446498",
         "type": "task"
       "assign_to": {
         "id": "4823213"
// Assign task 11111 to user 22222
var assignmentParams = new BoxTaskAssignmentRequest()
    Task = new BoxTaskRequest()
        Id = "11111"
    AssignTo = new BoxAssignmentRequest()
        Id = "22222"
BoxTaskAssignment assignment = await client.TasksManager.CreateTaskAssignmentAsync(assignmentParams);
BoxUser user = new BoxUser(api, "user-id")
BoxTask task = new BoxTask(api, "id");
user = client.user(user_id='11111')
assignment = client.task(task_id='12345').assign(user)
print(f'Assignment ID is {} and is assigned to user {}')
// Assign task 11111 to user 22222
var taskID = '11111';
var userID = '22222';
client.tasks.assignByUserID(taskID, userID)
	.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: null,
			completed_at: null,
			assigned_at: '2013-05-10T11:43:41-07:00',
			reminded_at: null,
			resolution_state: 'incomplete',
			{ type: 'user',
				id: '33333',
				name: 'Example User',
				login: '' } }
TypeScript (Beta)
await client.taskAssignments.createTaskAssignment({
  task: {
    type: 'task' as CreateTaskAssignmentRequestBodyTaskTypeField,
  } satisfies CreateTaskAssignmentRequestBodyTaskField,
  assignTo: {
  } satisfies CreateTaskAssignmentRequestBodyAssignToField,
} satisfies CreateTaskAssignmentRequestBody);
Python (Beta)
client.task_assignments.create_task_assignment(task=CreateTaskAssignmentTask(type=CreateTaskAssignmentTaskTypeField.TASK.value,, assign_to=CreateTaskAssignmentAssignTo(
.NET (Beta)
await client.TaskAssignments.CreateTaskAssignmentAsync(requestBody: new CreateTaskAssignmentRequestBody(task: new CreateTaskAssignmentRequestBodyTaskField(type: CreateTaskAssignmentRequestBodyTaskTypeField.Task, id: NullableUtils.Unwrap(task.Id)), assignTo: new CreateTaskAssignmentRequestBodyAssignToField(id: currentUser.Id))).ConfigureAwait(false)

Response Example

  "id": "11446498",
  "type": "task_assignment",
  "assigned_at": "2012-12-12T10:53:43-08:00",
  "assigned_by": {
    "id": "11446498",
    "type": "user",
    "login": "",
    "name": "Aaron Levie"
  "assigned_to": {
    "id": "11446498",
    "type": "user",
    "login": "",
    "name": "Aaron Levie"
  "completed_at": "2012-12-12T10:53:43-08:00",
  "item": {
    "id": "12345",
    "type": "file",
    "etag": "1",
    "file_version": {
      "id": "12345",
      "type": "file_version",
      "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
    "name": "Contract.pdf",
    "sequence_id": "3",
    "sha1": "85136C79CBF9FE36BB9D05D0639C70C265C18D37"
  "message": "Please review",
  "reminded_at": "2012-12-12T10:53:43-08:00",
  "resolution_state": "incomplete"