Voice Widget
Embed the Aurion voice widget into your website for real-time AI voice support.
Voice Widget
The Aurion voice widget is an embeddable Preact component that adds AI-powered voice and chat support to any website. It connects to the same AI agent that powers phone and mobile app calls.
Embed the Widget
Add the widget runtime script to your page. The script is served directly from your Aurion instance:
<script
src="https://apps.aurionai.net/api/v1/voice-widget/embed/aurion.js"
data-widget-id="your-widget-id"
async
></script>The widget automatically renders a floating button in the bottom-right corner of your page.
Get a Widget ID
- Log in to the Aurion Admin Dashboard
- Navigate to Configuration > Voice Widget
- Click Create Widget and configure appearance, greeting, and allowed domains
- Copy the widget ID from the embed snippet
Widget Configuration
Configure the widget via the admin dashboard or the API:
curl "https://apps.aurionai.net/api/v1/voice-widget/config" \
-H "X-API-Key: ak_live_xxxx"curl -X PUT "https://apps.aurionai.net/api/v1/voice-widget/config" \
-H "X-API-Key: ak_live_xxxx" \
-H "Content-Type: application/json" \
-d '{
"greeting": "Hi! How can I help you today?",
"primary_color": "#6366F1",
"position": "bottom-right",
"allowed_domains": ["example.com", "app.example.com"],
"modes": ["voice", "chat"]
}'Widget Session API
The widget uses a session-based authentication model with HMAC-signed email tokens to prevent impersonation.
Create a Session
curl -X POST "https://apps.aurionai.net/api/v1/widget/session" \
-H "Content-Type: application/json" \
-d '{
"email_token": "hmac_signed_token",
"display_name": "Jane Smith"
}'Response (201 Created):
{
"session_id": "ws_abc123",
"token": "eyJhbGci...",
"expires_at": "2026-03-08T15:00:00Z"
}Send a Message
curl -X POST "https://apps.aurionai.net/api/v1/widget/messages" \
-H "Authorization: Bearer eyJhbGci..." \
-H "Content-Type: application/json" \
-d '{
"content": "I need help resetting my password"
}'Get Conversation History
curl "https://apps.aurionai.net/api/v1/widget/history" \
-H "Authorization: Bearer eyJhbGci..."Upload an Attachment
curl -X POST "https://apps.aurionai.net/api/v1/widget/uploads" \
-H "Authorization: Bearer eyJhbGci..." \
-F "file=@screenshot.png"WebSocket Connection
For real-time streaming, the widget connects via WebSocket:
wss://apps.aurionai.net/api/v1/widget/ws?token=eyJhbGci...Messages are streamed as JSON frames:
{
"type": "message",
"content": "I can help you reset your password. Let me look up your account.",
"sender": "agent"
}Voice Token
To start a voice session from the widget, generate a LiveKit participant token:
curl -X POST "https://apps.aurionai.net/api/v1/voice-widget/token" \
-H "Content-Type: application/json" \
-d '{
"widget_id": "your-widget-id",
"participant_name": "Jane Smith"
}'Response:
{
"token": "livekit_participant_token",
"room_name": "room_abc123",
"ws_url": "wss://lk-staging.aurionai.net"
}Domain Allowlist
For security, the widget only loads on domains you explicitly allow. Configure allowed domains in the admin dashboard or via the API. Requests from non-allowed domains receive a 403 response.
Rate Limits
| Endpoint | Limit |
|---|---|
| Create session | 5/minute |
| Send message | 60/minute |
| Upload attachment | 30/minute |
Multimodal Support
The widget supports both voice and chat modes simultaneously. Users can switch between modes during a conversation. The AI agent maintains context across mode switches.
Regenerate Widget Key
If a widget key is compromised, regenerate it:
curl -X POST "https://apps.aurionai.net/api/v1/voice-widget/config/regenerate-key" \
-H "X-API-Key: ak_live_xxxx"Response:
{
"widget_id": "new_widget_id",
"message": "Widget key regenerated. Update your embed snippet."
}GA Readiness Check
Check if the voice widget feature is generally available for your tenant:
curl "https://apps.aurionai.net/api/v1/voice-widget/ga-readiness" \
-H "X-API-Key: ak_live_xxxx"Required Scopes
| Scope | Endpoints |
|---|---|
voice-widget:read | GET /config, GET /ga-readiness |
voice-widget:write | PUT /config, POST /token, POST /config/regenerate-key |
Related Guides
- Calls & Recordings — Access call data, transcripts, and recordings
- End-User API — End-user authentication for widget sessions
- Conversations — Widget conversations in the helpdesk
- Channels — Channel configuration overview