A Team groups colleagues across an Organisation's Projects. Its people are Managers (manager_ids; leaders in older screens) and Members (member_ids). A Team can add the people who join it to Projects automatically: when auto_add_to_projects is true, someone joining is added, at that moment, to the Projects in auto_add_project_ids and to every open Project that one of the saved Projects page filters in auto_add_filter_ids matches. A new Manager gets auto_add_manager_role and a new Member auto_add_member_role: editor (Project Manager), reporter (Changemaker) or observer (Analyst). People who already have a role on a Project keep it, and someone removed from one of those Projects later isn't added back.
manager_ids, member_ids and its project auto-add settings" },
+ { code: "401", cls: "response-4xx", desc: "Not authenticated" },
+ { code: "404", cls: "response-4xx", desc: "Not found, or a Team of an Organisation you aren't in" }
+ ])}
+ ${endpointCard("PATCH", "/teams/{id}", "Set which Projects a Team adds people to", true, [
+ { name: "id", in: "path", type: "integer", required: true, desc: "Team ID" },
+ { name: "auto_add_to_projects", type: "boolean", required: false, desc: "Turn adding people to Projects on or off" },
+ { name: "auto_add_project_ids", type: "integer[]", required: false, desc: "Open Projects of the Team's Organisation (replaces the list)" },
+ { name: "auto_add_filter_ids", type: "integer[]", required: false, desc: "Saved Projects page filters you can use: saved_filters from GET /project_automations/options (replaces the list)" },
+ { name: "auto_add_manager_role", type: "string", required: false, desc: "editor, reporter or observer for a new Manager (default editor)" },
+ { name: "auto_add_member_role", type: "string", required: false, desc: "editor, reporter or observer for a new Member (default reporter)" }
+ ], [
+ { code: "200", cls: "response-2xx", desc: "The updated Team" },
+ { code: "401", cls: "response-4xx", desc: "Not authenticated" },
+ { code: "403", cls: "response-4xx", desc: "You aren't an Organisation Admin of the Team's Organisation" },
+ { code: "404", cls: "response-4xx", desc: "Not found, or a Team of an Organisation you aren't in" },
+ { code: "422", cls: "response-4xx", desc: "{errors: {field: [...]}}, e.g. another Organisation's Project or an unknown role" }
+ ], "Changes the Automatically add managers and members to projects settings, as the Create/Edit Team popup does. Send only the fields to change. It doesn't add the Team's current people to anything; people are added only as they join.")}
+ ${endpointCard("POST", "/teams/{id}/members", "Add colleagues to a Team", true, [
+ { name: "id", in: "path", type: "integer", required: true, desc: "Team ID" },
+ { name: "user_ids", type: "integer[]", required: true, desc: "Colleagues (users) already in the Team's Organisation" },
+ { name: "role", type: "string", required: true, desc: "member or manager" }
+ ], [
+ { code: "200", cls: "response-2xx", desc: "The Team, with the people added" },
+ { code: "401", cls: "response-4xx", desc: "Not authenticated" },
+ { code: "403", cls: "response-4xx", desc: "You aren't an Organisation Admin of the Team's Organisation" },
+ { code: "404", cls: "response-4xx", desc: "Not found, or a Team of an Organisation you aren't in" },
+ { code: "422", cls: "response-4xx", desc: "{errors: {field: [...]}}, e.g. someone who isn't a colleague, or an unknown role" }
+ ], "Adds people as the Create/Edit Team popup and the Teams tab of Invite a colleague do, leaving the Team's other people as they are. When the Team adds people to Projects, the ones who join are added to them too.")}
+