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

# Upload media

> Uploads a media file in a single request and creates a media item.

The server determines the media MIME type from the uploaded file.
Send a `multipart/form-data` request with the file in the `file` field.

Example:

```bash
curl -X POST 'https://api.woopsocial.com/v1/media?projectId=YOUR_PROJECT_ID' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F 'file=@/path/to/image.jpg'
```

Use this endpoint for straightforward uploads up to 100 MB.

For larger files, or when you need presigned part URLs, use the upload
session flow under `/media/upload-sessions`.




## OpenAPI

````yaml /openapi.yaml post /media
openapi: 3.1.0
info:
  title: WoopSocial API
  version: 1.0.0
  summary: API for WoopSocial integrations.
  description: >
    This is the public-facing OpenAPI contract for WoopSocial. It supports
    scheduling posts for various social media platforms such as Facebook,
    Instagram, LinkedIn, LinkedIn Pages, Pinterest, Threads, TikTok, X (formerly
    Twitter) and YouTube.
servers:
  - url: https://api.woopsocial.com/v1
    description: WoopSocial API URL.
  - url: http://localhost:9123/api/external/v1
    description: Local WoopSocial API URL.
security: []
tags:
  - name: Posts
    description: Post scheduling endpoints.
  - name: Projects
    description: Project discovery endpoints.
  - name: Social Accounts
    description: Connected social account discovery endpoints.
  - name: Media
    description: Media upload endpoints.
  - name: Webhooks
    description: Webhook endpoint management.
  - name: Health
    description: Basic connectivity endpoints.
paths:
  /media:
    post:
      tags:
        - Media
      summary: Upload media
      description: >
        Uploads a media file in a single request and creates a media item.


        The server determines the media MIME type from the uploaded file.

        Send a `multipart/form-data` request with the file in the `file` field.


        Example:


        ```bash

        curl -X POST
        'https://api.woopsocial.com/v1/media?projectId=YOUR_PROJECT_ID' \
          -H 'Authorization: Bearer YOUR_API_KEY' \
          -F 'file=@/path/to/image.jpg'
        ```


        Use this endpoint for straightforward uploads up to 100 MB.


        For larger files, or when you need presigned part URLs, use the upload

        session flow under `/media/upload-sessions`.
      operationId: createMedia
      parameters:
        - $ref: '#/components/parameters/ProjectId'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
              description: |
                Media file to upload. Maximum size is 100 MB.
      responses:
        '200':
          description: Media uploaded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateMediaResponse'
      security:
        - ApiKey: []
components:
  parameters:
    ProjectId:
      name: projectId
      in: query
      required: true
      schema:
        type: string
      description: Project that will own the uploaded media.
  schemas:
    CreateMediaResponse:
      type: object
      additionalProperties: false
      required:
        - mediaId
      properties:
        mediaId:
          type: string
          description: Media identifier.
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: API key

````