Media
Send images, documents, audio, video, and stickers — either by uploading first, or by a public link.
Upload media
Upload returns a media id you can reuse across messages:
POST https://api.kirim.dev/v23.0/{PHONE_NUMBER_ID}/mediaSend a multipart/form-data body with the file and its type, exactly as the Cloud API expects.
Send by media id
{
"messaging_product": "whatsapp",
"to": "62812XXXXXXX",
"type": "image",
"image": { "id": "MEDIA_ID" }
}Send by link
Skip the upload and reference a publicly reachable URL:
{
"messaging_product": "whatsapp",
"to": "62812XXXXXXX",
"type": "image",
"image": { "link": "https://example.com/photo.jpg" }
}Retrieve media
To fetch a media object's metadata and authenticated download URL — for example, media received on an inbound message — call the media id directly. Because a media id does not identify a number on its own, you must pass the connected number as a phone_number_id query parameter so kirim.dev knows which account credential to use; omitting it returns a 400.
GET https://api.kirim.dev/v23.0/{MEDIA_ID}?phone_number_id={PHONE_NUMBER_ID}Download inbound media
Use the url returned by the metadata request and send the same kd_live_… bearer key. The URL points to kirim.dev, which obtains a fresh temporary URL from Meta and streams the file without storing or caching it. Do not download the lookaside.fbsbx.com URL from the webhook directly: Meta requires its own access token there and will reject a kirim.dev key with 401.
curl -L \
-H "Authorization: Bearer $KIRIM_API_KEY" \
"https://api.kirim.dev/v23.0/{MEDIA_ID}/content?phone_number_id={PHONE_NUMBER_ID}" \
--output media.bin