Request
Supported values fortype:
imageaudiovideodocument
link is supported.
Field types
to: string (required)type: string =image|audio|video|document(required)image: object (required whentype=image)image.link: string (required)image.caption: string (optional)audio: object (required whentype=audio)audio.link: string (required)audio.voice: boolean (optional)video: object (required whentype=video)video.link: string (required)video.caption: string (optional)document: object (required whentype=document)document.link: string (required)document.filename: string (optional)document.caption: string (optional)
Field behavior and limits
linkis required for every media subtype and must be a public URL.image.captionis optional, max 1024 characters.video.captionis optional, max 1024 characters.document.captionis optional, max 1024 characters.document.filenameis optional; include extension (for exampleinvoice.pdf), max 240 characters.audio.voiceis optional boolean:true: marks the audio as a voice note.falseor omitted: sends as regular audio.- For voice notes, use OGG/OPUS compatible media.
Supported formats and max size
Audio (max 16 MB):
- AAC:
.aac(audio/aac) - AMR:
.amr(audio/amr) - MP3:
.mp3(audio/mpeg) - MP4 Audio:
.m4a(audio/mp4) - OGG Audio:
.ogg(audio/ogg) with OPUS codec only and mono input
max 100 MB):
- Text:
.txt(text/plain) - Microsoft Excel:
.xls(application/vnd.ms-excel) - Microsoft Excel:
.xlsx(application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) - Microsoft Word:
.doc(application/msword) - Microsoft Word:
.docx(application/vnd.openxmlformats-officedocument.wordprocessingml.document) - Microsoft PowerPoint:
.ppt(application/vnd.ms-powerpoint) - Microsoft PowerPoint:
.pptx(application/vnd.openxmlformats-officedocument.presentationml.presentation) - PDF:
.pdf(application/pdf)
max 5 MB):
- JPEG:
.jpeg(image/jpeg) - PNG:
.png(image/png) - Images must be 8-bit RGB or RGBA.
max 16 MB):
- 3GPP:
.3gp(video/3gpp) - MP4 Video:
.mp4(video/mp4) - Codec constraints: H.264 video and AAC audio only.
- Recommended for compatibility: H.264 Main without B-frames or H.264 Baseline, and
faststart(moovbeforemdat).
.webp and size limits), see Sticker.