0

Edit Guest On Workspace

by
Published Oct 17, 2025

Configure options for a guest. \ \ ***Note:** This endpoint is only available to Workspaces on our [Enterprise Plan](https://clickup.com/pricing).*

Script clickup Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
type Clickup = {
3
  token: string;
4
};
5
/**
6
 * Edit Guest On Workspace
7
 * Configure options for a guest. \
8
 \
9
***Note:** This endpoint is only available to Workspaces on our [Enterprise Plan](https://clickup.com/pricing).*
10
 */
11
export async function main(
12
  auth: Clickup,
13
  team_id: string,
14
  guest_id: string,
15
  body: {
16
    can_see_points_estimated?: false | true;
17
    can_edit_tags?: false | true;
18
    can_see_time_spent?: false | true;
19
    can_see_time_estimated?: false | true;
20
    can_create_views?: false | true;
21
    custom_role_id?: number;
22
  },
23
) {
24
  const url = new URL(
25
    `https://api.clickup.com/api/v2/team/${team_id}/guest/${guest_id}`,
26
  );
27

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