# delete_media

Source: https://heyeveryone.ai/docs/mcp/delete_media

> Delete a media asset and its file from the workspace's library. Refused (media_in_use) while a post that will still go out uses it (awaiting confirmation, scheduled, publishing or retrying): replace it in those posts or unschedule them first. Drafts and published posts that used it keep a reference to a missing file, which validate_post reports. This can't be undone.

Delete a media asset and its file from the workspace's library. Refused (media_in_use) while a post that will still go out uses it (awaiting confirmation, scheduled, publishing or retrying): replace it in those posts or unschedule them first. Drafts and published posts that used it keep a reference to a missing file, which validate_post reports. This can't be undone.

## Access and cost

- Kind: mutation
- Scope: workspace
- Actors: member, agent
- Credits: Free
- Requires confirmation: false
- Accepts idempotency key: false

## Input schema

```json
{
  "properties": {
    "workspaceId": {
      "format": "uuid",
      "type": "string"
    },
    "mediaAssetId": {
      "format": "uuid",
      "type": "string"
    }
  },
  "required": [
    "workspaceId",
    "mediaAssetId"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "additionalProperties": false,
  "properties": {
    "deleted": {
      "const": true,
      "type": "boolean"
    },
    "fileRemoved": {
      "type": "boolean"
    }
  },
  "required": [
    "deleted",
    "fileRemoved"
  ],
  "type": "object"
}
```

## Errors

```json
[
  "media_in_use"
]
```

## Annotations

```json
{
  "destructiveHint": true,
  "idempotentHint": true,
  "openWorldHint": false,
  "readOnlyHint": false,
  "title": "Delete media"
}
```
