Auth for Chat
Customer Users
Understanding customer user management
What are Customer Users?
customer_users represent your end users in the PerformChat system. They are:
- Automatically created when you generate a token
- Scoped to your company - isolated from other companies
- Identified by your userId - you control the identifier
- Lightweight - minimal data stored, respecting privacy
Customer User Fields
| Field | Type | Description |
|---|---|---|
id | string | Internal PerformChat ID (auto-generated) |
company_id | string | Your company's ID |
external_id | string | Your user's ID from your system |
email | string | (Optional) User's email |
name | string | (Optional) User's name |
metadata | JSON | (Optional) Custom data about the user |
active | boolean | Whether the user is active |
created_at | DateTime | When the user was first created |
last_seen_at | DateTime | Last time the user accessed chat |
Automatic User Management
When you generate a token:
- PerformChat looks for an existing
customer_userwith youruserId - If not found, creates a new
customer_userautomatically - Updates the
last_seen_attimestamp on each token generation - Associates all conversations with this
customer_user