> ## 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 Public File

> Read the public details of a file without signing in.

Anonymous access is allowed. Access is decided by exactly the same checks as
``GET /file/{file_id}/media`` for the same viewer, without ``?hub_id=``. Every
denial is the same 404 with no existence disclosure: unknown id, deleted file,
media not ready, a private or unlisted file, and any other visibility rule.

The response carries only these attributes: ``title``, ``description``,
``mime_type``, ``duration_seconds``, ``team_name``, ``variants`` (signed cover
image URLs keyed by preset, empty when the file has no cover) and
``variants_expires_at``. ``description`` is markdown source stored unsanitized;
clients must render it safely.

Root-mounted: GET /file/{file_id}.



## OpenAPI

````yaml /openapi/mio-openapi.json get /api/v1/file/{file_id}
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/file/{file_id}:
    get:
      tags:
        - media-public
      summary: Get Public File
      description: >-
        Read the public details of a file without signing in.


        Anonymous access is allowed. Access is decided by exactly the same
        checks as

        ``GET /file/{file_id}/media`` for the same viewer, without ``?hub_id=``.
        Every

        denial is the same 404 with no existence disclosure: unknown id, deleted
        file,

        media not ready, a private or unlisted file, and any other visibility
        rule.


        The response carries only these attributes: ``title``, ``description``,

        ``mime_type``, ``duration_seconds``, ``team_name``, ``variants`` (signed
        cover

        image URLs keyed by preset, empty when the file has no cover) and

        ``variants_expires_at``. ``description`` is markdown source stored
        unsanitized;

        clients must render it safely.


        Root-mounted: GET /file/{file_id}.
      operationId: media_public.get_media_public_get_file_by_file_id
      parameters:
        - in: path
          name: file_id
          required: true
          schema:
            title: File Id
            type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/PublicFilePayload'
          description: Successful Response
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    PublicFilePayload:
      description: Single-resource JSON:API response for GET /file/{file_id}.
      properties:
        data:
          $ref: '#/components/schemas/PublicFileResource'
      required:
        - data
      title: PublicFilePayload
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    PublicFileResource:
      description: JSON:API resource object for an anonymously readable file.
      properties:
        attributes:
          $ref: '#/components/schemas/PublicFileAttributes'
        id:
          title: Id
          type: string
        links:
          anyOf:
            - $ref: '#/components/schemas/JsonApiLinks'
            - type: 'null'
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        relationships:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Relationships
        type:
          title: Type
          type: string
      required:
        - id
        - type
        - attributes
      title: PublicFileResource
      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
    PublicFileAttributes:
      additionalProperties: false
      description: Attributes of an anonymously readable file.
      properties:
        description:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The file's description as markdown source, stored and returned
            unsanitized. Clients must render it safely. Null when the file has
            no description.
          title: Description
        duration_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          description: Duration in seconds. Null for media without a duration.
          title: Duration Seconds
        mime_type:
          description: MIME type of the underlying media.
          title: Mime Type
          type: string
        team_name:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Display name of the team that owns the file. Null when the team is
            deleted.
          title: Team Name
        title:
          description: The file's title.
          title: Title
          type: string
        variants:
          additionalProperties:
            type: string
          description: >-
            Signed cover image URLs keyed by preset: an image's own pixels, or a
            video's poster once its thumbnail is READY. Empty when the file has
            no cover.
          title: Variants
          type: object
        variants_expires_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: >-
            UTC datetime when the signed cover URLs expire. Null when variants
            is empty.
          title: Variants Expires At
      required:
        - title
        - description
        - mime_type
        - duration_seconds
        - team_name
        - variants
        - variants_expires_at
      title: PublicFileAttributes
      type: object
    JsonApiLinks:
      properties:
        self:
          anyOf:
            - type: string
            - type: 'null'
          title: Self
      title: JsonApiLinks
      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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.