> ## Documentation Index
> Fetch the complete documentation index at: https://docs.member.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Admin File Media

> Resolve a team-owned file to a signed playback URL for admins/creators.



## OpenAPI

````yaml /openapi/mio-openapi.json get /api/v1/teams/{team_id}/files/{id}/media
openapi: 3.1.0
info:
  description: >-
    Production API reference for Membership.io. Use the authored guides for
    workflows and the generated endpoint pages for exact parameters and schemas.
  title: Membership.io API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.member.dev
security:
  - bearerAuth: []
paths:
  /api/v1/teams/{team_id}/files/{id}/media:
    get:
      tags:
        - media-admin
      summary: Get Admin File Media
      description: Resolve a team-owned file to a signed playback URL for admins/creators.
      operationId: media_admin.get_media_admin_get_teams_by_team_id_files_by_id_media
      parameters:
        - in: path
          name: team_id
          required: true
          schema:
            title: Team Id
            type: string
        - in: path
          name: id
          required: true
          schema:
            title: Id
            type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FileMediaPayload'
          description: Successful Response
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    FileMediaPayload:
      description: Single-resource JSON:API response for GET /file/{file_id}/media.
      properties:
        data:
          $ref: '#/components/schemas/FileMediaResource'
      required:
        - data
      title: FileMediaPayload
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    FileMediaResource:
      description: JSON:API resource object for a media-playback response.
      properties:
        attributes:
          $ref: '#/components/schemas/FileMediaPayloadAttributes'
        id:
          title: Id
          type: string
        links:
          anyOf:
            - $ref: '#/components/schemas/JsonApiLinks'
            - type: 'null'
        meta:
          anyOf:
            - $ref: '#/components/schemas/FileMediaMeta'
            - type: 'null'
        relationships:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Relationships
        type:
          title: Type
          type: string
      required:
        - id
        - type
        - attributes
      title: FileMediaResource
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    FileMediaPayloadAttributes:
      description: >-
        Attributes of a media-playback resource.


        playback_url: CloudFront canned-policy signed URL. Clients must use this
            before expires_at and refresh by re-calling the endpoint. Null when
            the underlying file is byte-less (e.g. a synthetic/placeholder
            document with no S3 object) — no URL is signed in that case, but the
            payload is still returned with its other metadata.
        expires_at:   UTC datetime when playback_url expires (echo for clients).
                      Null whenever playback_url is null.
        variants:     Signed imgproxy URLs keyed by preset name (e.g.
        "thumbnail-160").
                      Populated only for image files; empty dict for audio, video, PDF, etc.
        variants_expires_at:
                      UTC datetime when the signed imgproxy variant URLs expire.
                      Null when variants is empty.

        Note: media_id is intentionally omitted — it is an internal UUID that

        clients do not need (the asset is already identified by File.id in

        ``data.id``). Exposing it would leak internal row IDs to anonymous
        callers.
      properties:
        cards:
          items:
            $ref: '#/components/schemas/FileCardWire'
          title: Cards
          type: array
        duration_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration Seconds
        expires_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: >-
            UTC datetime when playback_url expires. Null whenever playback_url
            is null (byte-less/synthetic document with no S3 object to sign).
            Always present; may be null.
          title: Expires At
        mime_type:
          title: Mime Type
          type: string
        playback_url:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            CloudFront-signed playback URL. Null when the underlying file is
            byte-less (e.g. a synthetic/placeholder document with no S3 object)
            — no URL is signed in that case, but the payload is still returned
            with its other metadata. Always present; may be null.
          title: Playback Url
        variants:
          additionalProperties:
            type: string
          description: Signed imgproxy URLs for image variants. Empty for non-image files.
          title: Variants
          type: object
        variants_expires_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: >-
            UTC datetime when the signed image variant URLs expire. Null when
            variants is empty.
          title: Variants Expires At
      required:
        - mime_type
        - playback_url
        - expires_at
      title: FileMediaPayloadAttributes
      type: object
    JsonApiLinks:
      properties:
        self:
          anyOf:
            - type: string
            - type: 'null'
          title: Self
      title: JsonApiLinks
      type: object
    FileMediaMeta:
      properties:
        playback:
          anyOf:
            - $ref: '#/components/schemas/PlaybackVideo'
            - type: 'null'
      title: FileMediaMeta
      type: object
    FileCardWire:
      properties:
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        id:
          title: Id
          type: string
        label:
          title: Label
          type: string
        start:
          title: Start
          type: integer
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
      required:
        - id
        - label
        - start
      title: FileCardWire
      type: object
    PlaybackVideo:
      properties:
        captions:
          items:
            $ref: '#/components/schemas/Caption'
          title: Captions
          type: array
        chapters:
          items:
            $ref: '#/components/schemas/Caption'
          title: Chapters
          type: array
        duration_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration Seconds
        hls_expires_at:
          format: date-time
          title: Hls Expires At
          type: string
        hls_manifest:
          title: Hls Manifest
          type: string
        kind:
          const: video
          default: video
          title: Kind
          type: string
        thumbnails:
          items:
            $ref: '#/components/schemas/Caption'
          title: Thumbnails
          type: array
      required:
        - hls_manifest
        - hls_expires_at
      title: PlaybackVideo
      type: object
    Caption:
      additionalProperties: false
      description: >-
        A signed WebVTT sidecar track attached to a video.


        Reused for captions, chapters, and storyboard thumbnails. ``language``
        is

        None for tracks that carry no language (storyboard thumbnails); caption
        and

        chapter tracks set a real language code.
      properties:
        language:
          anyOf:
            - type: string
            - type: 'null'
          title: Language
        url:
          title: Url
          type: string
      required:
        - url
      title: Caption
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or mio_sk API key
      description: >-
        Send platform JWTs, contact JWTs, or team API keys as `Authorization:
        Bearer <token>`.
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````