OptionalcaptionCaption for the file (optional) Text that will be displayed with the file
Chat ID to send message to Format: phone@c.us for individual chats, groupId@g.us for groups
OptionalconfigOptional request configuration override Allows overriding session, timeout, retry settings for this specific request
File data (base64 or URL) Can be a URL (http/https) or base64-encoded file data with data URI scheme
OptionalfilenameFilename (optional) The name that will be shown for the file in WhatsApp
Optionalreply_Message ID to reply to (optional) If provided, the file will be sent as a reply to the specified message
File message parameters
Parameters for sending a file/document using sendFile() or safeSendFile().
Example