> ## 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.

# Send File / Media

> Send an image, video, audio, or document over WhatsApp via the ChatSyncs API, using a public media URL or a media_id from Upload Media. Use when a developer asks how to send a file/image/video to a WhatsApp number.

Sends an image, video, audio, or document to a WhatsApp number — the single endpoint for all
media types.

<Warning>
  You must provide **either `media_url` or `media_id`** — at least one is required.
</Warning>


## OpenAPI

````yaml POST /whatsapp/send/file
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/send/file:
    post:
      tags:
        - WhatsApp API
      summary: Send File / Media
      operationId: sendFile
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                apiToken:
                  type: string
                  description: >-
                    Your ChatSyncs API key (not a WhatsApp/Meta access token).
                    [Where to find
                    it](/developer-api/finding-ids#api-token-apitoken).
                  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
                phone_number:
                  type: string
                  description: >-
                    The subscriber's phone number, with country code, digits
                    only.
                  example: PHONE-NUMBER
                media_url:
                  type: string
                  description: >-
                    Public HTTPS URL of the file. Required if media_id isn't
                    set.
                  example: https://example.com/image.jpg
                media_id:
                  type: string
                  description: >-
                    A WhatsApp media ID from [Upload
                    Media](/developer-api/whatsapp/upload-media) or Graph.
                    Required if media_url isn't set; requires media_type when
                    used alone.
                media_type:
                  type: string
                  description: >-
                    One of image, video, audio, document. Required when using
                    media_id alone, or when media_url has no file extension.
                media_caption_text:
                  type: string
                  description: >-
                    Caption for an image, video, or document (not supported for
                    audio). Falls back to message if omitted.
              required:
                - apiToken
                - phone_number_id
                - phone_number
      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'
                    wa_message_id: wamid.HBgNODgwMTcyMzMwOTAwMxUC...
                    message: Message sent successfully.
                error:
                  summary: Error
                  value:
                    status: '0'
                    message: Invalid request.

````