Genie groups let you organize your genies into logical categories such as “Sales Team” or “Support Team”. Each group has a name, optional description, and a position for display ordering. Genies can be assigned to a group via the sync action.
Standard users can only manage their own groups. Admin users can manage groups for any user by passing a userId.
List groups
Retrieves all groups for the authenticated user.
Admin only. Enables cross-user access.
Admin only. Target user whose groups to retrieve.
Whether the request succeeded.
ISO 8601 creation timestamp.
ApiService.invoke()
Request body
Response
const response = await ApiService . invoke ( "genie-groups" , "list" );
Get group
Retrieves a single group by ID.
The group ID to retrieve (passed as a string).
Admin only. Enables cross-user access.
Whether the request succeeded.
ISO 8601 creation timestamp.
ApiService.invoke()
Request body
Response
const response = await ApiService . invoke ( "genie-groups" , "get" , "1" );
Create group
Creates a new genie group. The group is automatically assigned the next available position.
A short description of the group’s purpose.
Admin only. Create the group for a specific user.
Whether the request succeeded.
The newly created group with all fields including auto-assigned position.
ApiService.invoke()
Request body
Response
const response = await ApiService . invoke (
"genie-groups" ,
"create" ,
undefined ,
{
name: "Support Team" ,
description: "Genies for support workflows" ,
}
);
Update group
Updates an existing group’s properties. Only the fields you provide are changed.
The group ID to update (passed as a string).
Updated display position.
Admin only. Target user who owns the group.
Whether the request succeeded.
The updated group with all current field values.
ApiService.invoke()
Request body
Response
const response = await ApiService . invoke ( "genie-groups" , "update" , "1" , {
name: "Updated Sales Team" ,
description: "Updated description for sales genies" ,
position: 2 ,
});
Delete group
Permanently deletes a group. Genies in the group are not deleted; their group_id is set to null.
The group ID to delete (passed as a string).
Admin only. Target user who owns the group.
Whether the request succeeded.
ApiService.invoke()
Request body
Response
const response = await ApiService . invoke ( "genie-groups" , "delete" , "1" );
Reorder groups
Updates the display order of groups based on an ordered array of group IDs. The position of each group is set to its index in the array.
Ordered array of group IDs. The first ID gets position 0, the second gets position 1, and so on.
Admin only. Target user whose groups to reorder.
Whether the request succeeded.
ApiService.invoke()
Request body
Response
const response = await ApiService . invoke (
"genie-groups" ,
"reorder" ,
undefined ,
{
groupIds: [ 1 , 3 , 2 ],
}
);
Get group genie counts
Returns the number of genies in each group. Useful for displaying counts in group lists without fetching all genies.
Admin only. Enables cross-user access.
Admin only. Target user whose group counts to retrieve.
Whether the request succeeded.
An object where keys are group IDs (as strings) and values are genie counts.
ApiService.invoke()
Request body
Response
const response = await ApiService . invoke ( "genie-groups" , "counts" );
Sync genie to group
Assigns or clears a group for a specific genie. Pass a groupId to assign the genie to a group, or pass null to remove the genie from its current group.
The genie ID to assign or unassign.
The group ID to assign the genie to, or null to remove the genie from its group.
Admin only. Target user who owns the genie.
Whether the request succeeded.
The new group ID, or null if unassigned.
The group ID the genie was previously in.
The group ID the genie is now in.
Use the sync action to move a genie between groups. To transfer a genie from one group to another, simply pass the new groupId — the genie is automatically removed from its previous group. To remove a genie from all groups without assigning a new one, pass groupId: null.
ApiService.invoke()
cURL (assign to group)
cURL (remove from group)
Request body (assign)
Response
// Assign a genie to a group
const response = await ApiService . invoke (
"genie-groups" ,
"sync" ,
undefined ,
{
agentId: "550e8400-e29b-41d4-a716-446655440000" ,
groupId: 2 ,
}
);
// Remove a genie from its group
const response = await ApiService . invoke (
"genie-groups" ,
"sync" ,
undefined ,
{
agentId: "550e8400-e29b-41d4-a716-446655440000" ,
groupId: null ,
}
);
Error codes
Code Status Description UNAUTHORIZED401 Missing or invalid authentication token FORBIDDEN403 Only admins can manage groups for other users NOT_FOUND404 Group not found VALIDATION_ERROR400 Missing or invalid parameters (for example group ID required) INTERNAL_ERROR500 Server-side error