All endpoints require a valid JWT Bearer token in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/SoftwareVerse/userverse/llms.txt
Use this file to discover all available pages before exploring further.
Authorization header.
Each company is automatically provisioned with two system roles when it is created: Administrator (full access to manage users and data) and Viewer (read-only access to company data). Default roles cannot be deleted.
Create a role
Creates a new custom role for the specified company.Path parameters
The unique identifier of the company the role belongs to.
Request body
Name of the new role. Must be unique within the company.
A human-readable description of the role’s permissions or purpose.
Response fields
Human-readable confirmation message.
The newly created role.
Error codes
| Status | Description |
|---|---|
400 | A role with the same name already exists in this company, or the request body is invalid. |
500 | An unexpected server error occurred. |
Example
Update a role
Updates the name or description of an existing role identified by its current name.Path parameters
The ID of the company the role belongs to.
The current name of the role to update.
Request body
New name for the role.
Updated description for the role.
Response fields
Human-readable confirmation message.
The updated role.
Error codes
| Status | Description |
|---|---|
400 | The request body is invalid. |
404 | No role with the given name was found for this company. |
500 | An unexpected server error occurred. |
Example
Delete a role
Deletes a custom role from a company. All users currently assigned the deleted role are automatically reassigned to the specified replacement role.Path parameters
The ID of the company to delete the role from.
Request body
Name of the role to delete. Cannot be a default system role.
Name of the role that affected users will be reassigned to after deletion.
Response fields
Human-readable confirmation message.
A result summary object. The exact shape is determined at runtime and may include details about reassigned users.
Error codes
| Status | Description |
|---|---|
400 | role_name_to_delete is a default system role, or the request body is invalid. |
404 | The role to delete or the replacement role was not found. |
500 | An unexpected server error occurred. |
Example
List roles
Returns a paginated list of all roles associated with a company. Supports filtering by name and description.Path parameters
The ID of the company whose roles you want to retrieve.
Query parameters
Page number to retrieve. Must be
1 or greater.Number of records per page. Accepted range:
1–100.Filter results to roles whose name matches this value.
Filter results to roles whose description matches this value.
Response fields
Human-readable confirmation message.
Paginated response wrapper.
Error codes
| Status | Description |
|---|---|
400 | The request contains invalid query parameters. |
500 | An unexpected server error occurred. |