---
title: "Assign task"
method: POST
path: "/task_assignments"
tags: ["Task assignments"]
---

# Assign task

`POST /task_assignments`

Assigns a task to a user.

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

## Request body

- object
  - `task` object, required — The task to assign to a user.
    - `id` string, required — The ID of the task.
    - `type` 'task', required — The type of the item to assign.
  - `assign_to` object, required — The user to assign the task to.
    - `id` string — The ID of the user to assign to the task. To specify a user by their email address use the `login` parameter.
    - `login` string — The email address of the user to assign to the task. To specify a user by their user ID please use the `id` parameter.

## Response `201`

Returns a new task assignment object.

- TaskAssignment — A task assignment defines which task is assigned to which user to complete.
  - `id` string — The unique identifier for this task assignment.
  - `type` 'task_assignment' — The value will always be `task_assignment`.
  - `item` object, nullable — The file that the task has been assigned to.
    - `id` string, required — The unique identifier that represent a file. The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`.
    - `etag` string, nullable — The HTTP `etag` of this file. This can be used within some API endpoints in the `If-Match` and `If-None-Match` headers to only perform changes on the file if (no) changes have happened.
    - `type` 'file', required — The value will always be `file`.
    - `sequence_id` string — A numeric identifier that represents the most recent user event that has been applied to this item. This can be used in combination with the `GET /events`-endpoint to filter out user events that would have occurred before this identifier was read. An example would be where a Box Drive-like application would fetch an item via the API, and then listen to incoming user events for changes to the item. The application would ignore any user events where the `sequence_id` in the event is smaller than or equal to the `sequence_id` in the originally fetched resource.
    - `name` string — The name of the file.
    - `sha1` string, digest — The SHA1 hash of the file. This can be used to compare the contents of a file on Box with a local file.
    - `file_version` object — The information about the current version of the file.
      - `id` string, required — The unique identifier that represent a file version.
      - `type` 'file_version', required — The value will always be `file_version`.
      - `sha1` string — The SHA1 hash of this version of the file.
  - `assigned_to` object — The user that the task has been assigned to.
    - `id` string, required — The unique identifier for this user.
    - `type` 'user', required — The value will always be `user`.
    - `name` string — The display name of this user.
    - `login` string, email — The primary email address of this user.
  - `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.
  - `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.
  - `assigned_at` string, date-time — The date at which this task was assigned to the user.
  - `reminded_at` string, date-time — The date at which the assigned user was reminded of this task assignment.
  - `resolution_state` 'completed' | 'incomplete' | 'approved' | 'rejected' — The current state of the assignment. The available states depend on the `action` value of the task object.
  - `assigned_by` object — The user who assigned this task.
    - `id` string, required — The unique identifier for this user.
    - `type` 'user', required — The value will always be `user`.
    - `name` string — The display name of this user.
    - `login` string, email — The primary email address of this user.

## Other responses

- `403` — 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.
- `404` — Returns an error when the task cannot be found.
- `500` — 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.
- `default` — An unexpected client error.

---

[API](https://skmtc.net/box/apis/platform-api.md) · [All operations](https://skmtc.net/box/apis/platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/box/platform-api/revisions/ba8f087e1a4d/schema)
