User Groups
API for user groups (workspaces)
User Groups (also known as Workspaces) enable teams to collaborate by sharing resources such as flows, data stores, and files. All resources are owned by the group rather than individual users, while maintaining audit trails for individual user actions.
Overview
All group resources are shared among group members
Individual user actions are tracked in audit logs
Admin users are automatically added to the "admin" user group
Users can switch between personal and group contexts
JWT tokens include group information for proper authorization
Create User Group
POST [TENANT_API_URL]/user-groups
Create a new user group. Admin token required.
curl -XPOST "https://api.appmixer.com/user-groups" \
-H "Authorization: Bearer [ADMIN_TOKEN]" \
-H "Content-type: application/json" \
-d '{ "name": "Marketing Team", "metadata": { "department": "marketing" } }'Request Body
name*
string
Name of the user group
metadata
object
Optional metadata for the group
List User Groups
GET [TENANT_API_URL]/user-groups
List all user groups. Admin users see all groups, regular users see only their own groups.
Get User Group
GET [TENANT_API_URL]/user-groups/:groupId
Get details of a specific user group. Users can only access groups they belong to, admins can access all groups.
Update User Group
PUT [TENANT_API_URL]/user-groups/:groupId
Update user group details. Admin token required.
Request Body
name
string
Updated name of the group
metadata
object
Updated metadata (replaces existing)
Delete User Group
DELETE [TENANT_API_URL]/user-groups/:groupId
Delete a user group. Admin token required. This will remove the group and revoke all group member access to shared resources.
Deleting a group that still owns flows is rejected with a 400 error — transfer the group's resources first (see Transfer Resources), or pass ?force=true to delete the group together with all its resources.
Query Parameters
force
boolean
Delete the group even if it still owns resources; all its resources are removed too.
Transfer Resources
PUT [TENANT_API_URL]/resources/transfer
Transfer all resources (flows, accounts, access tokens, flow versions, data stores, files, telemetry, ...) from a user or group to another user or group. Admin token required.
Typical use cases: an employee leaving (transfer their resources to a group or a colleague), or consolidating group ownership.
The transfer runs as a background task — the endpoint returns 202 Accepted with a ticket. The source user is blocked (metadata.blocked) before the transfer starts to prevent API access during the migration; requesting a transfer for an already-blocked source returns 409 Conflict. Running flows keep running during and after the transfer.
Request Body
Provide exactly one of sourceUserId/sourceGroupId and exactly one of targetUserId/targetGroupId.
sourceUserId
string
User to transfer resources from.
sourceGroupId
string
Group to transfer resources from.
targetUserId
string
User to transfer resources to.
targetGroupId
string
Group to transfer resources to.
Add Group Members
POST [TENANT_API_URL]/user-groups/:groupId/members
Add one or more members to a user group. Admin token required.
Request Body
userIds*
string[]
Array of user IDs to add
Remove Group Member
DELETE [TENANT_API_URL]/user-groups/:groupId/members/:userId
Remove a member from a user group. Admin token required. This will revoke all issued tokens for the removed user in this group context.
Get Group Members
GET [TENANT_API_URL]/user-groups/:groupId/members
Get all members of a user group. Users can only access groups they belong to, admins can access all groups.
List User's Groups
GET [TENANT_API_URL]/users/:userId/groups
Get all groups that a specific user belongs to.
Switch Context
POST [TENANT_API_URL]/auth/switch-context
Switch user context between personal workspace and a group workspace. Returns a new JWT token with the selected context.
Request Body
groupId
string
Group ID to switch to, or null/omit to switch to personal context
Get Available Contexts
GET [TENANT_API_URL]/auth/available-contexts
List all available contexts (personal and groups) that the current user can switch to.
Use Cases
Collaborative Teams
User groups are ideal for teams that need to collaborate on integrations and automations:
Create a group for your team (e.g., "Marketing Team")
Add team members to the group
Members switch context to the group workspace
All resources (flows, accounts, data stores) are now shared among team members
Audit logs maintain individual user accountability
Admin Group
When a user is assigned the admin scope, they are automatically added to the default "Admin Group". This enables:
Shared access to all integration templates
Collaborative administration of the Appmixer instance
Shared ownership of admin-created resources
SSO Integration
User groups work with SSO (Single Sign-On) authentication:
JWT tokens from SSO providers should include a
groupsclaimUsers are automatically assigned to groups based on the SSO groups claim
Tokens are refreshed correctly to maintain group membership
Important Notes
Token Revocation
When a user is removed from a group, all issued JWT tokens for that user in the group context are automatically revoked. However, if a token is being used inside a running flow component, it will continue to work until the component execution completes.
Last updated
Was this helpful?
