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

# Upload File into Media Storage

> If hosted is set to true then fileUrl is required. Else file is required. If adding a file, maximum allowed is 25 MB. For video files, the maximum allowed size is 500 MB.



## OpenAPI

````yaml /api-reference/medias/openapi.json post /medias/upload-file
openapi: 3.0.0
info:
  title: Media Storage API
  description: Documentation for Files API
  version: '1.0'
  contact: {}
servers:
  - url: https://services.leadconnectorhq.com
security: []
tags:
  - name: Medias
    description: Documentation for Files API
paths:
  /medias/upload-file:
    post:
      summary: Upload File into Media Storage
      description: >-
        If hosted is set to true then fileUrl is required. Else file is
        required. If adding a file, maximum allowed is 25 MB. For video files,
        the maximum allowed size is 500 MB.
      operationId: upload-media-content
      parameters:
        - name: Authorization
          in: header
          description: Access Token
          required: true
          schema:
            type: string
            example: Bearer 9c48df2694a849b6089f9d0d3513efe
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                hosted:
                  type: boolean
                fileUrl:
                  type: string
                name:
                  type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadFileResponseDTO'
      security:
        - Location-Access: []
components:
  schemas:
    UploadFileResponseDTO:
      type: object
      properties:
        fileId:
          type: string
          description: ID of the uploaded file
          example: file.pdf
        url:
          type: string
          description: Google Cloud Storage URL of the uploaded file
          example: https://storage.googleapis.com/bucket-name/path/to/file.pdf
      required:
        - fileId
        - url

````