For agents & developers

Everything a person can do in Magic Envelope, an agent can do through the API: compose a letter from typed blocks, pick a style, add guests and publish. Every guest gets their own addressed link. Free and keyless — theeditKey returned on creation is the only credential, and only for editing.

MCP server

Tools: get_catalog, create_letter, get_letter, update_letter. Streamable HTTP:

{
  "mcpServers": {
    "magic-envelope": { "url": "https://magic-envelope.com/api/mcp" }
  }
}

REST

curl -X POST https://magic-envelope.com/api/v1/letters \
  -H "content-type: application/json" \
  -d '{
    "lang": "en", "style": "romance", "preset": "wedding",
    "blocks": [
      { "type": "heading", "text": "{name}, we're getting married!" },
      { "type": "date", "start": "2026-11-14T18:00" },
      { "type": "place", "name": "The Orangery", "address": "Kew Gardens, London" },
      { "type": "rsvp", "channel": "email", "contacts": { "email": "us@example.com", "whatsapp": "", "sms": "" } }
    ],
    "guests": [{ "name": "Lucía" }, { "name": "Tom" }]
  }'
{
  "id": "st5kRZNzyW",
  "editKey": "…keep it secret…",
  "url": "https://magic-envelope.com/c/st5kRZNzyW",
  "previewImage": "https://magic-envelope.com/c/st5kRZNzyW/opengraph-image",
  "guests": [
    { "id": "IpPK42", "name": "Lucía", "url": "https://magic-envelope.com/c/st5kRZNzyW?g=IpPK42" },
    { "id": "1hWcrt", "name": "Tom",   "url": "https://magic-envelope.com/c/st5kRZNzyW?g=1hWcrt" }
  ]
}

Good to know

Write {name} in a title, text, signature or envelope line to address each guest. Blocks may be partial — missing fields take the editor's defaults. Dates are local ISO (2026-11-14T18:00). Guest names are stored server-side and each guest page only ever receives its own name.