Delete a media item
const url = 'https://api.siprtc.io/v1/Accounts/AC000000000000000000/Media/1042';const options = {method: 'DELETE', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.siprtc.io/v1/Accounts/AC000000000000000000/Media/1042 \ --header 'Authorization: Basic <credentials>'Deletes one of your own media items and its stored file. The TIFF rendering is kept so faxes already queued with the item can still be sent. Global items can be deleted only by vendor and superuser accounts. Before deleting audio, the Contact Center service is asked to release it from hold-music use; if it refuses, its HTTP status and message are returned as they are. The response has no body.
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
1042Responses
Section titled “ Responses ”Deleted.
Malformed media id (message ‘invalid media_id’), or the Contact Center service could not be reached for an audio item.
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"}The item could not be deleted (message ‘media request failed’), including a global item deleted by a non-vendor account.
object
Human-readable reason.
Always “failed”.
Example
{ "message": "fax not found", "status": "failed"}