curl --request PUT \
--url https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/voice/preference \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"voice": "<string>",
"rate": 1.25
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({voice: '<string>', rate: 1.25})
};
fetch('https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/voice/preference', 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/preference"
payload = {
"voice": "<string>",
"rate": 1.25
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"voice": "openai-tts/nova",
"active": true,
"default": {
"ref": "openai-tts/alloy",
"name": "Alloy",
"source": "org_language"
},
"voices": [
{
"ref": "openai-tts/alloy",
"model_id": "openai-tts",
"id": "alloy",
"name": "Alloy",
"languages": [
"fr-FR"
]
},
{
"ref": "openai-tts/nova",
"model_id": "openai-tts",
"id": "nova",
"name": "Nova",
"languages": [
"fr-FR"
]
}
]
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Record the voice or the speech rate the signed-in member chose
Changes the fields given, each on its own: a field left out keeps its
value, null goes back to the default. voice must be offered by the
member’s organization, in any language; a session that it does not
speak skips it. rate is kept between 0.5 and 2; a voice session reads
it when the client sends no rate of its own.
curl --request PUT \
--url https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/voice/preference \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"voice": "<string>",
"rate": 1.25
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({voice: '<string>', rate: 1.25})
};
fetch('https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/voice/preference', 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/preference"
payload = {
"voice": "<string>",
"rate": 1.25
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"voice": "openai-tts/nova",
"active": true,
"default": {
"ref": "openai-tts/alloy",
"name": "Alloy",
"source": "org_language"
},
"voices": [
{
"ref": "openai-tts/alloy",
"model_id": "openai-tts",
"id": "alloy",
"name": "Alloy",
"languages": [
"fr-FR"
]
},
{
"ref": "openai-tts/nova",
"model_id": "openai-tts",
"id": "nova",
"name": "Nova",
"languages": [
"fr-FR"
]
}
]
}{
"error": "<string>",
"message": "<string>",
"details": {}
}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).
Query Parameters
Body
Response
Recorded; the same answer as GET.
The voice a session reads without the member's choice. A session also skips a catalog voice whose provider is not configured, which this answer does not check.
The voices the organization offers in language, as GET /v1/voice/availability?voices=true lists them.
Was this page helpful?