---
title: "Archives or unarchives the task list with the specified id."
method: POST
path: "/projects/{projectId}/tasklists/{taskListId}/setarchived"
tags: ["taskLists"]
---

# Archives or unarchives the task list with the specified id.

`POST /projects/{projectId}/tasklists/{taskListId}/setarchived`

Archives or unarchives the task list with the specified id.
            An archived task list still exists but is not editable anymore.

<Check title="Required Permissions" icon="key">Any authenticated user.</Check>

## Path parameters

- `projectId` string, uuid, required
- `taskListId` string, uuid, required

## Headers

- `Authorization` string, required

## Request body

- ArchivedTaskListForm
  - `isArchived` boolean — Flags the entity as archived.
  - `taskOperation` string, nullable — The operation for tasks which are not yet done. The operation is required if you set a list to archived. Can be: task-to-done: Set tasks to 'Done' or the first status of type 'done'. task-remove: Remove tasks from this task list. task-move: Move tasks to another list. task-delete: Deletes the non done tasks.
  - `taskListId` string, uuid, nullable — The id of the task list where all non done tasks should moved to. Only necessary if TaskOperation is set to 'task-move'.
  - `deleteTimeTrackings` boolean, nullable — Set to true to delete also the related time trackings of all non done tasks. Only necessary if TaskOperation is set to 'task-delete'.

## Response `200`

OK

- TaskList — Represents a full task list with calculated duration properties. Extends TaskList with additional computed fields.
  - `id` string, uuid — The id of the task list.
  - `createdOn` string, date-time — The date this task list was created.
  - `createdBy` string, uuid — The id of the user who created this task list.
  - `updatedOn` string, date-time — The date this task list was last modified.
  - `updatedBy` string, uuid — The id of the user who last modified this task list.
  - `name` string, nullable — The name of the list.
  - `order` number, double, nullable — The order of the list.
  - `plannedDuration` integer, nullable — The planned duration for this task list, in seconds.
  - `totalPlannedDuration` integer, nullable — The total planned duration for this task list, including all primary tasks (parent tasks which have this tacklist as PrimaryTaskListId), in seconds. Calculated: sum PlannedDuration of primary tasks in list Archived task lists are not included in the calculation.
  - `totalPlannedDurationWithHierarchy` integer, nullable — The total planned duration for this task list, including all primary tasks (parent tasks which have this task list as PrimaryTaskListId), in seconds. Calculated: max(PlannedDuration, sum TotalPlannedDurationWithHierarchy of primary tasks in list) Archived task lists are not included in the calculation.
  - `isArchived` boolean — Whether the task list has been archived.
  - `isHiddenForConnectUsers` boolean — True if the task in this list will be not visible for external workspace users. False otherwise.
  - `trackedDuration` integer — The total duration of time trackings for tasks in this task list, in seconds. Includes both billable and non-billable time trackings. Backend-calculated property. When hierarchy feature flag is enabled: only tasks with PrimaryTaskListId == this list. When hierarchy feature flag is disabled: all tasks associated with this list.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found

---

[API](https://skmtc.dev/awork-io/apis/api-v1-reference.md) · [All operations](https://skmtc.dev/awork-io/apis/api-v1-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/awork-io/api-v1-reference/revisions/a13e7c704262/schema)
