Agent API (AI & Automation) Media
Delete an unreferenced media asset
/agent/v1/media/{id} Deletes a media asset if it is not referenced by any entry (otherwise returns 409 media_in_use). Force-deletion is disabled on the Agent Plane. Requires media:delete scope.
Authentication
- Bearer token
BearerApiKeyScoped Agent API key (
Authorization: Bearer ocms_...). Human JWTs and browser cookies are rejected on the Agent Plane.
Path parameters
-
idstring requiredMedia asset UUID.
Headers
-
If-Schema-FingerprintstringOptional precondition header with the caller's cached schema fingerprint. Exact match proceeds silently; non-breaking capability gain proceeds withX-Schema-Warning; breaking drift returns409 schema_drift_detected. -
Idempotency-KeystringUnique client-generated key (max 128 chars) for atomic mutation deduplication and safe retries (24h receipt retention, scoped per actor).
Responses
-
200 Media asset deleted.
application/json
-
deletedboolean requiredExample true
-
idstring, uuid required
-
-
401 Missing, invalid, expired, or revoked Agent API key (cookies and human JWTs are rejected).
application/json
-
errorAPIError requiredCanonical error payload returned across all OvertCMS planes.Show 6 fields Hide
-
appliedboolean requiredAlways false on 4xx responses, guaranteeing the mutation was not applied.Example false
-
codestring requiredExample validation_error
-
detailsobject -
issuesarray of ValidationIssueShow 7 fields Hide
-
codestring requiredExample max_length
-
constraintobject -
fieldstringExample seoTitle
-
instructionstringExample Keep SEO titles under 60 characters for search snippet display.
-
labelstringExample SEO Title
-
messagestring requiredExample field must be at most 60 graphemes
-
searchEndpointstringExample /agent/v1/collections/posts/fields/author/options
-
-
messagestring requiredExample entry validation failed
-
retryableboolean requiredExample false
-
-
-
403 API key lacks required scope, post-type access, or IP allowlist match.
application/json
-
errorAPIError requiredCanonical error payload returned across all OvertCMS planes.Show 6 fields Hide
-
appliedboolean requiredAlways false on 4xx responses, guaranteeing the mutation was not applied.Example false
-
codestring requiredExample validation_error
-
detailsobject -
issuesarray of ValidationIssueShow 7 fields Hide
-
codestring requiredExample max_length
-
constraintobject -
fieldstringExample seoTitle
-
instructionstringExample Keep SEO titles under 60 characters for search snippet display.
-
labelstringExample SEO Title
-
messagestring requiredExample field must be at most 60 graphemes
-
searchEndpointstringExample /agent/v1/collections/posts/fields/author/options
-
-
messagestring requiredExample entry validation failed
-
retryableboolean requiredExample false
-
-
-
404 Media asset not found.
application/json
-
errorAPIError requiredCanonical error payload returned across all OvertCMS planes.Show 6 fields Hide
-
appliedboolean requiredAlways false on 4xx responses, guaranteeing the mutation was not applied.Example false
-
codestring requiredExample validation_error
-
detailsobject -
issuesarray of ValidationIssueShow 7 fields Hide
-
codestring requiredExample max_length
-
constraintobject -
fieldstringExample seoTitle
-
instructionstringExample Keep SEO titles under 60 characters for search snippet display.
-
labelstringExample SEO Title
-
messagestring requiredExample field must be at most 60 graphemes
-
searchEndpointstringExample /agent/v1/collections/posts/fields/author/options
-
-
messagestring requiredExample entry validation failed
-
retryableboolean requiredExample false
-
-
-
409 Version conflict, schema drift detected, idempotency key conflict, or breaking change confirmation required.
application/json
-
errorAPIError requiredCanonical error payload returned across all OvertCMS planes.Show 6 fields Hide
-
appliedboolean requiredAlways false on 4xx responses, guaranteeing the mutation was not applied.Example false
-
codestring requiredExample validation_error
-
detailsobject -
issuesarray of ValidationIssueShow 7 fields Hide
-
codestring requiredExample max_length
-
constraintobject -
fieldstringExample seoTitle
-
instructionstringExample Keep SEO titles under 60 characters for search snippet display.
-
labelstringExample SEO Title
-
messagestring requiredExample field must be at most 60 graphemes
-
searchEndpointstringExample /agent/v1/collections/posts/fields/author/options
-
-
messagestring requiredExample entry validation failed
-
retryableboolean requiredExample false
-
-
-
422 Validation error with field-level issues.
application/json
-
errorAPIError requiredCanonical error payload returned across all OvertCMS planes.Show 6 fields Hide
-
appliedboolean requiredAlways false on 4xx responses, guaranteeing the mutation was not applied.Example false
-
codestring requiredExample validation_error
-
detailsobject -
issuesarray of ValidationIssueShow 7 fields Hide
-
codestring requiredExample max_length
-
constraintobject -
fieldstringExample seoTitle
-
instructionstringExample Keep SEO titles under 60 characters for search snippet display.
-
labelstringExample SEO Title
-
messagestring requiredExample field must be at most 60 graphemes
-
searchEndpointstringExample /agent/v1/collections/posts/fields/author/options
-
-
messagestring requiredExample entry validation failed
-
retryableboolean requiredExample false
-
-
-
429 Per-key RPM rate limit, daily write cap, or daily media byte quota exceeded.
application/json
-
errorAPIError requiredCanonical error payload returned across all OvertCMS planes.Show 6 fields Hide
-
appliedboolean requiredAlways false on 4xx responses, guaranteeing the mutation was not applied.Example false
-
codestring requiredExample validation_error
-
detailsobject -
issuesarray of ValidationIssueShow 7 fields Hide
-
codestring requiredExample max_length
-
constraintobject -
fieldstringExample seoTitle
-
instructionstringExample Keep SEO titles under 60 characters for search snippet display.
-
labelstringExample SEO Title
-
messagestring requiredExample field must be at most 60 graphemes
-
searchEndpointstringExample /agent/v1/collections/posts/fields/author/options
-
-
messagestring requiredExample entry validation failed
-
retryableboolean requiredExample false
-
-
-
503 Agent writes are currently paused by site kill switch.
application/json
-
errorAPIError requiredCanonical error payload returned across all OvertCMS planes.Show 6 fields Hide
-
appliedboolean requiredAlways false on 4xx responses, guaranteeing the mutation was not applied.Example false
-
codestring requiredExample validation_error
-
detailsobject -
issuesarray of ValidationIssueShow 7 fields Hide
-
codestring requiredExample max_length
-
constraintobject -
fieldstringExample seoTitle
-
instructionstringExample Keep SEO titles under 60 characters for search snippet display.
-
labelstringExample SEO Title
-
messagestring requiredExample field must be at most 60 graphemes
-
searchEndpointstringExample /agent/v1/collections/posts/fields/author/options
-
-
messagestring requiredExample entry validation failed
-
retryableboolean requiredExample false
-
-