Skip to main content
These endpoints require admin-level access and use API key authentication (Users-Management-Key header) rather than user tokens.

List Users

List all users in the system with pagination support.

Query Parameters

skip
integer
Number of users to skip (default: 0)
take
integer
Number of users to return (default: 50, max: 100)

Headers

Users-Management-Key
string
required
Admin API key for user management operations

Response

data
array
Array of user objects
total_pages
integer
Total number of pages available
curl --location --request GET 'https://api.plaisolutions.com/users?skip=0&take=50' \
--header 'Users-Management-Key: YOUR_ADMIN_KEY'
{
  "data": [
    {
      "id": "user_123",
      "email": "[email protected]",
      "first_name": "John",
      "last_name": "Doe",
      "is_active": true,
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-20T14:45:00Z"
    },
    {
      "id": "user_456",
      "email": "[email protected]",
      "first_name": "Jane",
      "last_name": "Smith",
      "is_active": true,
      "created_at": "2024-01-16T09:20:00Z",
      "updated_at": "2024-01-18T16:30:00Z"
    }
  ],
  "total_pages": 12
}

Search Users

Find users by email address.

Query Parameters

email
string
Email address to search for (supports partial matching)

Headers

Users-Management-Key
string
required
Admin API key for user management operations

Response

Returns a single user object if found, or null if no user matches the search criteria.
id
string
User unique identifier
email
string
User’s email address
first_name
string
User’s first name
last_name
string
User’s last name
is_active
boolean
Whether the user account is active
created_at
string
When the user was created (ISO 8601 format)
updated_at
string
When the user was last updated (ISO 8601 format)
curl --location --request GET 'https://api.plaisolutions.com/users/[email protected]' \
--header 'Users-Management-Key: YOUR_ADMIN_KEY'
{
  "id": "user_123",
  "email": "[email protected]",
  "first_name": "John",
  "last_name": "Doe",
  "is_active": true,
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-20T14:45:00Z"
}

Get User

Get detailed information about a specific user.

Path Parameters

user_id
string
required
The unique identifier of the user

Headers

Users-Management-Key
string
required
Admin API key for user management operations

Response

Returns the user object with detailed information.
id
string
User unique identifier
email
string
User’s email address
first_name
string
User’s first name
last_name
string
User’s last name
is_active
boolean
Whether the user account is active
created_at
string
When the user was created (ISO 8601 format)
updated_at
string
When the user was last updated (ISO 8601 format)
curl --location --request GET 'https://api.plaisolutions.com/users/user_123' \
--header 'Users-Management-Key: YOUR_ADMIN_KEY'
{
  "id": "user_123",
  "email": "[email protected]",
  "first_name": "John",
  "last_name": "Doe",
  "is_active": true,
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-20T14:45:00Z"
}

Delete User

Delete a user account. This action is irreversible and will remove all associated data.

Path Parameters

user_id
string
required
The unique identifier of the user to delete

Headers

Users-Management-Key
string
required
Admin API key for user management operations

Response

Returns a 204 status code on successful deletion.
Deleting a user will permanently remove:
  • User account and profile information
  • Organization and project memberships
  • All created agents, datasources, and tools
  • Conversation history and analytics data
  • Any pending invitations
This action cannot be undone.
curl --location --request DELETE 'https://api.plaisolutions.com/users/user_123' \
--header 'Users-Management-Key: YOUR_ADMIN_KEY'

Admin Access Requirements

These endpoints are designed for system administrators and require special authentication:

Authentication

1

Obtain Admin API Key

Contact PLai Solutions support to obtain a Users-Management-Key for your organization
2

Include Header

Add the Users-Management-Key header to all user management requests
3

Verify Permissions

Ensure your API key has the necessary permissions for the operations you need

Use Cases

  • Review user activity and account status
  • Generate compliance reports
  • Monitor user growth and engagement
  • Deactivate suspicious accounts
  • Merge duplicate user accounts
  • Resolve customer support issues
  • Process GDPR deletion requests
  • Export user data for compliance
  • Cleanup inactive accounts
  • Sync users with external systems
  • Automate user provisioning
  • Build admin dashboards

Security Considerations

  • Admin API keys should be stored securely and rotated regularly
  • Log all user management operations for audit purposes
  • Implement proper access controls in your applications
  • Consider implementing additional approval workflows for destructive operations

Rate Limits

User management endpoints may have different rate limits than regular API endpoints:
  • List Users: 100 requests per minute
  • Search Users: 200 requests per minute
  • Get User: 500 requests per minute
  • Delete User: 10 requests per minute
For bulk operations, consider implementing exponential backoff and pagination to stay within rate limits.