curl --request POST \
--url 'https://api.voice.stateset.com/api/v1/voice-sessions' \
--header "Authorization: Bearer $STATESET_VOICE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"agent_name": "string",
"call_sid": "string",
"call_type": "string",
"customer_phone": "+1 415 555 0142",
"duration_ms": 8,
"metadata": null,
"model": "string",
"org_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"sentiment": "string",
"status": "pending",
"stream_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"summary": "Two-person tent, green — replacement for damaged pole set.",
"tags": [
"priority"
],
"transcript": null,
"voice": "string"
}'
{
"agent_name": "ResponseCX",
"call_sid": "CA1234567890abcdef1234567890abcdef",
"call_type": "inbound",
"created_at": "2024-01-15T10:30:00Z",
"customer_phone": "+15555555678",
"duration_ms": 142000,
"ended_at": "2024-01-15T10:32:22Z",
"function_calls": null,
"id": "550e8400-e29b-41d4-a716-446655440000",
"metadata": null,
"model": "gpt-4o-realtime-preview",
"org_id": "org-456",
"rating": 4,
"sentiment": "positive",
"started_at": "2024-01-15T10:30:00Z",
"status": "completed",
"stream_id": "MZ1234567890abcdef1234567890abcdef",
"summary": "Customer inquired about order ORD-123 status. Agent confirmed it shipped yesterday.",
"tags": [
"vip",
"escalation"
],
"tenant_id": "tenant-123",
"transcript": null,
"turn_count": 12,
"updated_at": "2024-01-15T10:32:22Z",
"vad_events": null,
"voice": "alloy"
}
Create a voice session in the phone-server store.
Tenant-scoped endpoint for persisted voice session records, stream lookup, and evaluation history.
POST
/
api
/
v1
/
voice-sessions
curl --request POST \
--url 'https://api.voice.stateset.com/api/v1/voice-sessions' \
--header "Authorization: Bearer $STATESET_VOICE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"agent_name": "string",
"call_sid": "string",
"call_type": "string",
"customer_phone": "+1 415 555 0142",
"duration_ms": 8,
"metadata": null,
"model": "string",
"org_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"sentiment": "string",
"status": "pending",
"stream_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"summary": "Two-person tent, green — replacement for damaged pole set.",
"tags": [
"priority"
],
"transcript": null,
"voice": "string"
}'
{
"agent_name": "ResponseCX",
"call_sid": "CA1234567890abcdef1234567890abcdef",
"call_type": "inbound",
"created_at": "2024-01-15T10:30:00Z",
"customer_phone": "+15555555678",
"duration_ms": 142000,
"ended_at": "2024-01-15T10:32:22Z",
"function_calls": null,
"id": "550e8400-e29b-41d4-a716-446655440000",
"metadata": null,
"model": "gpt-4o-realtime-preview",
"org_id": "org-456",
"rating": 4,
"sentiment": "positive",
"started_at": "2024-01-15T10:30:00Z",
"status": "completed",
"stream_id": "MZ1234567890abcdef1234567890abcdef",
"summary": "Customer inquired about order ORD-123 status. Agent confirmed it shipped yesterday.",
"tags": [
"vip",
"escalation"
],
"tenant_id": "tenant-123",
"transcript": null,
"turn_count": 12,
"updated_at": "2024-01-15T10:32:22Z",
"vad_events": null,
"voice": "alloy"
}
Tenant-scoped endpoint for persisted voice session records, stream lookup, and evaluation history.
Request body
CreateVoiceSessionRequest
Response
VoiceSession
Status codes
| Code | Meaning |
|---|---|
201 | Created voice session |
400 | Invalid request body |
401 | Unauthorized - invalid or missing bearer token |
409 | Voice session stream already exists |
500 | Internal server error |
503 | Database not configured - set DATABASE_URL |
curl --request POST \
--url 'https://api.voice.stateset.com/api/v1/voice-sessions' \
--header "Authorization: Bearer $STATESET_VOICE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"agent_name": "string",
"call_sid": "string",
"call_type": "string",
"customer_phone": "+1 415 555 0142",
"duration_ms": 8,
"metadata": null,
"model": "string",
"org_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"sentiment": "string",
"status": "pending",
"stream_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"summary": "Two-person tent, green — replacement for damaged pole set.",
"tags": [
"priority"
],
"transcript": null,
"voice": "string"
}'
{
"agent_name": "ResponseCX",
"call_sid": "CA1234567890abcdef1234567890abcdef",
"call_type": "inbound",
"created_at": "2024-01-15T10:30:00Z",
"customer_phone": "+15555555678",
"duration_ms": 142000,
"ended_at": "2024-01-15T10:32:22Z",
"function_calls": null,
"id": "550e8400-e29b-41d4-a716-446655440000",
"metadata": null,
"model": "gpt-4o-realtime-preview",
"org_id": "org-456",
"rating": 4,
"sentiment": "positive",
"started_at": "2024-01-15T10:30:00Z",
"status": "completed",
"stream_id": "MZ1234567890abcdef1234567890abcdef",
"summary": "Customer inquired about order ORD-123 status. Agent confirmed it shipped yesterday.",
"tags": [
"vip",
"escalation"
],
"tenant_id": "tenant-123",
"transcript": null,
"turn_count": 12,
"updated_at": "2024-01-15T10:32:22Z",
"vad_events": null,
"voice": "alloy"
}
Last modified on August 31, 2026