Update a media item
const url = 'https://api.siprtc.io/v1/Accounts/AC000000000000000000/Media/1042';const form = new FormData();form.append('file', 'file');form.append('content_type', 'application/pdf');form.append('docname', 'example');form.append('docdescription', 'example');form.append('doctype', 'example');form.append('quality', 'example');form.append('visibility', 'public');form.append('used_for', 'example');form.append('tags', 'example');form.append('scope', 'local');form.append('taskQueueSid', 'example');form.append('workspaceSid', 'example');
const options = {method: 'PUT', headers: {Authorization: 'Basic <credentials>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.siprtc.io/v1/Accounts/AC000000000000000000/Media/1042 \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: multipart/form-data' \ --form file=@file \ --form content_type=application/pdf \ --form docname=example \ --form docdescription=example \ --form doctype=example \ --form quality=example \ --form visibility=public \ --form used_for=example \ --form tags=example \ --form scope=local \ --form taskQueueSid=example \ --form workspaceSid=exampleChanges one of your own media items, as multipart/form-data (other content types are refused with 400). Only the fields you send change: docname (must stay unique), docdescription, doctype, quality, tags (replaces the list), scope, taskQueueSid/workspaceSid, visibility. Sending a new file replaces the stored file (same type and size rules as upload; content_type is then required) and, for documents, its TIFF rendering; the item keeps its visibility unless you change it.
Changing visibility switches the item’s link: public items get the permanent unauthenticated link, private ones lose it. Making audio private first asks the Contact Center service to release it from hold-music use; if that is refused the update fails with 400. When an audio item’s link changes, the Contact Center hold-music configuration is updated to the new link. Global items can be changed only by vendor and superuser accounts; global items shared by your parent account cannot be changed (404).
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Your account’s Auth ID (20 upper-case letters and digits).
Example
AC000000000000000000Media id.
Example
1042Request Body
Section titled “ Request Body ”object
Replacement file (at most 10 MB).
MIME type of the replacement file; required with file.
New document name, unique within your account.
New description.
New document type label.
New quality label.
New visibility.
ContactCenter: a replacement file skips TIFF conversion.
Replacement tag list.
New scope; global for vendor and superuser accounts only.
Contact Center task queue; requires workspaceSid.
Contact Center workspace.
Responses
Section titled “ Responses ”The updated media item, with status ‘success’.
object
Auth ID of the owning account.
MIME type declared at upload.
Free-text description.
Document name, unique within the account.
Free-text document type label given at upload.
Storage key of the uploaded file: <auth_id>/
Media id. Use it as media_sid when sending a fax and as {media_id} in the Media paths. 0 in Get a media item.
Quality given at upload.
“local” (this account only) or “global” (shared read-only with the account’s tenants).
How the item was created: “api” for uploads.
“success” on upload and update; omitted elsewhere.
Tags attached to the item.
Contact Center task queue the item is attached to, if any.
Storage URL of the fax-ready TIFF rendering (empty for audio and Contact Center media). In Get a media item: a pre-signed link valid for 15 minutes.
Link to the file. Public items: a permanent link anyone can fetch (Download a public media file). Private items: a storage URL that is not directly downloadable. In Get a media item: a pre-signed link valid for 15 minutes.
Random UUID of the media item; part of its public link.
“public” (permanent unauthenticated link) or “private”.
Contact Center workspace of that task queue, if any.
Example
{ "account_id": "AC000000000000000000", "content_type": "application/pdf", "docdescription": "Contract for signature", "docname": "contract-2026-11", "doctype": "pdf", "filename": "AC000000000000000000/11-2026/7f3c2a9e-4b1d-4c8e-9a61-2d5f0b8e1c34-contract.pdf", "id": 1042, "quality": "standard", "scope": "local", "sourcetype": "api", "status": "success", "tags": [ "hold-music" ], "taskQueueSid": "", "tifurl": "https://media-bucket.s3.us-east-1.amazonaws.com/AC000000000000000000/11-2026/7f3c2a9e-4b1d-4c8e-9a61-2d5f0b8e1c34.tiff", "url": "https://api.siprtc.io/v1/Media/Files/7f3c2a9e-4b1d-4c8e-9a61-2d5f0b8e1c34/7f3c2a9e-4b1d-4c8e-9a61-2d5f0b8e1c34-contract.pdf", "uuid": "7f3c2a9e-4b1d-4c8e-9a61-2d5f0b8e1c34", "visibility": "public", "workspaceSid": ""}Not multipart, invalid field, malformed media id (message ‘invalid media_id’), duplicate docname, refused visibility change, or a storage error.
object
Human-readable reason.
Always “failed”.
Example
{ "message": "fax not found", "status": "failed"}Missing or wrong credentials, or credentials that may not act for {auth_id}. Body: ‘Authentication failed’.
Example generated
exampleNo such media item on this account (message ‘media not found’).
object
Human-readable reason.
Always “failed”.
Example
{ "message": "fax not found", "status": "failed"}Request body larger than 12 MB.
object
Human-readable reason.
Example
{ "message": "Request Entity Too Large"}Unexpected server error.
object
Human-readable reason.
Example
{ "message": "Request Entity Too Large"}