Use your
X-API-KEY only from trusted server-side code. Never ship a workspace API key in browser or mobile source.Choose your path
Backend / API
Create agents, start sessions, run campaigns, receive webhooks, and query history.
Browser voice
Start a web voice session and connect a browser participant with a session token.
Dashboard
Create assistants, knowledge bases, and campaigns without writing code first.
5-minute integration path
1
Get an API key
In the dashboard, open Settings → API keys and create a key. Send it on every request as
X-API-KEY.2
Check workspace access
Call
GET /workspace to verify the key, workspace, and scopes.3
Pick an agent
Call
GET /agent/all and choose a published agent for your channel.4
Start a session
Call
POST /sessions with the agent, participant, and any custom_variables your prompt uses.5
Connect & process results
Connect the returned
participant_token to the media room, then use webhooks or GET /sessions for results.Copy-paste starter
API basics
Design for production
- Keep API keys in server secrets; rotate on team changes.
- Store Lehar IDs:
agent_id,session_id,campaign_id. - Outbound phone calls use
POST /callswith an API key. Web sessions (POST /sessions) need a bearer login session instead — see Authentication. - Register an outbound webhook rather than polling; make the handler idempotent on
event_idand return2xxquickly.
Next steps
Quickstart
Make your first session.
Authentication
API keys, bearer sessions, scopes.
Platform
How the pieces fit together.
API Reference
Resources, errors, pagination.

