---
title: "Send a media message via Base64"
method: POST
path: "/rest/sendMessage/{instance_key}/mediaBase64"
tags: ["SendMessageController"]
---

# Send a media message via Base64

`POST /rest/sendMessage/{instance_key}/mediaBase64`

The this endpoint allows you to send a media Base64 to a user.
<br> 
The <strong>base64</strong> parameter is the Base64 of the media to be sent.
<br>
The <strong>to</strong> parameter is the phone number of the user to send the media to.
<br>
The <strong>type</strong> parameter is the type of media to be sent.
<br>
The type of media can be one of the following:
<ul>
<li><strong>image</strong> - an image</li>
<li><strong>video</strong> - a video</li>
<li><strong>audio</strong> - an audio file</li>
<li><strong>ptt</strong> - an audio(ptt) file</li>
<li><strong>ptv</strong> - an video(ptv) file</li>
<li><strong>document</strong> - a document</li>
<li><strong>sticker</strong> - a sticker</li>
</ul>
<br>
The <strong>caption</strong> parameter is the caption of the media to be sent.
<br>
The <strong>mimeType</strong> parameter is the mimeType of the media.

## Path parameters

- `instance_key` string, required

## Request body

- object
  - `messageData` MediaMessageBase64
    - `to` string
    - `base64` string
    - `fileName` string
    - `type` string
    - `caption` string
    - `gifPlayback` boolean
    - `mimeType` string
    - `viewOnce` boolean

## Response `200`

Success

---

[API](https://skmtc.net/megaapi/apis/documentation-megaapi.md) · [All operations](https://skmtc.net/megaapi/apis/documentation-megaapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/megaapi/documentation-megaapi/versions/09ca1205343e/schema)
