wakit
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

TypeFormatsMax size
ImageJPEG, PNG5 MB
VideoMP4, 3GPP16 MB
AudioAAC, AMR, MP3, OGG16 MB
DocumentPDF, DOC, XLS, PPT, TXT100 MB
StickerWEBP100 KB (static), 500 KB (animated)

On this page