delete_mediaDelete media
Permanently remove an attachment with content concurrency guards.
Authorization and permissions
Requires a valid delegated OAuth token and access to the selected workspace.
- OAuth scope
mcp:delete- Workspace requirement
- Authorized workspace and current membership required
Post edit authority and approval/version guards.
Input schema
{
"additionalProperties": false,
"properties": {
"confirmed_revision": {
"description": "Confirmed revision.",
"minimum": 1,
"type": [
"integer",
"null"
]
},
"expected_version": {
"description": "Last-read post concurrency version.",
"minimum": 1,
"type": "integer"
},
"media_id": {
"description": "Media id.",
"minimum": 1,
"type": "integer"
},
"post_id": {
"description": "Public post sqid.",
"maxLength": 32,
"minLength": 1,
"type": "string"
},
"team_id": {
"description": "Consented workspace ID.",
"minimum": 1,
"type": "integer"
}
},
"required": [
"team_id",
"post_id",
"media_id",
"expected_version"
],
"type": "object"
}Result schema
{
"additionalProperties": false,
"properties": {
"content_revision": {
"description": "Content revision.",
"type": "integer"
},
"deleted": {
"const": true,
"description": "Deleted."
},
"media_id": {
"description": "Media id.",
"minimum": 1,
"type": "integer"
},
"version": {
"description": "Version.",
"type": "integer"
}
},
"required": [
"deleted",
"media_id",
"version",
"content_revision"
],
"type": "object"
}Example arguments
{
"confirmed_revision": 5,
"expected_version": 6,
"media_id": 615,
"post_id": "P7k2Lm9Q",
"team_id": 42
}Example result
{
"content_revision": 6,
"deleted": true,
"media_id": 615,
"version": 7
}Errors and retry
Requires current workspace membership. Unknown posts, media, accounts, and cross-workspace IDs return not found. Upload commit, rename, and delete recheck edit permission, approval confirmation, and the post version; invalid type, size, or title is rejected. Calls are limited to 120 per user per minute.
Metadata reads and transfer-instruction requests are safe to retry, but transfer URLs still require the delegated bearer credential (the example is an instruction, not a token). After an ambiguous upload or mutation, list media and reload the post version before retrying; delete is not safe to repeat after success.
Effects, limits, and source
Workspace roles, subscription and AI usage limits, approval rules, and server rate limits are enforced at call time. Rate-limit responses identify when to retry; scheduled work returns state rather than holding the request open.
social_scheduling.api.media_delete and content services