List all users
Retrieve paginated list of users with search, sort, and filter capabilities
- Type: integerpagemin:1
Page number (1-indexed, default: 1)
- Type: integerlimitmin:1max:100
Items per page (max: 100; default varies by endpoint)
- Type: stringsearch
Search term to filter by email, firstName, or lastName
- Type: stringsort
Sort field and direction (e.g., "createdAt:desc", "name:asc"). Supports comma-separated values for multi-column sorting.
- Type: stringFormat: uuidentity
Id Filter users by entity ID
- Type: stringFormat: uuidexclude
Resource Group Id Exclude users from specified resource group (filter for "add to group" dialogs)
- Type: array string[]enuminvite
Status Filter by invite/activation status. Supports multiple values (repeated params). Example: ?inviteStatus=pending&inviteStatus=expired
values- activated
- pending
- expired
- Type: stringenumdeleted
Filter Filter for deleted users visibility:
- exclude (default): Only show active users
- include: Show both active and deleted users
- only: Show only deleted users
values- exclude
- include
- only
- Type: array string[]resource
Group Id Filter by resource group IDs. Supports multiple values (repeated params). Use '0' to include users with no resource groups assigned. Example: ?resourceGroupId=abc-123&resourceGroupId=0 (users in group abc-123 OR users with no groups)
- Type: array string[]role
Id Filter by role IDs. Supports multiple values (repeated params). Use '0' to include users with no roles assigned. Example: ?roleId=abc-123&roleId=0 (users with role abc-123 OR users with no roles)
- Type: booleanno
Resource Group Filter for users with no resource groups assigned. Shorthand for resourceGroupId=0.
- Type: booleanno
Role Filter for users with no roles assigned. Shorthand for roleId=0.
- application/json
- application/json
- application/json
- application/json
curl 'https://api.gpcn.com/v1/users?page=1&limit=1&search=&sort=createdAt%3Adesc&entityId=&excludeResourceGroupId=&inviteStatus=activated&deletedFilter=exclude&resourceGroupId=&roleId=&noResourceGroup=true&noRole=true' \
--header 'X-API-Key: YOUR_SECRET_TOKEN'
{
"success": true,
"message": "",
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "john.doe@example.com",
"firstName": "John",
"lastName": "Doe",
"createdAt": "2026-01-10T09:00:00.000Z",
"updatedAt": "2026-01-20T14:30:00.000Z",
"deletedAt": null,
"lastLoginAt": "2026-01-20T08:15:00.000Z",
"resourceGroups": [
{
"id": "880e8400-e29b-41d4-a716-446655440001",
"name": "Engineering"
},
{
"id": "880e8400-e29b-41d4-a716-446655440002",
"name": "DevOps"
}
],
"roles": [
{
"id": "770e8400-e29b-41d4-a716-446655440002",
"name": "tenant-admin",
"displayName": "Tenant Admin",
"resourceGroupId": null,
"resourceGroupName": null
},
{
"id": "770e8400-e29b-41d4-a716-446655440003",
"name": "tenant-user",
"displayName": "Tenant User",
"resourceGroupId": "880e8400-e29b-41d4-a716-446655440001",
"resourceGroupName": "Engineering"
}
],
"inviteStatus": "activated",
"inviteExpiresAt": null
}
],
"meta": {
"total": 1,
"page": 1,
"pageSize": 1,
"totalPages": 1,
"hasNextPage": true,
"hasPreviousPage": true
}
}.png)