Box Developer Documentation
Latest version

Assign task

post
https://api.box.com/2.0
/task_assignments

This endpoint is in the version 2024.0. No changes are required to continue using it. For more details, see Box API versioning.

Assigns a task to a user.

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

Request

bearer [ACCESS_TOKEN]
application/json

Request Body

objectin body

The user to assign the task to.

stringin bodyrequired
"3242343"

The ID of the user to assign to the task.

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

stringin bodyrequired
"john@example.com"

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
"11446498"

The ID of the task

stringin bodyrequired
"task"

The type of the item to assign.

Value is always task

Response

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.

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

Request Example

cURL
curl -i -X POST "https://api.box.com/2.0/task_assignments" \
     -H "authorization: Bearer <ACCESS_TOKEN>" \
     -H "content-type: application/json" \
     -d '{
       "task": {
         "id": "11446498",
         "type": "task"
       },
       "assign_to": {
         "id": "4823213"
       }
     }'

Response Example

{
  "id": "11446498",
  "type": "task_assignment",
  "assigned_at": "2012-12-12T10:53:43-08:00",
  "assigned_by": {
    "id": "11446498",
    "type": "user",
    "login": "ceo@example.com",
    "name": "Aaron Levie"
  },
  "assigned_to": {
    "id": "11446498",
    "type": "user",
    "login": "ceo@example.com",
    "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"
}