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

# List media



## OpenAPI

````yaml /openapi.json get /media
openapi: 3.1.0
info:
  title: Postbase API
  version: 1.0.0
  description: >-
    Schedule and manage social posts on X, LinkedIn, Bluesky, Mastodon and
    YouTube. Authenticate with an API key from Postbase → Developers, sent as
    `Authorization: Bearer pb_live_…`.
  contact:
    url: https://www.postbase.so
  license:
    name: AGPL-3.0
    identifier: AGPL-3.0-only
servers:
  - url: https://www.postbase.so/api/v1
security:
  - bearerAuth: []
tags:
  - name: Posts
  - name: Media
  - name: Analytics
  - name: Webhooks
  - name: Channels
  - name: Account
paths:
  /media:
    get:
      tags:
        - Media
      summary: List media
      operationId: listMedia
      parameters:
        - name: type
          in: query
          schema:
            type: string
            enum:
              - image
              - video
        - name: search
          in: query
          schema:
            type: string
          description: Part of a file name
      responses:
        '200':
          description: The newest 50 files
          content:
            application/json:
              schema:
                type: object
                properties:
                  media:
                    type: array
                    items:
                      $ref: '#/components/schemas/Media'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Media:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        type:
          type: string
          description: MIME type
        size_bytes:
          type: integer
        url:
          type: string
          format: uri
        created_at:
          type: string
          format: date-time
      required:
        - id
        - url
        - type
    Error:
      type: object
      properties:
        error:
          type: string
          description: A readable message
        code:
          type: string
          description: A stable code, e.g. not_found
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A pb_live_ API key

````

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