POST
/audio/voice_consentsUpload a voice consent recording
Uploads a voice consent recording that authorizes creation of a custom voice. Send the request as multipart/form-data with the audio file in the recording field. Supply name, recording, and language — all are required. Returns the created consent object with its identifier.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Voice consent upload. name, recording, and language are all required.
namestringrequired
The label to use for this consent recording.
recordingstringrequired
The consent audio recording file. Maximum size is 10 MiB.
Supported MIME types:
`audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`, `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`.
languagestringrequired
The BCP 47 language tag for the consent phrase (for example, `en-US`).
200Returns the created voice consent object with its unique identifier, name, language, and creation timestamp.
objectstringrequired
The object type, which is always `audio.voice_consent`.
idstringrequired
The consent recording identifier.
namestringrequired
The label provided when the consent recording was uploaded.
languagestringrequired
The BCP 47 language tag for the consent phrase (for example, `en-US`).
created_atintegerrequired
The Unix timestamp (in seconds) for when the consent recording was created.
Error handling
name is required and must be a non-empty string. recording is required and must be an audio file in one of the supported formats: audio/mpeg, audio/wav, audio/x-wav, audio/ogg, audio/aac, audio/flac, audio/webm, or audio/mp4. Maximum file size is 10 MiB. language is required and must be a valid BCP 47 language tag (e.g., en-US).