curl -X POST https://api.portkey.ai/v1/scim/workspaces \
-H "x-portkey-api-key: PORTKEY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"scim_group_name": "Engineering Team",
"workspace_id": "ws_my-workspace",
"role": "member"
}'{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"workspace_id": "ws-12345",
"scim_group": "Engineering Team",
"role": "member",
"scim_group_id": "d290f1ee-6c54-4b01-90e6-d701748f0851"
}Create SCIM Workspace Mapping
Create a mapping between a SCIM group and a workspace. You can either reference an existing SCIM group by ID, or provide a group name to pre-create the SCIM group before the IdP provisions it.
POST
/
scim
/
workspaces
curl -X POST https://api.portkey.ai/v1/scim/workspaces \
-H "x-portkey-api-key: PORTKEY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"scim_group_name": "Engineering Team",
"workspace_id": "ws_my-workspace",
"role": "member"
}'{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"workspace_id": "ws-12345",
"scim_group": "Engineering Team",
"role": "member",
"scim_group_id": "d290f1ee-6c54-4b01-90e6-d701748f0851"
}A single SCIM group can be mapped to multiple workspaces. Call this endpoint once per (group, workspace) pair. If the same (group, workspace, role) mapping already exists, the existing mapping is returned and no duplicate is created.
The same SCIM group must use the same role across every workspace it is mapped to. If the group already has an active mapping with a different role, this request is rejected with a validation error such as:To change the role, delete the existing mapping(s) first and re-create them with the new role.
SCIM group is already mapped to other workspace(s) with role '<existing-role>'.
A group can only be mapped with a single role across workspaces.
Portkey is now PRISMA AIRS AI Gateway. See it in action.
Contact Us
Body
application/json
- Option 1
- Option 2
Last modified on August 6, 2026
Was this page helpful?

