Core resources
Document links
How PDF and document attachments are delivered to SMS recipients as hosted links.
When you send a PDF (or other document) on an SMS conversation, Tether does not attach it as MMS media, because carriers strip or fail non-image MMS on long-code numbers, and delivery is inconsistent across handsets. Instead, you store the document privately and the recipient gets a plain SMS containing a short, branded link. You get the same behaviour across every SMS provider.
How it works
- You attach a document and send it on an SMS conversation.
- Tether stores the file in the private storage bucket and mints a hosted document link with an opaque, single-purpose token.
- Tether sends a plain SMS whose body carries the link (for example,
https://your-instance.example.com/d/{token}). You never expose the storage key. Only the token travels with the message. - You keep the attachment previewable inside the conversation.
Resolve a document link
GET /d/{token}Public, unauthenticated. Tether validates the token (expiry and view count),
resolves it to a short-lived, inline signed URL for the stored file, and returns
a 302 redirect.
| Response | Meaning |
|---|---|
302 | Redirect to a short-lived signed URL for the file. |
404 | Token is unknown or has been removed. |
410 | Link has expired or its view limit has been reached. |
Expiry and security
- Links expire after a configurable window (
DOC_LINK_TTL_SECONDS, default 3 days). The link host is set per deployment viaDOC_LINK_BASE_URL. - The recipient link points at an independent copy of the file. At expiry that copy is deleted from storage, so an expired link can never resolve to a document. The agent's in-app attachment is a separate object and stays previewable in the conversation.
- The signed URL the recipient is redirected to is short-lived and re-minted on every view.
- In production the link host must be a brand-aligned domain so messages are not filtered by carriers.
GET /api/messages/download now requires authentication and is scoped to the
caller's organization. Use the in-app attachment endpoints for agent-side
downloads.