curl --request GET \
--url https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/voice/availability \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/voice/availability', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/voice/availability"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"available": false,
"reason": "FORBIDDEN"
}Tell whether the signed-in user can open a voice session
Runs the checks of a real voice session for the active organization of the
request: a signed-in user, voice allowed by the organization (AI
Governance), the audio-transcriptions permission, and an
allowed transcription model served by a supported provider. Nothing of the
session configuration is returned.
The check consumes no voice quota, so it cannot tell that one is reached:
a session refused for its quota closes with QUOTA_EXCEEDED. When the
answer is available: true, open the session on
wss://{host}/v2/workspaces/slug:agent-factory/ws/v1/agents/{agentId}.
curl --request GET \
--url https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/voice/availability \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/voice/availability', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/voice/availability"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"available": false,
"reason": "FORBIDDEN"
}Authorizations
User-bound credential carrying an identity: either a session JWT
or a user access token (at:*) generated from the user settings UI.
Send as Authorization: Bearer <token>.
Org API keys (iak_*) are not accepted here - they carry
no user identity. Use the x-prismeai-api-key header instead
(see OrgApiKeyAuth).
Response
Availability for the caller. A refusal is not an HTTP error.
Why not, when available is false: FORBIDDEN (no signed-in
user, or no audio-transcriptions permission),
VOICE_DISABLED (the organization turned voice off),
MODEL_NOT_ALLOWED or NO_TRANSCRIPTION_MODEL (governance of
the organization), UNSUPPORTED_PROVIDER (the transcription
model is not served by a supported provider), UNAVAILABLE
otherwise.
Was this page helpful?