POST
/audio/voice_consentsCreate a voice consent recording
Creates a voice consent recording by uploading its audio file with a label and language tag. Provide name, recording, and language, and send the recording as multipart form data in a supported audio format. The response includes the new recording's identifier and creation timestamp.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Multipart form data for a voice consent recording. name, recording, and language are 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, including its 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.
400Returned when the consent recording or consent phrase is invalid.
errorobjectrequired
404Returned when the endpoint is unavailable to the caller.
errorobjectrequired
Error handling
A 400 is returned when the consent recording or consent phrase is invalid, and a 404 is returned when the endpoint is unavailable to the caller. name, recording, and language are required; the recording must not exceed 10 MiB and must use a supported audio MIME type, and language must be a BCP 47 tag.