Skip to content

Update a media item

PUT
/v1/Accounts/{auth_id}/Media/{media_id}
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=example

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

auth_id
required
string

Your account’s Auth ID (20 upper-case letters and digits).

Example

AC000000000000000000
media_id
required
integer

Media id.

Example

1042
Media type multipart/form-data
object
file

Replacement file (at most 10 MB).

string format: binary
content_type

MIME type of the replacement file; required with file.

string
Allowed values: application/pdf image/jpeg image/jpg image/png image/gif image/webp image/bmp image/tiff audio/mp3 audio/mpeg audio/wav
docname

New document name, unique within your account.

string
docdescription

New description.

string
doctype

New document type label.

string
quality

New quality label.

string
visibility

New visibility.

string
Allowed values: public private
used_for

ContactCenter: a replacement file skips TIFF conversion.

string
tags

Replacement tag list.

Array<string>
scope

New scope; global for vendor and superuser accounts only.

string
Allowed values: local global
taskQueueSid

Contact Center task queue; requires workspaceSid.

string
workspaceSid

Contact Center workspace.

string

The updated media item, with status ‘success’.

Media type application/json
object
account_id

Auth ID of the owning account.

string
content_type

MIME type declared at upload.

string
docdescription

Free-text description.

string
docname

Document name, unique within the account.

string
doctype

Free-text document type label given at upload.

string
filename

Storage key of the uploaded file: <auth_id>//-, optionally under an environment prefix.

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

integer
quality

Quality given at upload.

string
scope

“local” (this account only) or “global” (shared read-only with the account’s tenants).

string
Allowed values: local global
sourcetype

How the item was created: “api” for uploads.

string
status

“success” on upload and update; omitted elsewhere.

string
tags

Tags attached to the item.

Array<string>
taskQueueSid

Contact Center task queue the item is attached to, if any.

string
tifurl

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.

string
url

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.

string
uuid

Random UUID of the media item; part of its public link.

string
visibility

“public” (permanent unauthenticated link) or “private”.

string
Allowed values: public private
workspaceSid

Contact Center workspace of that task queue, if any.

string

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.

Media type application/json
object
message

Human-readable reason.

string
status

Always “failed”.

string

Example

{
"message": "fax not found",
"status": "failed"
}

Missing or wrong credentials, or credentials that may not act for {auth_id}. Body: ‘Authentication failed’.

Media type application/json
string

Example generated

example

No such media item on this account (message ‘media not found’).

Media type application/json
object
message

Human-readable reason.

string
status

Always “failed”.

string

Example

{
"message": "fax not found",
"status": "failed"
}

Request body larger than 12 MB.

Media type application/json
object
message

Human-readable reason.

string

Example

{
"message": "Request Entity Too Large"
}

Unexpected server error.

Media type application/json
object
message

Human-readable reason.

string

Example

{
"message": "Request Entity Too Large"
}