curl --request POST 'https://api.voicecheap.ai/v1/actions/notifications_update' \
--header "x-api-key: $VOICECHEAP_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"requestId":"58d5bb53-00d0-4692-bdaf-c6650ee87e30","videoTranslation":true,"activityReminder":false}'
const input = {
requestId: '58d5bb53-00d0-4692-bdaf-c6650ee87e30',
videoTranslation: true,
activityReminder: false,
};
const response = await fetch('https://api.voicecheap.ai/v1/actions/notifications_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/notifications_update",
headers={"x-api-key": os.environ["VOICECHEAP_API_KEY"]},
json={"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30", "videoTranslation": True, "activityReminder": False},
timeout=120,
)
body = response.json()
if not response.ok:
raise RuntimeError(f"{body.get('code')}: {body.get('message')}")
print(body)
{
"data": {
"projectCreation": false,
"videoTranslation": true,
"videoLipsync": false,
"activityReminder": false
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "notifications_update",
"createdAt": 1792144800000,
"updatedAt": 1792144820000,
"status": "running",
"pollAfterSeconds": 5
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "notifications_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 preferenze di notifica
Aggiorna le tue preferenze di notifica personali. Le preferenze omesse restano invariate.
POST
/
v1
/
actions
/
notifications_update
curl --request POST 'https://api.voicecheap.ai/v1/actions/notifications_update' \
--header "x-api-key: $VOICECHEAP_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"requestId":"58d5bb53-00d0-4692-bdaf-c6650ee87e30","videoTranslation":true,"activityReminder":false}'
const input = {
requestId: '58d5bb53-00d0-4692-bdaf-c6650ee87e30',
videoTranslation: true,
activityReminder: false,
};
const response = await fetch('https://api.voicecheap.ai/v1/actions/notifications_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/notifications_update",
headers={"x-api-key": os.environ["VOICECHEAP_API_KEY"]},
json={"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30", "videoTranslation": True, "activityReminder": False},
timeout=120,
)
body = response.json()
if not response.ok:
raise RuntimeError(f"{body.get('code')}: {body.get('message')}")
print(body)
{
"data": {
"projectCreation": false,
"videoTranslation": true,
"videoLipsync": false,
"activityReminder": false
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "notifications_update",
"createdAt": 1792144800000,
"updatedAt": 1792144820000,
"status": "running",
"pollAfterSeconds": 5
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "notifications_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 tue preferenze di notifica personali. Le preferenze omesse restano invariate.
Autorizzazioni richieste:
POST https://api.voicecheap.ai/v1/actions/notifications_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}$.boolean
Valore booleano.
boolean
Valore booleano.
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."
},
"projectCreation": {
"type": "boolean"
},
"videoTranslation": {
"type": "boolean"
},
"videoLipsync": {
"type": "boolean"
},
"activityReminder": {
"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/notifications_update' \
--header "x-api-key: $VOICECHEAP_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"requestId":"58d5bb53-00d0-4692-bdaf-c6650ee87e30","videoTranslation":true,"activityReminder":false}'
const input = {
requestId: '58d5bb53-00d0-4692-bdaf-c6650ee87e30',
videoTranslation: true,
activityReminder: false,
};
const response = await fetch('https://api.voicecheap.ai/v1/actions/notifications_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/notifications_update",
headers={"x-api-key": os.environ["VOICECHEAP_API_KEY"]},
json={"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30", "videoTranslation": True, "activityReminder": False},
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. Restituisce tutte le preferenze personali di notifica dopo aver applicato le modifiche fornite.{
"data": {
"projectCreation": false,
"videoTranslation": true,
"videoLipsync": false,
"activityReminder": false
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "notifications_update",
"createdAt": 1792144800000,
"updatedAt": 1792144820000,
"status": "running",
"pollAfterSeconds": 5
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "notifications_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.projectCreation | Preferenza per le notifiche email sulla creazione dei progetti. Il valore predefinito è false se non impostata. |
data.videoTranslation | Preferenza per la notifica email al completamento della traduzione. Il valore predefinito è true se non impostata. |
data.videoLipsync | Preferenza per le notifiche email sugli eventi di sincronizzazione labiale. Il valore predefinito è false se non impostata. |
data.activityReminder | Preferenza per le email di promemoria delle attività. Il valore predefinito è true se non impostata. |
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":"notifications_update"}'
HTTP 200
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "notifications_update",
"status": "completed",
"createdAt": 1792144800000,
"updatedAt": 1792144820000,
"resultStored": true,
"result": {
"projectCreation": false,
"videoTranslation": true,
"videoLipsync": false,
"activityReminder": false
}
}
}
Note sull’operazione
- Fornisci almeno una preferenza. Le preferenze omesse mantengono il valore salvato o quello predefinito.
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_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 | SUBSCRIPTION_REQUIRED | Usa un abbonamento a pagamento attivo. |
| 403 | TEAM_OWNER_NOT_FOUND | Non è stato possibile trovare l’account effettivo del proprietario del team. |
| 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?

