Skip to main content
POST
/
message
/
sendMedia
/
{instance}
Send Media
curl --request POST \
  --url https://api.botifiy.com/message/sendMedia/{instance} \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '
{
  "number": "<string>",
  "mediatype": "<string>",
  "mimetype": "<string>",
  "media": "<string>",
  "caption": "<string>",
  "fileName": "<string>",
  "delay": 123,
  "linkPreview": true,
  "mentionsEveryOne": true,
  "mentioned": [
    "<string>"
  ]
}
'
{
  "key": {
    "remoteJid": "<string>",
    "fromMe": true,
    "id": "<string>"
  },
  "message": {
    "imageMessage": {
      "url": "<string>",
      "mimetype": "<string>",
      "caption": "<string>",
      "fileSha256": "<string>",
      "fileLength": "<string>",
      "height": 123,
      "width": 123,
      "mediaKey": "<string>",
      "fileEncSha256": "<string>",
      "directPath": "<string>",
      "mediaKeyTimestamp": "<string>",
      "jpegThumbnail": "<string>",
      "contextInfo": {}
    }
  },
  "messageTimestamp": "<string>",
  "status": "<string>"
}

Authorizations

apikey
string
header
required

Path Parameters

instance
string
required

Name of the instance

Body

application/json
number
string
required

WhatsApp number to send the message to

mediatype
string
required

Type of media (image, video, document, audio)

mimetype
string
required

MIME type of the media

media
string
required

Base64-encoded media content or media URL

caption
string

Caption for the media (optional)

fileName
string

File name for the media (optional)

delay
integer

Delay in milliseconds before sending the message (optional)

Whether to show link preview (optional)

mentionsEveryOne
boolean

Whether to mention everyone (optional)

mentioned
string[]

List of mentioned JIDs (optional)

Response

201 - application/json

Created

key
object
message
object
messageTimestamp
string
status
string