Send messages
Send image
Send an image by passing a public HTTPS URL in image.link. WhatsApp
fetches the asset server-side; you don’t upload anything through
Kirim.
curl -X POST \ https://api.kirim.chat/v1/$PHONE_ID/messages \ -H "Authorization: Bearer $KIRIM_KEY" \ -H "Content-Type: application/json" \ -d '{ "messaging_product": "whatsapp", "to": "+628123456789", "type": "image", "image": { "link": "https://cdn.example.com/promo.jpg", "caption": "Promo akhir bulan — diskon 30%" } }'import { Kirim } from '@kirimdev/sdk'
const kirim = new Kirim({ apiKey: process.env.KIRIM_KEY! })const phone = kirim.phoneNumbers(process.env.PHONE_ID!)
await phone.messages.send({ messaging_product: 'whatsapp', to: '+628123456789', type: 'image', image: { link: 'https://cdn.example.com/promo.jpg', caption: 'Promo akhir bulan — diskon 30%', },})Requirements
Section titled “Requirements”| Field | Constraint |
|---|---|
image.link | Public HTTPS URL; either link or id (not both) |
image.id | Meta-uploaded media id (advanced — see Meta docs) |
image.caption | Optional, ≤ 1024 chars |
| Format | JPG, PNG |
| Max size | 5 MB |