Skip to Content

User Groups

Group learners together for cohort management and access control.

Create a usergroup

POST/api/v1/usergroups/
API tokenusergroups:createor user session

Create a new usergroup within an organization. Requires admin/maintainer permissions on the organization.

Request bodyapplication/jsonrequired

namestringrequired
descriptionstringrequired
org_idinteger

Returns

UserGroupRead — Usergroup created successfully.

namestringrequired
descriptionstringrequired
idintegerrequired
org_idinteger
usergroup_uuidstringrequired
creation_datestringrequired
update_datestringrequired
Error responses
  • 401 Authentication required
  • 403 User lacks permission to create usergroups
  • 404 Organization not found
  • 422 Validation ErrorHTTPValidationError
Request
Response
{
  "name": "Example name",
  "description": "An example description",
  "id": 1,
  "org_id": 1,
  "usergroup_uuid": "string",
  "creation_date": "string",
  "update_date": "string"
}

Get a usergroup

GET/api/v1/usergroups/{usergroup_id}
API tokenusergroups:reador user session

Retrieve a usergroup by its numeric identifier.

Path parameters

usergroup_idintegerrequired

Returns

UserGroupRead — Usergroup retrieved.

namestringrequired
descriptionstringrequired
idintegerrequired
org_idinteger
usergroup_uuidstringrequired
creation_datestringrequired
update_datestringrequired
Error responses
  • 401 Authentication required
  • 403 User lacks permission to view this usergroup
  • 404 Usergroup not found
  • 422 Validation ErrorHTTPValidationError
Request
Response
{
  "name": "Example name",
  "description": "An example description",
  "id": 1,
  "org_id": 1,
  "usergroup_uuid": "string",
  "creation_date": "string",
  "update_date": "string"
}

Update a usergroup

PUT/api/v1/usergroups/{usergroup_id}
API tokenusergroups:updateor user session

Update the name, description, or other attributes of a usergroup.

Path parameters

usergroup_idintegerrequired

Request bodyapplication/jsonrequired

namestring | null
descriptionstring | null

Returns

UserGroupRead — Usergroup updated successfully.

namestringrequired
descriptionstringrequired
idintegerrequired
org_idinteger
usergroup_uuidstringrequired
creation_datestringrequired
update_datestringrequired
Error responses
  • 401 Authentication required
  • 403 User lacks permission to update this usergroup
  • 404 Usergroup not found
  • 422 Validation ErrorHTTPValidationError
Request
Response
{
  "name": "Example name",
  "description": "An example description",
  "id": 1,
  "org_id": 1,
  "usergroup_uuid": "string",
  "creation_date": "string",
  "update_date": "string"
}

Delete a usergroup

DELETE/api/v1/usergroups/{usergroup_id}
API tokenusergroups:deleteor user session

Permanently delete a usergroup along with its user and resource links.

Path parameters

usergroup_idintegerrequired
Error responses
  • 401 Authentication required
  • 403 User lacks permission to delete this usergroup
  • 404 Usergroup not found
  • 422 Validation ErrorHTTPValidationError
Request
Response
"string"

List users in a usergroup

GET/api/v1/usergroups/{usergroup_id}/users
API tokenusergroups:reador user session

Retrieve the list of users that belong to a specific usergroup. Sensitive fields (is_superadmin, signup_method) are excluded.

Path parameters

usergroup_idintegerrequired

Returns

UserReadPublic[] — Users linked to the usergroup.

idintegerrequired
user_uuidstringrequired
usernamestringrequired
first_namestringrequired
last_namestringrequired
email_verifiedboolean
avatar_imagestring | null
biostring | null
detailsDetails | null
profileProfile | null
Error responses
  • 401 Authentication required
  • 403 User lacks permission to view usergroup members
  • 404 Usergroup not found
  • 422 Validation ErrorHTTPValidationError
Request
Response
[
  {
    "id": 1,
    "user_uuid": "string",
    "username": "string",
    "first_name": "Example name",
    "last_name": "Example name",
    "email_verified": false,
    "avatar_image": "string",
    "bio": "string",
    "details": {},
    "profile": {}
  }
]

List usergroups for an organization

GET/api/v1/usergroups/org/{org_id}
API tokenusergroups:reador user session

Retrieve every usergroup that belongs to a given organization.

Path parameters

org_idintegerrequired

Returns

UserGroupRead[] — Usergroups for the organization.

namestringrequired
descriptionstringrequired
idintegerrequired
org_idinteger
usergroup_uuidstringrequired
creation_datestringrequired
update_datestringrequired
Error responses
  • 401 Authentication required
  • 403 User lacks permission to view usergroups for this organization
  • 404 Organization not found
  • 422 Validation ErrorHTTPValidationError
Request
Response
[
  {
    "name": "Example name",
    "description": "An example description",
    "id": 1,
    "org_id": 1,
    "usergroup_uuid": "string",
    "creation_date": "string",
    "update_date": "string"
  }
]

List resources linked to a usergroup

GET/api/v1/usergroups/{usergroup_id}/resources
API tokenusergroups:reador user session

Return the UUIDs of resources (courses, folders, etc.) that are linked to a usergroup.

Path parameters

usergroup_idintegerrequired
Error responses
  • 401 Authentication required
  • 403 User lacks permission to view this usergroup
  • 404 Usergroup not found
  • 422 Validation ErrorHTTPValidationError
Request
Response
[
  "string"
]

List usergroups linked to a resource

GET/api/v1/usergroups/resource/{resource_uuid}
API tokenusergroups:reador user session

Retrieve every usergroup that is linked to a given resource UUID.

Path parameters

resource_uuidstringrequired

Returns

UserGroupRead[] — Usergroups linked to the resource.

namestringrequired
descriptionstringrequired
idintegerrequired
org_idinteger
usergroup_uuidstringrequired
creation_datestringrequired
update_datestringrequired
Error responses
  • 401 Authentication required
  • 403 User lacks permission to view usergroups for this resource
  • 404 Resource not found
  • 422 Validation ErrorHTTPValidationError
Request
Response
[
  {
    "name": "Example name",
    "description": "An example description",
    "id": 1,
    "org_id": 1,
    "usergroup_uuid": "string",
    "creation_date": "string",
    "update_date": "string"
  }
]

Add users to a usergroup

POST/api/v1/usergroups/{usergroup_id}/add_users
API tokenusergroups:createor user session

Add one or more users to a usergroup. User IDs should be provided as a comma-separated string.

Path parameters

usergroup_idintegerrequired

Query parameters

user_idsstringrequired
Error responses
  • 401 Authentication required
  • 403 User lacks permission to modify this usergroup
  • 404 Usergroup or user not found
  • 422 Validation ErrorHTTPValidationError
Request
Response
"string"

Remove users from a usergroup

DELETE/api/v1/usergroups/{usergroup_id}/remove_users
API tokenusergroups:deleteor user session

Remove one or more users from a usergroup. User IDs should be provided as a comma-separated string.

Path parameters

usergroup_idintegerrequired

Query parameters

user_idsstringrequired
Error responses
  • 401 Authentication required
  • 403 User lacks permission to modify this usergroup
  • 404 Usergroup or user not found
  • 422 Validation ErrorHTTPValidationError
Request
Response
"string"

Add resources to a usergroup

POST/api/v1/usergroups/{usergroup_id}/add_resources
API tokenusergroups:createor user session

Link one or more resources (courses, folders, etc.) to a usergroup. Resource UUIDs should be provided as a comma-separated string.

Path parameters

usergroup_idintegerrequired

Query parameters

resource_uuidsstringrequired
Error responses
  • 401 Authentication required
  • 403 User lacks permission to modify this usergroup
  • 404 Usergroup or resource not found
  • 422 Validation ErrorHTTPValidationError
Request
Response
"string"

Remove resources from a usergroup

DELETE/api/v1/usergroups/{usergroup_id}/remove_resources
API tokenusergroups:deleteor user session

Unlink one or more resources from a usergroup. Resource UUIDs should be provided as a comma-separated string.

Path parameters

usergroup_idintegerrequired

Query parameters

resource_uuidsstringrequired
Error responses
  • 401 Authentication required
  • 403 User lacks permission to modify this usergroup
  • 404 Usergroup or resource not found
  • 422 Validation ErrorHTTPValidationError
Request
Response
"string"