Skip to main content
GET
Get All Users

Get All Users

Retrieve all users with pagination and filtering. Only accessible by administrators.

Endpoint

Description

This endpoint allows administrators to retrieve a paginated list of all users in the system. It supports filtering by various criteria including role, license, status, and search terms. This is an administrative endpoint that requires appropriate permissions.

Authentication

Required. Include your API key in the Authorization header.

Request

Query Parameters

Example Request

With search:

Response

Success Response (200)

Response Fields

Example Usage

JavaScript

Python

cURL

Error Responses

401 Unauthorized

403 Forbidden

Filtering Examples

Search by Name or Email

Filter by Role

Filter by License

Filter by Status

Sort by Last Active

Use Cases

  • User Management: View and manage all users in the system
  • User Analytics: Analyze user distribution by role, license, or status
  • Search and Filter: Find specific users based on various criteria
  • Administrative Tasks: Support administrative operations and reporting

Role Descriptions

  • admin: Full system access with administrative control
  • user: Standard access to chat features and personal knowledge bases
  • globalReader: Read-only access to admin panel with viewing permissions

License Descriptions

  • Essential: Basic tier with 29,000 points/month
  • Growth: Mid-tier with enhanced features
  • Ultra: Premium tier with maximum features
  • Early Access: Beta tier with experimental capabilities

Rate Limits

This endpoint follows the standard rate limits:
  • 60 requests per minute
  • 1000 requests per hour

Authorizations

Authorization
string
header
required

API key authentication using Bearer token format. Example: Authorization: Bearer sk-your-api-key-here

Query Parameters

page
integer
default:1

Page number for pagination

Required range: x >= 1
limit
integer
default:20

Number of users per page

Required range: 1 <= x <= 100

Search term for name, email, or username

role
enum<string>

Filter by user role

Available options:
admin,
user,
globalReader
license
enum<string>

Filter by user license

Available options:
Essential,
Growth,
Ultra,
Early Access
status
enum<integer>

Filter by user status (0=inactive, 1=active)

Available options:
0,
1
sortBy
string
default:createdAt

Field to sort by

sortOrder
enum<string>
default:desc

Sort order

Available options:
asc,
desc

Response

List of users

success
boolean
Example:

true

users
object[]
pagination
object