Send media▾
Send media
Send an image, document, audio or video by media id or public URL.
Reference a previously uploaded media object by id, or pass a publicly reachable link and Sendport will fetch it. Uploading first is faster for anything you send repeatedly.
| Type | Max size | Accepted formats |
|---|---|---|
| Image | 5 MB | image/jpeg, image/png |
| Document | 100 MB | Any, application/pdf renders inline |
| Audio | 16 MB | audio/aac, audio/mp4, audio/mpeg, audio/ogg |
| Video | 16 MB | video/mp4, video/3gpp |
| Sticker | 100 KB static / 500 KB animated | image/webp |
/v1/messagesBody parameters
tostringrequiredRecipient in E.164 format.
typeenumrequiredMedia kind.
imagedocumentaudiovideosticker
imageobjectPresent under the key matching type.
idstringMedia id from the upload endpoint. Mutually exclusive with link.
linkstringPublic HTTPS URL.
captionstringUp to 1024 characters. Not supported for audio or sticker.
filenamestringDocument only — the name shown to the recipient.
curl -X POST https://api.sendport.tech/v1/messages \
-H "Authorization: Bearer $SENDPORT_KEY" \
-H "Content-Type: application/json" \
-d '{"to":"+201005550123","type":"image","image":{"id":"med_01JZQ8T0X5","caption":"Your receipt"}}'Responses
202Accepted
{
"object": "message",
"id": "msg_01JZQ3F8X2K7N4B6Y0R9M5TCWA",
"wamid": "wamid.SEJnTTIwMTAwNTU1MDEyM0ZRSUFFUmdT",
"conversation_id": "conv_01JZQ3F8X0QG7T2S4N8V1PZAKD",
"from": "+15550100200",
"to": "+201005550123",
"direction": "outbound",
"type": "image",
"template": { "name": "order_shipped", "language": "en", "category": "UTILITY" },
"status": "accepted",
"pricing": { "category": "utility", "billable": true, "amount": "0.0286", "currency": "USD" },
"created_at": "2026-09-06T09:14:22.114Z"
}401Unauthorized
{
"error": {
"type": "authentication_error",
"code": "missing_api_key",
"message": "No API key provided.",
"doc_url": "https://sendport.tech/docs/errors#missing_api_key",
"request_id": "req_9f3c2a7b41de08c5b2e6"
}
}Try itsandbox