# Project Groups

Manage project groups — named buckets of projects — and their project assignments. Owner/Executive Manager role only. A project may belong to only ONE group: assigning a project that is already grouped returns 422. The public group id is an opaque encoded string; `project_id` in assign/unassign is a raw integer project id.

 - [GET /project-groups](https://api-docs.webwork-tracker.com/api/project-groups/getprojectgroups.md): List workspace project groups, paginated. Each group includes its assigned projects (the workspace's live projects only — deleted ones are omitted). **Access**: Owner / Executive Manager only.
 - [POST /project-groups](https://api-docs.webwork-tracker.com/api/project-groups/createprojectgroup.md): Create a project group. `name` is required, trimmed, max 70 chars, and unique per workspace (else 422). The group is created empty — use the assign endpoint to add projects to it. **Access**: Owner /
 - [GET /project-groups/{project_group_id}](https://api-docs.webwork-tracker.com/api/project-groups/getprojectgroup.md): Retrieve one project group by its opaque encoded id, with its assigned projects. **Access**: Owner / Executive Manager only.
 - [PUT /project-groups/{project_group_id}](https://api-docs.webwork-tracker.com/api/project-groups/updateprojectgroup.md): Rename a project group. When present, `name` follows the same rules as create (trimmed non-empty, max 70, unique per workspace); a body that omits `name` entirely changes nothing and returns 200 with
 - [DELETE /project-groups/{project_group_id}](https://api-docs.webwork-tracker.com/api/project-groups/deleteprojectgroup.md): Delete a project group and all of its project assignments. The projects themselves are not deleted — they simply become group-free. **Access**: Owner / Executive Manager only.
 - [POST /project-groups/{project_group_id}/assign/{project_id}](https://api-docs.webwork-tracker.com/api/project-groups/assignprojectgroupproject.md): Assign a project to a project group. **A project may belong to only one group**: if the project is already in this group, or in any other group of the workspace, the request returns 422 — unassign it
 - [DELETE /project-groups/{project_group_id}/unassign/{project_id}](https://api-docs.webwork-tracker.com/api/project-groups/unassignprojectgroupproject.md): Remove a project from a project group, leaving it group-free. The project itself is not deleted. Returns 404 if the project is not assigned to that group. **Access**: Owner / Executive Manager only.
