Upload a new custom sound to the workspace.
The request must be sent as
multipart/form-dataand contain the audio file in thesoundfield and the display name in thenamefield.The file size must not exceed
5 MB(5242880 bytes), and the file MIME type must be one ofaudio/mpeg,audio/mp3,audio/wav, oraudio/x-wav.
This endpoint replaces the deprecated DDP methods insertOrUpdateSound and uploadCustomSound, which will be removed in 9.0.0.
Permission required: manage-sounds
Changelog
| Version | Description |
|---|---|
| 8.5.0 | Added |
The authToken of the authenticated user.
The userId of the authenticated user.
{
"name": "doremi"
}The audio file to upload. Allowed MIME types are audio/mpeg, audio/mp3, audio/wav, and audio/x-wav. Maximum size is 5 MB (5242880 bytes).
The display name of the custom sound. Must be at least one character long and must not contain colons, whitespace, or the characters ,, >, <, &, ", ', /, \, (, or ).
OK
{
"sound": {
"_id": "65462caea2f73c7460e18f83"
},
"success": true
}Bad Request
{
"success": false,
"error": "MIME type not allowed"
}{
"success": false,
"error": "[error-file-too-large]"
}{
"success": false,
"error": "The custom sound name is already in use [Custom_Sound_Error_Name_Already_In_Use]"
}{
"success": false,
"error": "