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.

Create Custom Sound

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

Upload a new custom sound to the workspace.

  • The request must be sent as multipart/form-data and contain the audio file in the sound field and the display name in the name field.

  • 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
{
  "name": "doremi"
}
object
sound
string (binary) Required

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

name
string Required

The display name of the custom sound. Must be at least one character long and must not contain colons, whitespace, or the characters ,, >, <, &, ", ', /, \, (, or ).

Exampledoremi
Responses
200

OK

Success Example
{
  "sound": {
    "_id": "65462caea2f73c7460e18f83"
  },
  "success": true
}
Expand All
object
sound
object
_id
string
success
boolean
400

Bad Request

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": "