Documentation Index

Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt

Use this file to discover all available pages before exploring further.

Update Custom Sound

Prev Next
Post
/api/v1/custom-sounds.update

Update an existing custom sound.

  • The request must be sent as multipart/form-data. The _id and name fields are required; the sound file 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 of audio/mpeg, audio/mp3, audio/wav, or audio/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
Header parameters
X-Auth-Token
stringRequired

The authToken of the authenticated user.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired

The userId of the authenticated user.

ExamplerbAXPnMktTFbNpwtJ
Body parameters
Example
{
  "_id": "65462caea2f73c7460e18f83",
  "name": "doremi-v2"
}
object
_id
string Required

The ID of the custom sound to update.

Example65462caea2f73c7460e18f83
name
string Required

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 ).

Exampledoremi-v2
sound
string (binary)

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).

Responses
200

OK

Success
{
  "success": true
}
object
success
boolean
400

Bad Request

Sound not found
{
  "success": false,
  "error": "Custom Sound not found."
}
MIME type not allowed
{
  "success": false,
  "error": "MIME type not allowed"
}
File too large
{
  "success": false,
  "error": "[error-file-too-large]"
}
Name already in use
{
  "success": false,
  "error": "The custom sound name is already in use [Custom_Sound_Error_Name_Already_In_Use]"
}
Invalid name
{
  "success": false,
  "error": "