Users
Overview
Section titled “Overview”Manage users within your organization. Users are assigned roles that control their access to features through granular permissions.
Users can be either native (created in the organization) or members (added from another organization). The is_member field in responses indicates cross-org members, who have limited update/delete behavior.
Profile & Password Change
Section titled “Profile & Password Change”All users (regardless of role) can access their profile to view account information and change their password. The Profile page is accessible from the user menu in the top navigation.
Get Current User
Section titled “Get Current User”GET /api/meResponse
Section titled “Response”{ "status": "success", "data": { "id": "uuid", "email": "user@example.com", "full_name": "John Doe", "role": { "id": "uuid", "name": "admin", "description": "Full access to all features" }, "permissions": ["users:read", "users:create", "contacts:read", "..."], "is_super_admin": false, "created_at": "2024-01-01T00:00:00Z" }}Change Password
Section titled “Change Password”PUT /api/me/passwordRequest Body
Section titled “Request Body”{ "current_password": "oldpassword", "new_password": "newsecurepassword"}| Field | Type | Required | Description |
|---|---|---|---|
current_password | string | Yes | Current password for verification |
new_password | string | Yes | New password (minimum 8 characters) |
Response
Section titled “Response”{ "status": "success", "data": { "message": "Password changed successfully" }}List Users
Section titled “List Users”Retrieve all users in your organization.
GET /api/usersQuery Parameters
Section titled “Query Parameters”| Parameter | Type | Description |
|---|---|---|
search | string | Filter by name or email |
Response
Section titled “Response”{ "status": "success", "data": { "users": [ { "id": "uuid", "email": "user@example.com", "full_name": "John Doe", "role_id": "uuid", "role": { "id": "uuid", "name": "agent", "is_system": true }, "is_active": true, "is_available": true, "is_member": false, "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z" } ] }}Get User
Section titled “Get User”Retrieve a single user.
GET /api/users/{id}Response
Section titled “Response”{ "status": "success", "data": { "id": "uuid", "email": "user@example.com", "full_name": "John Doe", "role_id": "uuid", "role": { "id": "uuid", "name": "agent", "is_system": true }, "is_active": true, "is_available": true, "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z" }}Create User
Section titled “Create User”Create a new user in your organization.
POST /api/usersRequest Body
Section titled “Request Body”{ "email": "newuser@example.com", "password": "securepassword", "full_name": "Jane Smith", "role_id": "uuid"}| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Unique email address |
password | string | Yes | Minimum 8 characters |
full_name | string | Yes | Display name |
role_id | string | No | UUID of the role to assign. If not provided, uses the organization’s default role |
Response
Section titled “Response”{ "status": "success", "data": { "id": "uuid", "email": "newuser@example.com", "full_name": "Jane Smith", "role_id": "uuid", "role": { "id": "uuid", "name": "agent", "is_system": true }, "is_active": true, "created_at": "2024-01-01T00:00:00Z" }}Update User
Section titled “Update User”Update user details or role.
PUT /api/users/{id}Request Body
Section titled “Request Body”{ "full_name": "Jane Doe", "role_id": "uuid", "is_active": true}| Field | Type | Description |
|---|---|---|
email | string | New email address |
password | string | New password (min 8 chars) |
full_name | string | Display name |
role_id | string | UUID of the role to assign |
is_active | boolean | Enable/disable user |
Delete User
Section titled “Delete User”Remove a user from the organization.
DELETE /api/users/{id}Response
Section titled “Response”{ "status": "success", "data": { "message": "User deleted successfully" }}User Availability
Section titled “User Availability”Users can set their availability status for chat routing.
Update Availability
Section titled “Update Availability”PUT /api/users/{id}/availabilityRequest Body
Section titled “Request Body”{ "is_available": true}List My Organizations
Section titled “List My Organizations”Retrieve all organizations the current user belongs to. Used by the organization switcher.
GET /api/me/organizationsResponse
Section titled “Response”{ "status": "success", "data": { "organizations": [ { "organization_id": "uuid", "name": "Acme Corp", "slug": "acme-corp-a1b2c3d4", "role_name": "admin", "role_id": "uuid", "is_default": true }, { "organization_id": "uuid", "name": "Partner Org", "slug": "partner-org-e5f6g7h8", "role_name": "agent", "role_id": "uuid", "is_default": false } ] }}See Also
Section titled “See Also”- Roles & Permissions - Learn about the permission system
- Roles API - Manage roles programmatically