Upload an image, video, audio or document. You can use the return object directly when creating a new message.
An internal UUID will be generated. This UUID will be used instead of providing a public URL to a file. When you set public to true, you can use the URL field, which is reachable from public, for use in Whatsapp templates. Depending on the given type, mime type validation will take place. File will be stored for a maximum of 90 days. Special: images will be downsized to 1500px (each side, respecting aspect ratio) to maintain file size limits when sending to external services (e.g. WhatsApp limits images to 5MB). Special: videos of type video/quicktime (usually from iOS) will be converted to mp4.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
image, video, audio, document Optional flag to indicate if the file should be publicly accessible permanently. Use it for WhatsApp campaigns or template sending. Does not work when using the messages endpoint. Only use for files that are not sensitive as anyone with the URL can access the file.
1
Response
Success
Internal identifier which will be used when creating a new message.
When public, returned URL is valid as long file exists. When not public, URL will be temporary signed URL.
Public reachable URL.
Name of uploaded file.
Type of uploaded file (specified on upload).
Mime type of uploaded file.
Size in bytes of uploaded file.