Skip to main content
PATCH
/
api
/
v1
/
media
/
{id}
Update media file
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({description: '<string>'})
};

fetch('https://blackbox.dasha.ai/api/v1/media/{id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "fileName": "<string>",
  "originalFileName": "<string>",
  "fileSizeBytes": 123,
  "contentType": "<string>",
  "createdTime": "2023-11-07T05:31:56Z",
  "description": "<string>"
}

Path Parameters

id
string<uuid>
required

Media file identifier

Body

Update request with new description

Request to update media file metadata. Currently supports modifying the description field only. The file content itself cannot be changed; to use a different file, upload a new one and update agent configurations accordingly. Setting description to null or empty string clears the existing description.

description
string | null

Updated description for the media file. Set to null or empty string to remove the existing description. Useful for updating file documentation as usage evolves or correcting information without re-uploading the file.

Maximum string length: 1000

Response

Media file updated successfully

Media file information including metadata, storage details, and usage context. Contains all data needed to reference the file in agent configurations and track its properties and lifecycle.

id
string<uuid>
required

Unique identifier for this media file. Use this ID when configuring agents to reference the file for warm transfers, cold transfers, or ambient noise features.

fileName
string
required

Server-assigned filename used for internal storage. This may differ from the original filename and is generated to ensure uniqueness and avoid conflicts in the storage system.

Minimum string length: 1
originalFileName
string
required

Original filename as provided during upload. Preserved for display purposes and to help identify the file in the user interface.

Minimum string length: 1
fileSizeBytes
integer<int64>
required

File size in bytes. Useful for storage management and estimating bandwidth requirements when the file is played during calls.

contentType
string
required

MIME content type detected from the uploaded file. Common values include "audio/mpeg" for MP3 files, "audio/wav" for WAV files, and "audio/flac" for FLAC files. Used for proper content handling and playback.

Minimum string length: 1
createdTime
string<date-time>
required

Timestamp when the media file was originally uploaded to the system.

description
string | null

Description of the media file's purpose or content. Helps identify and organize files when managing multiple media files for different use cases. Null when no description has been provided.