Users, Groups, and Roles Reference
Endpoints for managing users, groups, and role assignments. For the conceptual model, see Tenants and Users and Permissions and Access.
Identities (users, groups, tenants) are primarily owned by ScaiKey. These endpoints proxy to ScaiKey for writes and surface the local cache for reads.
Required permission: Most endpoints require tenant admin or platform admin.
Users#
Base path: /api/v1/admin/users/
GET /admin/users/#
List users in the current tenant.
Query parameters:
| Param | Type | Notes |
|---|---|---|
page, page_size |
integer | Standard pagination |
status |
string | active, inactive |
search |
string | Substring match on email or name |
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | |
GET /admin/users/{user_id}#
Get a single user. Accepts either internal UUID or ScaiKey user ID.
POST /admin/users/#
Create a user (proxied to ScaiKey).
Request:
| Field | Type | Required |
|---|---|---|
email |
string | Yes |
first_name |
string | No |
last_name |
string | No |
display_name |
string | No |
password |
string | No (if omitted, invite email is sent) |
tenant_id |
string | No (defaults to caller's tenant) |
Response: Created user.
PATCH /admin/users/{user_id}#
Update user profile fields.
DELETE /admin/users/{user_id}#
Disable user in ScaiKey. Does not hard-delete — the user can be reactivated.
POST /admin/users/{user_id}/password#
Reset a user's password.
Request: {"password": "new-password"}
POST /admin/users/invite#
Send an invitation email for a new user.
POST /admin/users/{user_id}/resend-invite#
Resend an invitation email.
Groups#
Base path: /api/v1/admin/groups/
GET /admin/groups/#
List groups in the current tenant.
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
POST /admin/groups/#
Create a group.
Request:
| Field | Type | Required |
|---|---|---|
name |
string | Yes |
description |
string | No |
group_type |
string | No — SECURITY (default) or DISTRIBUTION_LIST |
GET /admin/groups/{group_id}#
Get a single group.
PATCH /admin/groups/{group_id}#
Update group metadata.
DELETE /admin/groups/{group_id}#
Delete a group. Members are unaffected (their membership is removed).
GET /admin/groups/{group_id}/members#
List group members.
Response:
1 2 3 4 5 6 | |
POST /admin/groups/{group_id}/members#
Add a user to a group.
Request: {"member_id": "u_abc123"}
DELETE /admin/groups/{group_id}/members/{member_id}#
Remove a user from a group.
Roles#
Base path: /api/v1/roles/
GET /roles/#
List roles available in the tenant.
Query parameters:
| Param | Type | Notes |
|---|---|---|
include_system |
boolean | Include built-in roles (default true) |
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | |
GET /roles/{role_id}#
Get a single role.
POST /roles/#
Create a custom role (tenant admin only). Cannot grant permissions the creator doesn't have.
Request:
1 2 3 4 5 6 7 8 | |
PATCH /roles/{role_id}#
Update a custom role (cannot modify system roles).
DELETE /roles/{role_id}#
Delete a custom role. Role assignments referencing it are removed.
GET /roles/users/{user_id}#
List a user's role assignments.
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
POST /roles/users/{user_id}#
Assign a role to a user.
Request:
1 2 3 4 5 6 | |
Scopes: platform, tenant, domain. For domain scope, scope_resource_id is required.
DELETE /roles/users/{user_id}/{assignment_id}#
Remove a role assignment.
POST /roles/groups/{group_id}#
Assign a role to a group. Members inherit it.
Request: Same as user assignment.
DELETE /roles/groups/{group_id}/{assignment_id}#
Remove a group's role assignment.
GET /roles/users/{user_id}/permissions#
Get a user's resolved effective permissions.
Query parameters:
| Param | Type | Notes |
|---|---|---|
domain_id |
string | Include per-domain access grants |
Response:
1 2 3 4 5 6 7 8 9 10 11 12 | |
Error codes#
| Status | Meaning |
|---|---|
403 |
Caller isn't tenant admin (or platform admin) |
404 |
User, group, or role not found |
409 |
Role already assigned with the same scope |
422 |
Invalid role permissions (can't grant what you don't have) |
Related#
- Permissions and Access — how authorization resolves.
- Tenants and Users — identity model.
- Access Grants — per-domain delegation.