Send with Attachments
Messages
Send with Attachments
Send images, videos, voice notes, and files via iMessage — with or without text. REST endpoint in the Tuco AI iMessage API — bearer-token auth, JSON.
POST
Send with Attachments
Send attachments alongside or instead of text messages. Tuco handles downloading, caching, and delivering files through your device relay.
Request body
Use the samePOST /api/messages endpoint. Add attachmentUrls to your request:
Array of public URLs to attach. Max 2 attachments per message, max 25 MB each.
Optional display names for each attachment (same order as
attachmentUrls). When omitted, the filename from the URL is used.Optional text to send with the attachments. When omitted, only the attachment is sent (no “Attachment” placeholder text).
All other
POST /api/messages body fields
apply here too — including forceFallback
(skip the iMessage availability check and route straight to your configured
fallback). One caveat: the SMS/fallback channel is text-only, so a forceFallback
send delivers the message text but not the attachments — those go over
iMessage only.Supported formats
| Category | Formats | Notes |
|---|---|---|
| Images | PNG, JPG, JPEG, GIF, WebP, HEIC | Renders inline in iMessage |
| Video | MP4, MOV | Up to 25 MB. Renders as playable video |
| Audio / Voice notes | CAF | .caf files render as native iMessage voice notes (the play button bubble). Record with Core Audio or convert from other formats |
| Documents | Renders as attachment preview |
Examples
Limits
| Limit | Value |
|---|---|
| Max attachments per message | 2 |
| Max file size per attachment | 25 MB |
| Supported sources | Any public URL, UploadThing URLs, Blob URLs belonging to your workspace |
Device gap
Each attachment counts as part of a single message — not a separate send. Sending text + video in one API call uses one device gap (30s), not two. This is significantly faster than sending them as separate messages.For automations that send a video followed by a text CTA, combine them into a single API call with
message + attachmentUrls instead of two separate calls. This halves your device gap overhead.Error responses
| Status | When | Body |
|---|---|---|
400 | attachmentUrls not an array | { "error": "attachmentUrls must be an array" } |
400 | More than 2 attachments | { "error": "Maximum 2 attachments per message" } |
403 | URL doesn’t belong to workspace | { "error": "Attachment URL does not belong to this organization" } |