Attachments
Send files (images, videos, documents, audio) with messages by providing a URL in a media part.
Pre-uploading via POST /v3/attachments is optional and only needed for specific optimization scenarios.
Sending Media via URL (up to 10MB)
Provide a publicly accessible HTTPS URL with a supported media type in the url field of a media part.
{
"parts": [
{ "type": "media", "url": "https://your-cdn.com/images/photo.jpg" }
]
}
This works with any URL you already host โ no pre-upload step required. Maximum file size: 10MB.
Pre-Upload (required for files over 10MB)
Use POST /v3/attachments when you want to:
- Send files larger than 10MB (up to 100MB) โ URL-based downloads are limited to 10MB
- Send the same file to many recipients โ upload once, reuse the
attachment_idwithout re-downloading each time - Reduce message send latency โ the file is already stored, so sending is faster
How it works:
POST /v3/attachmentswith file metadata โ returns a presignedupload_url(valid for 15 minutes) and a permanentattachment_id- PUT the raw file bytes to the
upload_urlwith therequired_headers(no JSON or multipart โ just the binary content) - Reference the
attachment_idin your media part when sending messages (no expiration)
Key difference: When you provide an external url, we download and process the file on every send.
When you use a pre-uploaded attachment_id, the file is already stored โ so repeated sends skip the download step entirely.
Domain Allowlisting
Attachment URLs in API responses are served from cdn.linqapp.com. This includes:
urlfields in media and voice memo message partsdownload_urlfields in attachment and upload response objects
If your application enforces domain allowlists (e.g., for SSRF protection), add:
cdn.linqapp.com
Supported File Types
- Images: JPEG, PNG, GIF, HEIC, HEIF, TIFF, BMP
- Videos: MP4, MOV, M4V
- Audio: M4A, AAC, MP3, WAV, AIFF, CAF, AMR
- Documents: PDF, TXT, RTF, CSV, Office formats, ZIP
- Contact & Calendar: VCF, ICS
Audio: Attachment vs Voice Memo
Audio files sent as media parts appear as downloadable file attachments in iMessage.
To send audio as an iMessage voice memo bubble (with native inline playback UI),
use the dedicated POST /v3/chats/{chatId}/voicememo endpoint instead.
File Size Limits
- URL-based (
urlfield): 10MB maximum - Pre-upload (
attachment_id): 100MB maximum