Skip to content
Wazapin
Esc
navigateopen⌘Jpreview
On this page

Send image

Send image messages with an optional caption.

Share photos and screenshots with an optional caption — product shots, invoices, or proof of delivery.

At a glance

Item Detail
type image
Supported formats JPEG, PNG
Maximum file size 5 MB
Media field content.media_url (aliases: media, url)
Caption Optional content.caption
Channel support Official and unofficial

Request body

Field Required Description
channel_id Yes Sender channel ID
to Yes Recipient phone number
type Yes image
content.media_url Yes HTTPS URL to the image file
content.caption No Optional caption text

Example (URL)

curl -X POST "https://api.wazapin.com/v1/messages" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "channel_id": "wzp_abc123",
    "to": "6281234567890",
    "type": "image",
    "content": {
      "media_url": "https://cdn.example.com/images/invoice.png",
      "caption": "Bukti pembayaran kamu"
    }
  }'
import { WazapinClient, imageMessage } from "@wazapin/sdk";

const wazapin = new WazapinClient({ apiKey: process.env.WAZAPIN_API_KEY! });

await wazapin.messages.send(
  imageMessage({
    channel_id: "wzp_abc123",
    to: "6281234567890",
    media_url: "https://cdn.example.com/images/invoice.png",
    caption: "Bukti pembayaran kamu",
  }),
);
import requests

requests.post(
    "https://api.wazapin.com/v1/messages",
    headers={"X-Api-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
    json={
        "channel_id": "wzp_abc123",
        "to": "6281234567890",
        "type": "image",
        "content": {
            "media_url": "https://cdn.example.com/images/invoice.png",
            "caption": "Bukti pembayaran kamu",
        },
    },
    timeout=30,
).raise_for_status()

Was this page helpful?