Skip to content
OvertCMS Docs

Delivery API (Clients) Media

Stream a ready media asset

GET /delivery/v1/media/{id}

Streams the binary bytes of a ready media asset with strict sandbox security headers (X-Content-Type-Options: nosniff, Content-Security-Policy, and Content-Disposition: attachment for documents/PDFs/text), immutable caching (public, max-age=31536000, immutable when public), and SHA-256 ETag conditional GET support.

Authentication

  • Bearer token BearerApiKey optional

    Optional scoped API key (Authorization: Bearer ocms_...) with delivery:read scope. Required only when OVERTCMS_DELIVERY_REQUIRE_API_KEY=true.

Path parameters

  • id string required
    Media asset UUID.

Headers

  • If-None-Match string
    Conditional GET validator matching a previously received ETag. Returns 304 Not Modified when unchanged.

Responses

  • 200 Raw binary media stream with exact verified Content-Type.

    application/octet-stream

    • string, binary
  • 304 Not Modified — client cached ETag matches the current response.
  • 401 Unauthorized.

    application/json

    • error APIError required
      Canonical error payload returned across all OvertCMS planes.
      Show 6 fields
      • applied boolean required
        Always false on 4xx responses, guaranteeing the mutation was not applied.

        Example false

      • code string required

        Example validation_error

      • details object
      • issues array of ValidationIssue
        Show 7 fields
        • code string required

          Example max_length

        • constraint object
        • field string

          Example seoTitle

        • instruction string

          Example Keep SEO titles under 60 characters for search snippet display.

        • label string

          Example SEO Title

        • message string required

          Example field must be at most 60 graphemes

        • searchEndpoint string

          Example /agent/v1/collections/posts/fields/author/options

      • message string required

        Example entry validation failed

      • retryable boolean required

        Example false

  • 404 Media asset not found or not yet ready.

    application/json

    • error APIError required
      Canonical error payload returned across all OvertCMS planes.
      Show 6 fields
      • applied boolean required
        Always false on 4xx responses, guaranteeing the mutation was not applied.

        Example false

      • code string required

        Example validation_error

      • details object
      • issues array of ValidationIssue
        Show 7 fields
        • code string required

          Example max_length

        • constraint object
        • field string

          Example seoTitle

        • instruction string

          Example Keep SEO titles under 60 characters for search snippet display.

        • label string

          Example SEO Title

        • message string required

          Example field must be at most 60 graphemes

        • searchEndpoint string

          Example /agent/v1/collections/posts/fields/author/options

      • message string required

        Example entry validation failed

      • retryable boolean required

        Example false

Documentation

Start here