mailkite_upload_attachment
Upload a file to get a secure, time-limited URL for email attachments or inline HTML links, avoiding large base64 payloads in every send.
Instructions
Upload a file to MailKite storage and get back a secure, time-limited URL. Reference the returned url as an attachment in send() ({ filename, url }) or link it inline in your HTML — instead of base64-inlining large files on every send. Give the file ONE of four ways: a local path (read and streamed as raw bytes by the CLI/SDK/local MCP), a remote url (MailKite fetches and re-hosts it), base64 content, or — over raw HTTP — the file bytes as the POST body with ?filename=. retentionDays (7/30/90/365, default 7) sets how long the file and URL live. Requires an API key (mk_live_…).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | A remote http(s) URL. MailKite fetches it and re-hosts the bytes under your account. Max 25 MB. | |
| path | No | Local filesystem path to the file. Read client-side by the CLI, SDKs, and the local MCP server, then uploaded as raw bytes. Not available on the hosted MCP (no filesystem). | |
| content | No | The file bytes, base64-encoded. The lowest-common-denominator fallback when you can't send a path, URL, or raw bytes. | |
| filename | No | The file's name, e.g. "invoice.pdf". Shown to recipients on download. Optional when it can be derived from `path` or `url`. | |
| contentType | No | MIME type, e.g. "application/pdf". Defaults to application/octet-stream (or is inferred from the file extension / fetched response). | |
| retentionDays | No | How long the file (and its signed URL) stays valid. One of 7, 30, 90, 365. Defaults to 7. |