Skip to main content
POST
/
task_assignments
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"
       }
     }'
{
  "id": "11446498",
  "type": "task_assignment",
  "item": {
    "id": "12345",
    "type": "file",
    "etag": "1",
    "sequence_id": "3",
    "name": "Contract.pdf",
    "sha1": "85136C79CBF9FE36BB9D05D0639C70C265C18D37",
    "file_version": {
      "id": "12345",
      "type": "file_version",
      "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
    }
  },
  "assigned_to": {
    "id": "11446498",
    "type": "user",
    "name": "Aaron Levie",
    "login": "[email protected]"
  },
  "message": "Please review",
  "completed_at": "2012-12-12T10:53:43-08:00",
  "assigned_at": "2012-12-12T10:53:43-08:00",
  "reminded_at": "2012-12-12T10:53:43-08:00",
  "resolution_state": "incomplete",
  "assigned_by": {
    "id": "11446498",
    "type": "user",
    "name": "Aaron Levie",
    "login": "[email protected]"
  }
}
This endpoint is in the version 2024.0. No changes are required to continue using it. For more details, see Box API versioning.Learn more about Box SDK versioning strategy.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json
task
object
required

The task to assign to a user.

assign_to
object
required

The user to assign the task to.

Response

Returns a new task assignment object.

A task assignment defines which task is assigned to which user to complete.

id
string

The unique identifier for this task assignment.

Example:

"11446498"

type
enum<string>

The value will always be task_assignment.

Available options:
task_assignment
Example:

"task_assignment"

item
File (Mini) · object

The file that the task has been assigned to.

assigned_to
User (Mini) · object

The user that the task has been assigned to.

message
string

A message that will is included with the task assignment. This is visible to the assigned user in the web and mobile UI.

Example:

"Please review"

completed_at
string<date-time>

The date at which this task assignment was completed. This will be null if the task is not completed yet.

Example:

"2012-12-12T10:53:43-08:00"

assigned_at
string<date-time>

The date at which this task was assigned to the user.

Example:

"2012-12-12T10:53:43-08:00"

reminded_at
string<date-time>

The date at which the assigned user was reminded of this task assignment.

Example:

"2012-12-12T10:53:43-08:00"

resolution_state
enum<string>

The current state of the assignment. The available states depend on the action value of the task object.

Available options:
completed,
incomplete,
approved,
rejected
Example:

"incomplete"

assigned_by
User (Mini) · object

The user who assigned this task.