Delete media
delete_mediaDelete a media item from the media library. Deletion cannot be undone. Media still used in a draft or publishing task cannot be deleted (409 MAIN_MEDIA_IN_USE). Content already published on platforms is not affected. (Required scope: cd.media.write)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"mediaId": "<mediaId>",
"confirm": "<confirm>"
},
"name": "delete_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | Yes | true = the user has approved this specific action. Without it the request is rejected with 409 AGENT_USER_CONFIRMATION_REQUIRED. | |
| mediaId | Yes | ||
| workspaceId | No | Optional: id of the workspace to operate on (look it up with list_workspaces); if omitted, the default personal workspace is used. A developer API key can only use the workspace it is bound to. |