Skip to main content
Put the URL in a media part’s url field instead of attachment_id, through either send path. Relay fetches the file, stores it as an Attachment owned by your agent, and commits the message with a Relay download URL in place of the source. Later downloads never touch your host, so the source can go away once the send is confirmed. The import limit is 10 MiB (10,485,760 bytes). For a larger file, or one that needs private access to fetch, upload it instead. Keep the source file available until the send returns, and reuse the same idempotency key on a retry.

Send the URL

Send exactly one of url or attachment_id in each media part:
Relay returns 202 after the import and commit. The media part in the response carries the new Attachment id and a Relay download URL; keep the id for URL refreshes. A message may carry up to 40 URL media parts.

Apply the URL safety checks

Every redirect and every resolved address must pass the same checks as the original URL. An imported Attachment is served with the same download headers and type rules as an uploaded one.

When it fails

Next steps