Skip to main content

List Voices

Returns all cached voices from the ultravox_voices database table. Voices are global (shared across all agencies) and are read from the local cache -- no external API key is needed for this endpoint.

Endpoint

PropertyValue
Function Namevoices-list
HTTP MethodGET
AuthenticationSupabase JWT (Bearer token)
Required RoleAny authenticated user

Request

Headers

Authorization: Bearer <supabase_jwt_token>

Query Parameters

FieldTypeRequiredDescription
languagestringNoFilter by primary language code (e.g., en, es)

Response

Success (200)

{
"voices": [
{
"id": "ultravox-voice-id",
"name": "Kore",
"description": "A warm, professional voice",
"language_label": "English (US)",
"primary_language": "en",
"ownership": "public",
"billing_style": "VOICE_BILLING_STYLE_INCLUDED",
"provider": "cartesia",
"preview_url": "https://...",
"definition": { },
"last_synced_at": "2025-01-15T12:00:00Z"
}
],
"total": 42,
"last_synced_at": "2025-01-15T12:00:00Z",
"sync_recommended": false
}

The sync_recommended field is true when the voices list is empty or the last sync was more than 24 hours ago.

Error Responses

StatusCondition
401Missing or invalid authorization header
405HTTP method is not GET
500Database query failed

Behavior

  • Authenticates the user via Supabase JWT
  • Queries the ultravox_voices table ordered by name
  • Applies optional language filter against the language column if provided
  • Checks the last_synced_at timestamp and sets sync_recommended: true if the data is empty or older than 24 hours
  • Returns all matching voice records

Database Tables Read

TableOperationPurpose
ultravox_voicesReadRetrieve cached voice data
  • Sync Voices -- Sync voices from Ultravox into the local cache