Use the media node to upload, retrieve, or delete media.
To send media such as images, documents, audio or video you must first Upload the Media and then Send it.
The media hosting is managed by Meta for numbers in the Cloud API. Please refer to Meta's Official Documentation for clarification on their regulations.
All media files sent through this endpoint are encrypted and persist for 30 days, unless they are deleted earlier.
It is a good practice for partners and clients to store any media in their own servers and delete them from Meta's servers immediately after.
- If you use the media upload process rather than linking to a media URL, the file must be uploaded to the media volume. Once the upload is complete, you can send a message using the media ID.
- The maximum supported file size for media messages on Cloud API is 100MB. In the event the customer sends a file that is greater than 100MB, you will receive a webhook with an error.
Content-Type: image/jpeg or other appropriate media type your-binary-media-data
The samples below shows a media message with different objects such as
Media ID. A valid request body would look like this:
Sending media messages using Image URL:
"link" : "https://IMAGE_URL"
Sending media messages using Media ID:
"id" : "MEDIA-OBJECT-ID"
In the case of an unsuccessful response, a callback is sent to your Webhook URL even though the response will yield a message ID similar to a successful message send.