curl --request POST 'https://api.voicecheap.ai/v1/actions/settings_update' \
--header "x-api-key: $VOICECHEAP_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"requestId":"58d5bb53-00d0-4692-bdaf-c6650ee87e30","brandVocabulary":["VoiceCheap"],"customTranslationInstructions":"Keep product names unchanged.","isSoundNotificationsEnabled":true}'
const input = {
requestId: '58d5bb53-00d0-4692-bdaf-c6650ee87e30',
brandVocabulary: ['VoiceCheap'],
customTranslationInstructions: 'Keep product names unchanged.',
isSoundNotificationsEnabled: true,
};
const response = await fetch('https://api.voicecheap.ai/v1/actions/settings_update', {
method: 'POST',
headers: {
'x-api-key': process.env.VOICECHEAP_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify(input),
});
const body = await response.json();
if (!response.ok) throw new Error(body.code + ': ' + body.message);
console.log(body);
import os
import requests
response = requests.post(
"https://api.voicecheap.ai/v1/actions/settings_update",
headers={"x-api-key": os.environ["VOICECHEAP_API_KEY"]},
json={"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30", "brandVocabulary": ["VoiceCheap"], "customTranslationInstructions": "Keep product names unchanged.", "isSoundNotificationsEnabled": True},
timeout=120,
)
body = response.json()
if not response.ok:
raise RuntimeError(f"{body.get('code')}: {body.get('message')}")
print(body)
{
"data": {
"updated": true
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "settings_update",
"createdAt": 1792144800000,
"updatedAt": 1792144820000,
"status": "running",
"pollAfterSeconds": 5
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "settings_update",
"createdAt": 1792144800000,
"updatedAt": 1792144820000,
"status": "completed",
"resultStored": false,
"message": "The action completed. Retrieve its output from the corresponding history or resource action."
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
Impostazioni e notifiche
Aggiorna le impostazioni dell'account
Aggiorna le impostazioni personali supportate. Solo il proprietario del team può modificare il vocabolario condiviso e le istruzioni di traduzione. Le impostazioni omesse restano invariate.
POST
/
v1
/
actions
/
settings_update
curl --request POST 'https://api.voicecheap.ai/v1/actions/settings_update' \
--header "x-api-key: $VOICECHEAP_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"requestId":"58d5bb53-00d0-4692-bdaf-c6650ee87e30","brandVocabulary":["VoiceCheap"],"customTranslationInstructions":"Keep product names unchanged.","isSoundNotificationsEnabled":true}'
const input = {
requestId: '58d5bb53-00d0-4692-bdaf-c6650ee87e30',
brandVocabulary: ['VoiceCheap'],
customTranslationInstructions: 'Keep product names unchanged.',
isSoundNotificationsEnabled: true,
};
const response = await fetch('https://api.voicecheap.ai/v1/actions/settings_update', {
method: 'POST',
headers: {
'x-api-key': process.env.VOICECHEAP_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify(input),
});
const body = await response.json();
if (!response.ok) throw new Error(body.code + ': ' + body.message);
console.log(body);
import os
import requests
response = requests.post(
"https://api.voicecheap.ai/v1/actions/settings_update",
headers={"x-api-key": os.environ["VOICECHEAP_API_KEY"]},
json={"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30", "brandVocabulary": ["VoiceCheap"], "customTranslationInstructions": "Keep product names unchanged.", "isSoundNotificationsEnabled": True},
timeout=120,
)
body = response.json()
if not response.ok:
raise RuntimeError(f"{body.get('code')}: {body.get('message')}")
print(body)
{
"data": {
"updated": true
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "settings_update",
"createdAt": 1792144800000,
"updatedAt": 1792144820000,
"status": "running",
"pollAfterSeconds": 5
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "settings_update",
"createdAt": 1792144800000,
"updatedAt": 1792144820000,
"status": "completed",
"resultStored": false,
"message": "The action completed. Retrieve its output from the corresponding history or resource action."
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
Aggiorna le impostazioni personali supportate. Solo il proprietario del team può modificare il vocabolario condiviso e le istruzioni di traduzione. Le impostazioni omesse restano invariate.
Autorizzazioni richieste:
POST https://api.voicecheap.ai/v1/actions/settings_update
Autenticazione e autorizzazioni
string
obbligatorio
Invia una chiave API VoiceCheap in questa intestazione. È supportato anche Authorization: Bearer con la stessa chiave API. I token di accesso OAuth
sono accettati solo da MCP, non da questo endpoint REST.
settings:write.
È necessario un abbonamento a pagamento attivo. Le autorizzazioni non modificano i ruoli del team, la proprietà delle risorse, i crediti multimediali o i limiti del piano.
Parametri
string
Facoltativo al livello di trasporto: se omesso, il server inserisce un identificatore prima della validazione. Fornisci un tuo UUID v4 stabile per recuperare in sicurezza una risposta persa.Formato: “uuid”. Pattern:
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$.string
Valore testuale.Lunghezza minima: 1. Lunghezza massima: 120.
array
Elenco di valori. Consulta lo schema di input completo per la struttura degli elementi.Numero massimo di elementi: 1000.
string
Valore testuale.Lunghezza massima: 500.
union
Accetta le alternative elencate nello schema di input completo.
array
Elenco di valori. Consulta lo schema di input completo per la struttura degli elementi.Numero massimo di elementi: 50.
array
Elenco di valori. Consulta lo schema di input completo per la struttura degli elementi.Numero massimo di elementi: 50.
array
Elenco di valori. Consulta lo schema di input completo per la struttura degli elementi.Numero massimo di elementi: 10.
object
Oggetto JSON. Consulta lo schema di input completo per i campi annidati.
boolean
Valore booleano.
boolean
Valore booleano.
Schema di input completo
Schema di input completo
Il JSON Schema seguente conserva i nomi esatti dei campi, i tipi annidati, i valori predefiniti, i limiti e i valori accettati esposti dalla discovery. Le ulteriori regole tra campi sono elencate nelle note sull’operazione.
{
"type": "object",
"properties": {
"requestId": {
"type": "string",
"format": "uuid",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
"description": "UUID v4 for this action. Reuse the same ID with identical arguments on retries."
},
"companyName": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"brandVocabulary": {
"maxItems": 1000,
"type": "array",
"items": {
"type": "string",
"maxLength": 500
}
},
"customTranslationInstructions": {
"type": "string",
"maxLength": 500
},
"favoriteTemplates": {
"anyOf": [
{
"type": "object",
"properties": {
"dynamicSubtitles": {
"anyOf": [
{
"type": "string",
"enum": [
"Sara",
"Daniel",
"Dan 2",
"Hormozi 4",
"Dan",
"Devin",
"Tayo",
"Ella",
"Tracy",
"Luke",
"Hormozi 1",
"Hormozi 2",
"Hormozi 3",
"Hormozi 5",
"Leon",
"Ali",
"Beast",
"Maya",
"Karl",
"Iman",
"Umi",
"David",
"Noah",
"Gstaad",
"Malta",
"Nema",
"Seth",
"William"
]
},
{
"type": "null"
}
]
},
"voiceIds": {
"anyOf": [
{
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 256
}
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"targetLanguagePresets": {
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"languages": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 2,
"maxLength": 64
}
}
},
"required": ["id", "name", "languages"],
"additionalProperties": false
}
},
"socialMediaStatsPresets": {
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"channelIds": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"pattern": "^[^/]+$"
}
}
},
"required": ["id", "name", "channelIds"],
"additionalProperties": false
}
},
"textToSpeechBrandPresets": {
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 60
},
"voice": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"instructionPreset": {
"type": "string",
"enum": ["default", "cheerful", "calm", "narrator", "dramatic", "whisper", "energetic"]
},
"instructions": {
"type": "string",
"maxLength": 300
},
"speed": {
"type": "number",
"minimum": 0.5,
"maximum": 2
}
},
"required": ["id", "name", "voice", "instructionPreset", "instructions", "speed"],
"additionalProperties": false
}
},
"defaultVoiceCloningSettings": {
"type": "object",
"properties": {
"stability": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"similarity": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": ["stability", "similarity"],
"additionalProperties": false
},
"isSoundNotificationsEnabled": {
"type": "boolean"
},
"isVoiceCloningSettingsTipDismissed": {
"type": "boolean"
}
},
"additionalProperties": false
}
Idempotenza
Usa un UUID v4 in requestId o nell’intestazione HTTP Idempotency-Key per ogni modifica. Riutilizza lo stesso identificatore e argomenti identici dopo un errore di rete. Se vengono forniti entrambi, devono coincidere. Ripetere una richiesta salvata non ripete l’operazione e non consuma un’altra chiamata mensile. Le richieste non riuscite o interrotte non vengono riavviate automaticamente. Ogni modifica può restituire HTTP 202 quando un nuovo tentativo trova la stessa richiesta ancora in esecuzione, anche se la prima esecuzione è normalmente sincrona. Se l’esecuzione è completata ma resultStored è false, un nuovo tentativo restituisce HTTP 200 con lo stato della richiesta salvata anziché il risultato originale. Recupera l’output tramite l’azione di cronologia, risultato o download del relativo dominio.Esempi di richiesta
Sostituisci gli identificatori delle risorse e le chiavi multimediali di esempio con i valori restituiti per il tuo account. Mantieni stabile l’identificatore della richiesta quando ripeti la stessa modifica.curl --request POST 'https://api.voicecheap.ai/v1/actions/settings_update' \
--header "x-api-key: $VOICECHEAP_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"requestId":"58d5bb53-00d0-4692-bdaf-c6650ee87e30","brandVocabulary":["VoiceCheap"],"customTranslationInstructions":"Keep product names unchanged.","isSoundNotificationsEnabled":true}'
const input = {
requestId: '58d5bb53-00d0-4692-bdaf-c6650ee87e30',
brandVocabulary: ['VoiceCheap'],
customTranslationInstructions: 'Keep product names unchanged.',
isSoundNotificationsEnabled: true,
};
const response = await fetch('https://api.voicecheap.ai/v1/actions/settings_update', {
method: 'POST',
headers: {
'x-api-key': process.env.VOICECHEAP_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify(input),
});
const body = await response.json();
if (!response.ok) throw new Error(body.code + ': ' + body.message);
console.log(body);
import os
import requests
response = requests.post(
"https://api.voicecheap.ai/v1/actions/settings_update",
headers={"x-api-key": os.environ["VOICECHEAP_API_KEY"]},
json={"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30", "brandVocabulary": ["VoiceCheap"], "customTranslationInstructions": "Keep product names unchanged.", "isSoundNotificationsEnabled": True},
timeout=120,
)
body = response.json()
if not response.ok:
raise RuntimeError(f"{body.get('code')}: {body.get('message')}")
print(body)
Risposta
Una prima esecuzione riuscita restituisce HTTP 200 con il risultato dell’operazione in data. Una ripetizione può invece restituire lo stato della richiesta salvata. L’esempio mostra una risposta supportata, non tutti i campi facoltativi. Conferma che le impostazioni supportate fornite sono state salvate.{
"data": {
"updated": true
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "settings_update",
"createdAt": 1792144800000,
"updatedAt": 1792144820000,
"status": "running",
"pollAfterSeconds": 5
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "settings_update",
"createdAt": 1792144800000,
"updatedAt": 1792144820000,
"status": "completed",
"resultStored": false,
"message": "The action completed. Retrieve its output from the corresponding history or resource action."
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
Campi del risultato
| Campo | Descrizione |
|---|---|
data.updated | true al completamento dell’aggiornamento delle impostazioni. |
Recupera e monitora questa richiesta
Usa lo stesso identificatore anche dopo una connessione persa. Se resultStored è false, recupera l’output tramite la corrispondente azione di cronologia, risultato o download. Non avviare mai una seconda generazione solo per verificarne l’avanzamento.curl --request POST 'https://api.voicecheap.ai/v1/actions/action_request_get' \
--header "x-api-key: $VOICECHEAP_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"requestId":"58d5bb53-00d0-4692-bdaf-c6650ee87e30","operation":"settings_update"}'
HTTP 200
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "settings_update",
"status": "completed",
"createdAt": 1792144800000,
"updatedAt": 1792144820000,
"resultStored": true,
"result": {
"updated": true
}
}
}
Note sull’operazione
- Fornisci almeno un’impostazione oltre al requestId facoltativo. Le impostazioni omesse rimangono invariate.
- Solo il proprietario del team può modificare brandVocabulary e customTranslationInstructions. I membri del team possono aggiornare le proprie altre preferenze.
- Il vocabolario accetta fino a 1,000 termini. Ogni termine normalizzato deve contenere al massimo 49 caratteri e cinque parole, senza parentesi quadre, graffe, angolari o barre rovesciate. I termini duplicati vengono rimossi senza distinzione tra maiuscole e minuscole.
- I nomi delle aziende contengono 1–120 caratteri. Le istruzioni di traduzione dell’account contengono al massimo 500 caratteri.
- Le preimpostazioni di lingue e canali accettano fino a 50 preimpostazioni, ciascuna con 1–50 lingue o canali selezionati. Le preimpostazioni del brand per la sintesi vocale accettano fino a 10 ID univoci, nomi di 60 caratteri, istruzioni di 300 caratteri e speed da 0.5 a 2.
Utilizzo
Ogni invocazione riuscita consuma una chiamata API/MCP mensile. Si applicano anche i crediti multimediali e le quote di generazione proprie dell’operazione.Errori
| Stato HTTP | Codice | Significato o risoluzione |
|---|---|---|
| 400 | CREDENTIAL_IN_QUERY | Le credenziali sono state fornite in un parametro di query access_token o api_key. Invia le credenziali negli header. |
| 400 | IDEMPOTENCY_CONFLICT | L’intestazione Idempotency-Key e il campo requestId del corpo devono coincidere. |
| 400 | INVALID_BRAND_VOCABULARY | Uno o più termini del vocabolario non rispettano le regole relative a lunghezza del termine, numero di parole o caratteri. |
| 400 | INVALID_REQUEST_ID | Fornisci requestId o Idempotency-Key come UUID v4. |
| 400 | VALIDATION_ERROR | L’oggetto JSON contiene un campo non supportato, un valore non valido o un argomento obbligatorio mancante. |
| 401 | API_KEY_EXPIRED | La chiave API è scaduta. |
| 401 | INVALID_API_KEY | Fornisci una chiave API valida e non scaduta. |
| 401 | INVALID_CREDENTIAL | L’header Authorization non è valido oppure è in conflitto con x-api-key. |
| 401 | MISSING_CREDENTIAL | Non è stata fornita alcuna credenziale utilizzabile negli header, oppure la credenziale superava 4096 caratteri. |
| 401 | USER_NOT_FOUND | L’account associato alla credenziale non esiste più. |
| 403 | ACCOUNT_UNAVAILABLE | L’account che esegue l’azione o quello di fatturazione non è disponibile o è in fase di eliminazione. |
| 403 | AMBIGUOUS_TEAM_API_KEY | L’utente della credenziale appartiene a più di un team, quindi il contesto di fatturazione è ambiguo. |
| 403 | INSUFFICIENT_SCOPE | Concedi tutte le autorizzazioni richieste o scegli un’altra credenziale. |
| 403 | INTEGRATION_PLAN_UNSUPPORTED | Impossibile verificare i limiti di integrazione dell’account. |
| 403 | PAID_SUBSCRIPTION_REQUIRED | Il salvataggio di preimpostazioni vocali di sintesi vocale nuove o modificate richiede un abbonamento a pagamento effettivo. |
| 403 | SUBSCRIPTION_REQUIRED | Usa un abbonamento a pagamento attivo. |
| 403 | TEAM_OWNER_NOT_FOUND | Non è stato possibile trovare l’account effettivo del proprietario del team. |
| 403 | TEAM_OWNER_REQUIRED | Questa azione richiede l’account proprietario del team o delle impostazioni condivise. |
| 404 | ACCOUNT_NOT_FOUND | Non è stato possibile trovare l’account o l’account dell’area di lavoro attiva. |
| 409 | CONCURRENT_ACTION_LIMIT_REACHED | Questo account ha già 10 azioni di integrazione in esecuzione. Interroga una richiesta esistente prima di avviarne un’altra. |
| 409 | IDEMPOTENCY_CONFLICT | Riutilizza un identificatore solo con la stessa operazione e gli stessi argomenti. |
| 429 | INTEGRATION_MONTHLY_LIMIT_REACHED | Attendi il ripristino mensile o cambia piano. |
| 429 | INTEGRATION_RATE_LIMIT_REACHED | Rispetta Retry-After quando presente e applica attese crescenti tra i tentativi. |
| 500 | INTERNAL_ERROR | Controlla lo stato della richiesta salvata e la cronologia delle risorse prima di decidere se ripetere una modifica. |
| 503 | ACTION_RESULT_UNAVAILABLE | L’azione è stata eseguita ma non è stato possibile salvarne il risultato. Esamina lo stato della richiesta salvata e la cronologia delle risorse prima di avviare una nuova generazione. |
| 503 | SERVER_RESTARTING | Il server si sta riavviando. Riprova tra poco e mantieni lo stesso identificatore della richiesta per una modifica. |
{
"code": "INSUFFICIENT_SCOPE",
"message": "This credential does not permit the requested action.",
"status": 403,
"details": {
"requiredScopes": ["settings:write"]
}
}
Questa pagina è stata utile?

