Quickstart
Build production voice agents with StateSet.
Authenticate, verify runtime health, make the first call, connect inbound telephony, and prepare the launch controls a business needs before production traffic.
Before you start
Create or request the tenant API key for the environment you are testing.
Confirm the outbound caller ID or inbound Twilio number maps to the right tenant and agent.
Use an HTTPS endpoint that can preserve the public URL Twilio signs.
Identify who approves prompts, tools, fallback behavior, and escalation rules.
Common use cases
Inbound support triage
Answer common questions, authenticate callers, collect structured context, and hand off sensitive issues.
Outbound follow-up
Recover missed calls, qualify opportunities, confirm appointments, and reconcile the outcome in call logs.
1. Set the base URL and API key
export STATESET_VOICE_BASE_URL="https://voice.stateset.app"
export STATESET_VOICE_API_KEY="sk_live_..."
Tenant runtime requests use Authorization: Bearer. Admin automation uses x-admin-key.
2. Check readiness
curl -sS "https://voice.stateset.app/health/ready"
3. Make the first call
POST /api/v1/make-call
curl -sS -X POST "https://voice.stateset.app/api/v1/make-call" \
-H "Authorization: Bearer ${STATESET_VOICE_API_KEY}" \
-H "content-type: application/json" \
-d '{
"to": "+15555555678",
"from": "+15555551234",
"agent_key": "support_primary"
}'
/api/v1/call-logs and /api/v1/voice-sessions before retrying or creating another call.
4. Connect inbound calls
Configure Twilio to send inbound voice traffic to /api/v1/incoming-call, verify X-Twilio-Signature, and route each number to the correct tenant and agent.
| Twilio setting | Production value |
|---|---|
| Voice webhook | https://voice.stateset.app/api/v1/incoming-call |
| HTTP method | POST |
| Signature header | X-Twilio-Signature |
| Fallback behavior | Transfer, callback task, or safe message when the agent cannot continue. |
5. Inspect outcomes
curl -sS "https://voice.stateset.app/api/v1/call-logs?limit=25" \
-H "Authorization: Bearer ${STATESET_VOICE_API_KEY}"
curl -sS "https://voice.stateset.app/api/v1/voice-sessions?limit=25" \
-H "Authorization: Bearer ${STATESET_VOICE_API_KEY}"
Enterprise launch checklist
Confirm tenant API keys and admin keys are stored separately.
Run synthetic calls for each supported intent and handoff path.
Verify Twilio signatures, stream token rotation, call logs, voice sessions, and webhook delivery.
Review /api-docs/public.json and /api-docs/admin.json for generated clients.