Messages
Send media messages
Send images, videos, audio, documents, stickers, and locations.
wakit supports all WhatsApp media types. Insert into the messages table with the appropriate content format.
Image
content: {
type: 'image',
image: {
link: 'https://example.com/photo.jpg',
caption: 'Check this out!' // optional
}
}Video
content: {
type: 'video',
video: {
link: 'https://example.com/video.mp4',
caption: 'Watch this' // optional
}
}Audio
content: {
type: 'audio',
audio: {
link: 'https://example.com/audio.ogg'
}
}Document
content: {
type: 'document',
document: {
link: 'https://example.com/invoice.pdf',
caption: 'Your invoice', // optional
filename: 'invoice.pdf' // optional
}
}Sticker
content: {
type: 'sticker',
sticker: {
link: 'https://example.com/sticker.webp'
}
}Location
content: {
type: 'location',
location: {
latitude: 19.4326,
longitude: -99.1332,
name: 'Mexico City', // optional
address: 'CDMX, Mexico' // optional
}
}Contact
content: {
type: 'contacts',
contacts: [
{
name: { formatted_name: 'John Doe', first_name: 'John', last_name: 'Doe' },
phones: [{ phone: '+5215588392274', type: 'CELL' }]
}
]
}Reaction
content: {
type: 'reaction',
reaction: {
message_id: 'wamid.HBgN...', // ID of message to react to
emoji: '👍'
}
}Supported formats
| Type | Formats | Max size |
|---|---|---|
| Image | JPEG, PNG | 5 MB |
| Video | MP4, 3GPP | 16 MB |
| Audio | AAC, AMR, MP3, OGG | 16 MB |
| Document | PDF, DOC, XLS, PPT, TXT | 100 MB |
| Sticker | WEBP | 100 KB (static), 500 KB (animated) |