Delete media asset

View as Markdown

Soft clears the DB reference by default; hard deletes R2. Execute returns 204 with no body; verify the current attached slot with media get and expect 404.

Authentication

AuthorizationBearer

User bearer token: Supabase or Clerk session JWT, Clerk OAuth access token, or Clerk personal API key

OR
X-API-Keystring

Admin API key for system-to-system write operations

Query parameters

mediaTypeenumRequired
Media target type.
Allowed values:
idstringOptional

Target UUID for entity/person or integer id for news.

slugstringOptionalformat: "^[a-z0-9_-]+$"<=255 characters
Target slug.
logoTypeenumOptional
Entity logo variant.
Allowed values:
deleteModeenumOptional

Delete mode; soft clears DB, hard deletes R2.

Allowed values:
sourceTypeenumRequired
Write provenance source type.
sourceDetailstringRequired
Source detail or reviewer reference for the write.
sourceProviderstringOptional

Provider name for provider-native IDs or slugs.

sourceProviderIdstringOptional

Provider-native source ID.

sourceProviderSlugstringOptional

Provider-native source slug.

actorTypeenumOptional

Actor type; inferred as agent when agentChassis and agentModel are supplied, or as employee from an authenticated user JWT session.

Allowed values:
agentChassisstringOptional

Agent chassis token for agent-authored writes.

agentModelstringOptional

Agent model id for agent-authored writes.

overrideGateenumOptional
Gate to override from the prior ProblemDetail resolution.
overrideReasonstringOptional0-2048 characters

Source-backed reason for overriding the returned gate requirement.

Response

No Content

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
406
Not Acceptable Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error