Create project group mapping
POST/api/v1/workspaces/{workspace_slug}/group-sync/project-mappings/
Create a new IdP group → project mapping. Use project to map to a specific project, or all_projects: true to map to all projects in the workspace. These two fields are mutually exclusive.
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.
Body Parameters
idp_group_name:requiredstringThe name of the IdP group to map.
role:requiredstringProject 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
Create project group mapping
bash
curl -X POST \
"https://api.plane.so/api/v1/workspaces/my-workspace/group-sync/project-mappings/" \
-H "X-API-Key: $PLANE_API_KEY" \
# Or use -H "Authorization: Bearer $PLANE_OAUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"idp_group_name": "engineering",
"project": "ENG",
"role": "member"
}'python
import requests
response = requests.post(
"https://api.plane.so/api/v1/workspaces/my-workspace/group-sync/project-mappings/",
headers={"X-API-Key": "your-api-key"},
json={
"idp_group_name": "engineering",
"project": "ENG",
"role": "member"
}
)
print(response.json())javascript
const response = await fetch("https://api.plane.so/api/v1/workspaces/my-workspace/group-sync/project-mappings/", {
method: "POST",
headers: {
"X-API-Key": "your-api-key",
"Content-Type": "application/json",
},
body: JSON.stringify({
idp_group_name: "engineering",
project: "ENG",
role: "member",
}),
});
const data = await response.json();Response201
json
{
"id": "661f9511-f30c-52e5-b827-557766551111",
"idp_group_name": "engineering",
"project": "ENG",
"all_projects": false,
"role": "member",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
