Upload a file to send
upload_fileSubmit file bytes to receive an upload ID for sending media or posting stories via send_media or post_story. Use this for local files, not public URLs.
Instructions
Upload a file whose bytes you have (not a URL) so it can be sent: returns an upload whose id goes in uploadId of send_media or post_story. The file can be sent for 24 hours, to any number of chats. Up to 5 MB; the hosted server takes requests up to 1 MB, so about 700 KB of file there. For a file that is already at a public URL, skip this and pass the URL to send_media.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base64 | Yes | The file's bytes in base64. | |
| filename | No | Documents: the file name the recipient sees. | |
| mimeType | Yes | The file's MIME type: `image/jpeg`, `application/pdf`, `audio/ogg; codecs=opus` for a voice note. | |
| idempotencyKey | No | Optional. Reuse the same key when retrying this exact call: within 24 hours wuapi returns the first result instead of doing it twice. |