Update project group mapping by key
Update an existing IdP group → project mapping addressed by its project identifier and IdP group name instead of the mapping ID. Because a project can have multiple mappings (one per IdP group), both keys are required to identify the target. Supports partial updates.
Only project-scoped mappings can be addressed this way. Mappings with all_projects: true have no project identifier — update those by mapping ID with Update project group mapping.
Returns 404 when no project with the given identifier exists or the project has no mapping for the given IdP group name. An empty request body returns 400 with {"error": "Request body cannot be empty."}.
Path Parameters
workspace_slug:requiredstringThe workspace_slug represents the unique workspace identifier for a workspace in Plane. It can be found in the URL. For example, in the URL https://app.plane.so/my-team/projects/, the workspace slug is my-team.
project_key:requiredstringThe project identifier (e.g. ENG). Case-insensitive — the value is matched against the uppercase project identifier.
idp_group_name:requiredstringThe name of the IdP group the mapping belongs to. Matched exactly.
Body Parameters
idp_group_name:optionalstringThe name of the IdP group to map.
role:optionalstringProject role slug to assign to members of the IdP group (e.g. member, admin, guest).
project:optionalstringProject identifier to map the group to (e.g. ENG). Mutually exclusive with all_projects.
all_projects:optionalbooleanWhen true, maps the group to all projects in the workspace. Mutually exclusive with project.
Scopes
workspaces.group_sync:write
curl -X PATCH \
"https://api.plane.so/api/v1/workspaces/my-workspace/group-sync/project-mappings/ENG/engineering/" \
-H "X-API-Key: $PLANE_API_KEY" \
# Or use -H "Authorization: Bearer $PLANE_OAUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"role": "admin"
}'import requests
response = requests.patch(
"https://api.plane.so/api/v1/workspaces/my-workspace/group-sync/project-mappings/ENG/engineering/",
headers={"X-API-Key": "your-api-key"},
json={"role": "admin"}
)
print(response.json())const response = await fetch(
"https://api.plane.so/api/v1/workspaces/my-workspace/group-sync/project-mappings/ENG/engineering/",
{
method: "PATCH",
headers: {
"X-API-Key": "your-api-key",
"Content-Type": "application/json",
},
body: JSON.stringify({ role: "admin" }),
},
);
const data = await response.json();{
"id": "661f9511-f30c-52e5-b827-557766551111",
"idp_group_name": "engineering",
"project": "ENG",
"all_projects": false,
"role": "admin",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
