Riferimento API / Account

Account

Gli endpoint del gruppo Account dell'API Voiceland AI, con parametri, schemi ed esempi curl.

Ultimo aggiornamento:

Le descrizioni degli endpoint e dei campi restano in inglese, esattamente come le pubblica l'API. È una scelta voluta: qui legge ciò che vedrà anche nelle risposte.

POST /v1/sessions/local#

Mint a local session. Mints a short-lived session token + broker WebSocket URLs for driving an agent locally (used by the SDK's local mode).

Corpo della richiesta

application/json Schema: SessionLocalRequest

Campo Tipo Obbligatorio Descrizione
agent string Agent to open a local session for.
scopes array of string

Risposte

Codice Descrizione
200 Success.
401 Missing or invalid API key.
4XX Request error (validation, not-found, etc.).
5XX Server or upstream error.

Esempio di richiesta

curl -X POST "https://api.voiceland.ai/v1/sessions/local" \
  -H "Authorization: Bearer VL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "agent": "front-desk"
}'

Una risposta riuscita restituisce un SessionLocalResponse.

Esempio di risposta

{
  "api_version": "2026-04-26",
  "token": "…"
}

GET /v1/tenant#

Get your tenant profile. Your tenant slug, default API version, inbound SIP trunk, and (when configured) the outbound trunk state.

Risposte

Codice Descrizione
200 Success.
401 Missing or invalid API key.
4XX Request error (validation, not-found, etc.).
5XX Server or upstream error.

Esempio di richiesta

curl "https://api.voiceland.ai/v1/tenant" \
  -H "Authorization: Bearer VL_API_KEY"

Una risposta riuscita restituisce un Response.

Esempio di risposta

{
  "default_api_version": "2026-04-26",
  "slug": "acme"
}

GET /v1/voices#

List voices. The catalog of available voices you can set on an agent (use voice_id in voice.voice_id).

Risposte

Codice Descrizione
200 Success.
401 Missing or invalid API key.
4XX Request error (validation, not-found, etc.).
5XX Server or upstream error.

Esempio di richiesta

curl "https://api.voiceland.ai/v1/voices" \
  -H "Authorization: Bearer VL_API_KEY"

Esempio di risposta

{
  "items": [
    {
      "display_name": "Adam",
      "languages": [
        "en"
      ],
      "provider": "elevenlabs",
      "voice_id": "pNInz6obpgDQGcFmaJgB"
    }
  ]
}

Schemi#

Error#

Error envelope returned for non-2xx responses.

Campo Tipo Obbligatorio Descrizione
error object

OutboundView#

Campo Tipo Obbligatorio Descrizione
host string
port integer
ready boolean
transport string

Response#

Campo Tipo Obbligatorio Descrizione
default_api_version string
outbound OutboundView
sip_trunk string Your inbound SIP trunk URI.
slug string Your tenant slug.

SessionLocalRequest#

Campo Tipo Obbligatorio Descrizione
agent string Agent to open a local session for.
scopes array of string

SessionLocalResponse#

Campo Tipo Obbligatorio Descrizione
api_version string
broker_ws_urls map of string
expires_at string
token string

La console

Queste pagine sono di sola lettura. La chiamata di prova, le chiavi API e il riferimento API aggiornato si trovano nella console, dove il suo account è connesso.

Apri la console