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

# Upload Media

> Upload a file to ChatSyncs to get a media_id and media_type for use with the Send File API, via multipart/form-data. Use when a developer asks how to send the same file to many recipients without re-uploading it each time.

Uploads a file and returns a `media_id` and `media_type` you can reuse across multiple
[Send File](/developer-api/whatsapp/send-file) or
[Send Interactive Buttons](/developer-api/whatsapp/send-interactive-buttons) calls, instead of
hosting the file at a public URL.

<Info>
  This endpoint requires `multipart/form-data` — it's POST-only, unlike most other endpoints in
  this API.
</Info>


## OpenAPI

````yaml POST /whatsapp/upload/media
openapi: 3.1.0
info:
  title: ChatSyncs Developer API
  version: 1.0.0
  description: >-
    REST API for sending WhatsApp messages and managing subscribers through
    ChatSyncs.
servers:
  - url: https://platform.chatsyncs.com/api/v1
security: []
paths:
  /whatsapp/upload/media:
    post:
      tags:
        - WhatsApp API
      summary: Upload Media
      operationId: uploadMedia
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                apiToken:
                  type: string
                  description: >-
                    Your ChatSyncs API key (can also be sent as Authorization:
                    Bearer token) -- not a WhatsApp/Meta token.
                  example: API-KEY
                phone_number_id:
                  type: string
                  description: >-
                    The WhatsApp account's phone number ID. [Where to find
                    it](/developer-api/finding-ids#phone-number-id-phone_number_id).
                  example: PHONE-NUMBER-ID
                media_file:
                  type: string
                  format: binary
                  description: >-
                    The file to upload. The multipart field name must be exactly
                    media_file.
              required:
                - apiToken
                - phone_number_id
                - media_file
      responses:
        '200':
          description: >-
            Standard ChatSyncs response. `status` is `"1"` on success and `"0"`
            on failure.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: '`"1"` = success, `"0"` = failure.'
                  message:
                    type: string
                    description: Human-readable result message.
              examples:
                success:
                  summary: Success
                  value:
                    status: '1'
                    media_id: '1739230482390482'
                    media_type: image
                    message: >-
                      Upload successful. Use media_id and media_type with the
                      Send File API.
                error:
                  summary: Error
                  value:
                    status: '0'
                    message: Invalid request.

````