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

# Upload media

> Upload an image or video and receive the media object used when creating a post.



## OpenAPI

````yaml /api-reference/openapi.json post /public/v1/upload
openapi: 3.0.0
info:
  title: PostlyBee Public API
  description: >-
    Create and manage social posts, upload media, and discover connected
    accounts with the PostlyBee Public API.
  version: 1.0.0
  contact:
    name: PostlyBee Support
    url: https://postlybee.com
    email: support@postlybee.com
  license:
    name: Proprietary
    url: https://postlybee.com/terms
servers:
  - url: https://api.postlybee.com
    description: Production
security: []
tags:
  - name: Posts
    description: Create, list, update, and delete social posts.
  - name: Media
    description: Upload media and use enabled video generators.
  - name: Accounts
    description: Discover connected social accounts.
  - name: Utilities
    description: Verify access and find posting slots.
paths:
  /public/v1/upload:
    post:
      tags:
        - Media
      summary: Upload media
      description: >-
        Upload an image or video and receive the media object used when creating
        a post.
      operationId: uploadMedia
      parameters: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                  description: Image or MP4 video file.
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiMediaDto'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiValidationErrorDto'
        '401':
          description: The bearer token is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiErrorDto'
        '429':
          description: Hourly API limit exceeded.
      security:
        - public-api: []
components:
  schemas:
    PublicApiMediaDto:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: 4cb8c6af-7111-4e5d-a7cd-846c9293d4c1
        name:
          type: string
          example: launch-image.png
        path:
          type: string
          example: https://postlybee.com/uploads/2026/08/launch-image.png
        thumbnail:
          type: string
          nullable: true
          example: https://postlybee.com/uploads/2026/08/launch-image-thumb.png
        alt:
          type: string
          nullable: true
          example: Product launch graphic
      required:
        - id
        - name
        - path
    PublicApiValidationErrorDto:
      type: object
      properties:
        message:
          oneOf:
            - type: string
              example: At least one post is required
            - type: array
              items:
                type: string
              example:
                - date must be a valid ISO 8601 date string
        error:
          type: string
          example: Bad Request
        statusCode:
          type: number
          example: 400
      required:
        - message
    PublicApiErrorDto:
      type: object
      properties:
        msg:
          type: string
          example: Invalid API key
      required:
        - msg
  securitySchemes:
    public-api:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: Workspace API key from Settings → Public API.

````