perform.chat
Customer Users

Introduction

Manage customer users in your company

Overview

The Customer Users API allows you to search, retrieve, and update customer users associated with your company. Customer users represent the end-users who interact with your AI agents.

What are Customer Users?

Customer users are the individuals who chat with your AI agents. Each customer user has:

  • External ID: Your system's user identifier
  • Name: User's display name
  • Email: User's email address
  • Metadata: Custom JSON data for additional context
  • Company: Automatically scoped to your company

Common Use Cases

User Synchronization

Keep user data synced between your system and PerformChat:

const user = await findUserByExternalId('user_123')
if (user) {
  await updateCustomerUser(user.id, { name: 'Updated Name' })
}

User Lookup

Find users by email, name, or external ID:

const users = await searchCustomerUsers({ email: 'user@example.com' })

Metadata Management

Store additional user context for better support:

await updateCustomerUser(userId, {
  metadata: {
    plan: 'enterprise',
    company: 'Acme Corp'
  }
})

Available Endpoints

Authentication

All customer user endpoints require API Key authentication:

{
  "keyId": "your-key-id",
  "keySecret": "your-key-secret"
}

User Creation

Customer users are automatically created when you generate a token for them:

// User is created automatically if doesn't exist
const token = await generateToken('user_123', 'agent_456')

Next Steps