0

Update List

by
Published Oct 17, 2025

Rename a List, update the List Info description, set a due date/time, set the List's priority, set an assignee, set or remove the List color.

Script clickup Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
type Clickup = {
3
  token: string;
4
};
5
/**
6
 * Update List
7
 * Rename a List, update the List Info description, set a due date/time, set the List's priority, set an assignee, set or remove the List color.
8
 */
9
export async function main(
10
  auth: Clickup,
11
  list_id: string,
12
  body: {
13
    name: string;
14
    content?: string;
15
    markdown_content?: string;
16
    due_date?: number;
17
    due_date_time?: false | true;
18
    priority?: number;
19
    assignee?: string;
20
    status?: string;
21
    unset_status?: false | true;
22
  },
23
) {
24
  const url = new URL(`https://api.clickup.com/api/v2/list/${list_id}`);
25

26
  const response = await fetch(url, {
27
    method: "PUT",
28
    headers: {
29
      "Content-Type": "application/json",
30
      Authorization: auth.token,
31
    },
32
    body: JSON.stringify(body),
33
  });
34
  if (!response.ok) {
35
    const text = await response.text();
36
    throw new Error(`${response.status} ${text}`);
37
  }
38
  return await response.json();
39
}
40