Skip to main content
GET
/
api
/
adm
/
companyUsers
Get Company Users
curl --request GET \
  --url https://localhost:44371/api/adm/companyUsers \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "code": 200,
  "errorMessage": null,
  "entries": []
}

Description

Queries company users for administrative dashboards and user management interfaces. Results include user details such as name, email, role, and status. Supports filtering by company, role, and pagination.

Input

  • Query Parameters: model (CompanyUserQueryRequest) — Filtering options including:
    • companyId (guid, optional) — Filter by parent company identifier.
    • role (string, optional) — Filter by user role (Admin or Member).
    • isActive (bool, optional) — Filter by active status.
    • limit (int, optional) — Maximum number of records to return (default: 20).
    • offset (int, optional) — Number of records to skip for pagination.

Output

Returns a CompanyUserQueryResponse containing matching users or an empty list if none found.

Example Request

GET /api/admin/company-users?companyId=3fa85f64-5717-4562-b3fc-2c963f66afa6&role=Member&limit=10
Authorization: Bearer {token}

Example Response

{
  "success": true,
  "code": 200,
  "errorMessage": null,
  "entries": [
    {
      "userId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
      "email": "[email protected]",
      "firstName": "John",
      "lastName": "Doe",
      "role": "Member",
      "status": "Active",
      "lastLogin": "2025-10-25T14:30:00Z"
    }
  ],
  "totalCount": 1
}

Errors

  • 400 Bad Request — Invalid query parameters or filter values.
  • 401 Unauthorized — Missing or invalid authentication token.

Notes

  • Results are paginated; use limit and offset parameters for large datasets.
  • Empty results return success with an empty entries array.
  • Filter by role to retrieve only Admin or Member users.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Query Parameters

CompanyId
string<guid> | null

The optional identifier of the company to restrict results.

CompanyProjectId
string<guid> | null

The project identifier used to filter results when OnlyNotAddedToProject is true.

OnlyNotAddedToProject
boolean

Indicates whether to return users that are not yet assigned to the provided project.

Id
string<guid> | null

Optional identifier to filter results by a specific entity.

Example:

"3fa85f64-5717-4562-b3fc-2c963f66afa6"

Response

Always returned. Check the success property in the response body to determine if the operation succeeded.

Standard response structure containing operation status and error information. Standard query response containing a collection of matching entities. Represents the response returned when querying company users.

success
boolean

True if the operation completed successfully; false if an error occurred.

Example:

true

code
enum<string>

Result code indicating the outcome of the operation.

Available options:
Unknown,
Success,
BadRequest,
Unauthorized,
NotFound,
Error
Example:

200

errorMessage
string | null

Human-readable error message when an error occurs.

Example:

null

entries
object[] | null

Collection of entities matching the query criteria.

Example:
[]