Send a Media Message
POST /v1/notify/:channel/media
X-Api-Key: notifo_live_...
Content-Type: application/json
Request body
{
"to": "+905551234567",
"type": "image",
"url": "https://example.com/photo.jpg",
"caption": "Here is your invoice",
"channelAccountId": "acc_01j...",
"idempotencyKey": "invoice-42"
}
| Field | Type | Required | Description |
|---|---|---|---|
to | string | yes | Recipient |
type | enum | yes | image, video, audio, document |
url | string | no | Publicly accessible URL of the file |
caption | string | no | Caption shown below media (max 1024 chars) |
filename | string | no | Filename hint for documents (max 255 chars) |
channelAccountId | UUID | no | Specific account to use |
idempotencyKey | string | no | Deduplication key (max 100 chars) |
Supported media types
type | Formats | Max size |
|---|---|---|
image | JPEG, PNG, WebP | 5 MB |
video | MP4, 3GP | 16 MB |
audio | MP3, OGG, AAC | 16 MB |
document | PDF, DOCX, XLSX, etc. | 100 MB |
Response 202 Accepted
{
"id": "msg_01j...",
"provider": "whatsapp",
"to": "+905551234567",
"type": "image",
"status": "queued",
"body": {
"type": "image",
"url": "https://example.com/photo.jpg",
"caption": "Here is your invoice"
},
"createdAt": "2025-01-01T12:00:00.000Z"
}
- cURL
- Node.js
curl -X POST https://api.notifo.cloud/v1/notify/whatsapp/media \
-H "X-Api-Key: notifo_live_abc123" \
-H "Content-Type: application/json" \
-d '{
"to": "+905551234567",
"type": "image",
"url": "https://example.com/photo.jpg",
"caption": "Your photo"
}'
const res = await fetch('https://api.notifo.cloud/v1/notify/whatsapp/media', {
method: 'POST',
headers: { 'X-Api-Key': 'notifo_live_abc123', 'Content-Type': 'application/json' },
body: JSON.stringify({
to: '+905551234567',
type: 'image',
url: 'https://example.com/photo.jpg',
caption: 'Your photo',
}),
});