Update an existing custom sound.
The request must be sent as
multipart/form-data. The_idandnamefields are required; thesoundfile field is optional and only required when replacing the audio file.When a new file is provided, 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.
{
"_id": "65462caea2f73c7460e18f83",
"name": "doremi-v2"
}The ID of the custom sound to update.
The updated display name of the custom sound. Must be at least one character long and must not contain colons, whitespace, or the characters ,, >, <, &, ", ', /, \, (, or ).
Optional. A new audio file to replace the existing one. If omitted, the current file is kept. Allowed MIME types are audio/mpeg, audio/mp3, audio/wav, and audio/x-wav. Maximum size is 5 MB (5242880 bytes).
OK
{
"success": true
}Bad Request
{
"success": false,
"error": "Custom Sound not found."
}{
"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": "