0

Delete Group

by
Published Oct 17, 2025

This endpoint is used to remove a [User Group](https://docs.clickup.com/en/articles/4010016-teams-how-to-create-user-groups) from your Workspace.\ \ In our API documentation, `team_id` refers to the id of a Workspace, and `group_id` refers to the id of a user group.

Script clickup Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
type Clickup = {
3
  token: string;
4
};
5
/**
6
 * Delete Group
7
 * This endpoint is used to remove a [User Group](https://docs.clickup.com/en/articles/4010016-teams-how-to-create-user-groups) from your Workspace.\
8
 \
9
In our API documentation, `team_id` refers to the id of a Workspace, and `group_id` refers to the id of a user group.
10
 */
11
export async function main(auth: Clickup, group_id: string) {
12
  const url = new URL(`https://api.clickup.com/api/v2/group/${group_id}`);
13

14
  const response = await fetch(url, {
15
    method: "DELETE",
16
    headers: {
17
      Authorization: auth.token,
18
    },
19
    body: undefined,
20
  });
21
  if (!response.ok) {
22
    const text = await response.text();
23
    throw new Error(`${response.status} ${text}`);
24
  }
25
  return await response.json();
26
}
27