Skip to main content
POST
/
{instance}
/
send-file
curl --request POST \
--url https://app.hypersender.com/api/whatsapp/v1/{instance}/send-file \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"chatId": "[email protected]",
"url": "https://hypersender.com/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Flogo.52c242e8.png&w=640&q=75",
"fileName": "hypersender_logo",
"mimetype": "image",
"caption": "string",
"reply_to": "string"
}'
{
  "key": {
    "remoteJid": "[email protected]",
    "fromMe": true,
    "id": "3EB089F063C03E43EECE9D"
  },
  "message": {
    "documentMessage": {
      "url": "https://mmg.whatsapp.net/v/t62.7119-24/31809967_2958746007616712_3774955636954933761_n.enc?ccb=11-4&oh=01_Q5AaIPHnpFjuJwCULeqyHMcDO55BAj3YxolxEVLGXVvVkaKM&oe=67F2DD3D&_nc_sid=5e03e0&mms3=true",
      "mimetype": "image/jpeg",
      "fileSha256": "ubfaNZ4rY7T7/ghhWnBh1cVf1d00JSHENKunZuHs+yc=",
      "fileLength": 7200,
      "mediaKey": "ARUCxn91XDCjmCvFecREY4Fpg9RSOYa8O5D7TxGWGkE=",
      "fileName": "hypersender.jpeg",
      "fileEncSha256": "ER9FB+GEzrKmooWDbNpqenokG1mAtvbIU+Ceo7JeNwQ=",
      "directPath": "/v/t62.7119-24/31809967_2958746007616712_3774955636954933761_n.enc?ccb=11-4&oh=01_Q5AaIPHnpFjuJwCULeqyHMcDO55BAj3YxolxEVLGXVvVkaKM&oe=67F2DD3D&_nc_sid=5e03e0",
      "mediaKeyTimestamp": 1741390160,
      "caption": "dolore nulla nisi Duis"
    }
  },
  "messageTimestamp": 1741390160,
  "status": "PENDING"
}

Send a file (as a document/attachment) to a chat.

You can send files in two ways:

Provide a URL for the file.

send-file url
Please note that the URL must be publicly accessible and not require any authentication or special headers to access the file.

Send the file it self as a file upload.

send-file file
Possible file types are: [png, jpg, jpeg, gif, mp3, mp4, avi, mkv, mov, flv, wav, ogg, webm, 3gp, flac, aac, wma, m4a, opus, pdf, doc, docx, xls, xlsx, ppt, pptx, txt, zip]
send-file preview

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Accept
string
Example:

"application/json"

Content-Type
string
Example:

"application/json"

Path Parameters

instance
string
required
Example:

"{{ instance_id }}"

Body

application/json

Require to use multipart/form-data

chatId
string
required

Contact number - learn what is chatId

url
string

url to send (required without file)

file
string

file to send (required without url)

filename
string

filename for the file

mimetype
string

mimetype for the file

caption
string

caption for the file

reply_to
string

reply to message id

Response

Successful response

key
object
message
object
messageTimestamp
string
status
string
I