---
title: "Send image"
description: "Send image messages with an optional caption."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.wazapin.id/llms.txt
> Use this file to discover all available pages before exploring further.

# Send image

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 |

:::warning
The URL must be publicly accessible and return the file directly (no HTML landing page). File extension should match the actual content type.
:::

## 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

```bash
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"
}
  }'
```
### TypeScript

```typescript
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",
  }),
);
```
### Python

```python
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()
```

Source: https://docs.wazapin.id/getting-started/send-image/index.mdx
