Send media▾
POST

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.

TypeMax sizeAccepted formats
Image5 MBimage/jpeg, image/png
Document100 MBAny, application/pdf renders inline
Audio16 MBaudio/aac, audio/mp4, audio/mpeg, audio/ogg
Video16 MBvideo/mp4, video/3gpp
Sticker100 KB static / 500 KB animatedimage/webp
POST/v1/messages

Body parameters

tostringrequired

Recipient in E.164 format.

typeenumrequired

Media kind.

imagedocumentaudiovideosticker

imageobject

Present under the key matching type.

idstring

Media id from the upload endpoint. Mutually exclusive with link.

linkstring

Public HTTPS URL.

captionstring

Up to 1024 characters. Not supported for audio or sticker.

filenamestring

Document 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