# Updates a task's order in a task list.

POST https://api.awork.com/api/v1/projects/{projectId}/tasklists/{taskListId}/tasks/{taskId}/updateorder

Updates the specified task's position in the task list.
            <Check title="Required Permissions" icon="key">The user must have `project-planning-data:write` permission for the project and task.</Check>

## Request example

```sh
curl -X POST --globoff 'https://api.awork.com/api/v1/projects/{projectId}/tasklists/{taskListId}/tasks/{taskId}/updateorder' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  --data '{
  "order": 4
}'
```

- path parameter `projectId`: string (required). The id of the project.

- path parameter `taskListId`: string (required). The id of the task list.

- path parameter `taskId`: string (required). The id of the task.

## Request body (application/json)

- `order`: number or null

## Response 200

OK

application/json

```json
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "order": 3
  }
]
```

## Response 400

Bad Request

application/json

```json
{
  "code": "not-found",
  "description": "There is no matching path for this URL.",
  "link": "https://developers.awork.com",
  "details": [
    "No project with the id '123' exists."
  ],
  "validationErrors": [
    {
      "property": "FirstName",
      "message": "FirstName is required."
    }
  ],
  "traceId": "a65ce5745df02af216715ff06661fb3a"
}
```

## Response 401

Unauthorized

application/json

```json
{
  "code": "not-found",
  "description": "There is no matching path for this URL.",
  "link": "https://developers.awork.com",
  "details": [
    "No project with the id '123' exists."
  ],
  "validationErrors": [
    {
      "property": "FirstName",
      "message": "FirstName is required."
    }
  ],
  "traceId": "a65ce5745df02af216715ff06661fb3a"
}
```
