Messaging API

Send Media Messages

4 minutes integration Skill: beginner

Send Media Messages

Send images, video clips, invoice PDFs, or audio guides directly by providing remote HTTP links. The AISoule engine downloads and encodes these files seamlessly for Meta's servers.

Endpoint

POST /v1/messages

Supported Media Types & Constraints

TypeFormats SupportedMax File Size
image.png, .jpeg, .webp5 MB
video.mp4, .3gp (H.264 codec recommended)16 MB
document.pdf, .doc, .xls, .zip100 MB
audio.aac, .mp3, .ogg16 MB

Payload Parameters

ParameterTypeRequiredDescription
tostringYesDestination mobile number (country code prefix, no formatting).
typestringYesSet to matching type: image, video, document, or audio.
[type]objectYesThe media payload wrapper matching your type definition (e.g. image parameter block).
[type].linkstringYesSecure HTTP URL hosting the public file to send.
[type].captionstringNoText description accompanying the image, video, or document.
[type].filenamestringNoDescriptive filename overriding the URL string (mostly for documents).

Related Doc Resources

Integration Playground
# Send Image via remote URL
curl -X POST "https://api.aisoule.com/v1/messages" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "918856879188",
    "type": "image",
    "image": {
      "link": "https://aisoule.com/images/home/calling-feature.webp",
      "caption": "Check out our latest WebRTC feature dashboard! 📞"
    }
  }'
Replace `YOUR_API_KEY` in the headers with your real dashboard secrets token!