When a contact sends you an image, video, audio file, document, or sticker, Titan captures the encrypted media reference from WhatsApp and surfaces it in theDocumentation Index
Fetch the complete documentation index at: https://docs.usetitan.app/llms.txt
Use this file to discover all available pages before exploring further.
message.received webhook payload. From there, you can download the raw file or save it directly to your own S3-compatible storage bucket.
Titan does not store media on its servers. Files are either streamed directly to you on demand or saved to your own S3 bucket. Your data stays in your infrastructure.
Sending media
To send media in an outbound message, provide either aurl (an HTTPS link to the file) or base64 (the file encoded as a base64 string) alongside the type field on the send messages endpoint.
| Delivery method | Max size |
|---|---|
url | 50 MB |
base64 | 70 MB |
- Images: JPEG, PNG, WebP
- Video: MP4
- Audio: OGG, MP3
- Documents: Any file type
Receiving media
Incoming media messages arrive via webhook with the standardmessage.received event. The payload includes:
mediaId— the Titan media record ID you use to download or persist the filemimeType— the MIME type of the attachment (e.g.image/jpeg)fileLength— file size in bytes
mediaUrl — a direct URL to the file in your bucket.
Download media
Use the download endpoint to fetch the raw binary of a received media file. Titan downloads and decrypts the file from the WhatsApp CDN on the fly and streams it to you.Content-Type header from the response to determine the file format.
Persist media to S3
Instead of downloading the file yourself, you can instruct Titan to save it directly to your configured S3 bucket. This is useful when you want to archive media without handling binary data in your application.Response
Auto-persist mode
You can configure Titan to automatically save all incoming media to your S3 bucket without calling the persist endpoint manually. When auto-persist is on, every incoming media message’s webhook payload includes themediaUrl field pointing directly to the saved file.
Enable auto-persist in the console under Settings → Media.
S3 configuration
Titan supports any S3-compatible object storage provider, including AWS S3, Cloudflare R2, and MinIO. Configure your bucket in the console under Settings → Storage by providing:- Endpoint — the S3 API endpoint URL (leave blank for AWS S3)
- Bucket name — the target bucket
- Region — e.g.
us-east-1 - Access key ID
- Secret access key
Media metadata
TheMediaInfo object, returned in webhook payloads and persist responses, contains the following fields:
Unique Titan media record identifier.
ID of the WhatsApp message that contained this media.
MIME type of the file (e.g.
image/jpeg, video/mp4, audio/ogg).File size in bytes.
Whether the file has been saved to your S3 bucket.
S3 URL of the file. Present only when
persisted is true.The session name that received this media.