{
  "slug": "resend-email-api-static-site",
  "title": "How to Call Resend Email API from Static HTML & Astro Sites",
  "metaTitle": "Call Resend Email API from Static Sites - RealComposer",
  "metaDescription": "Send emails via Resend from static HTML and Astro sites without a backend. RealComposer edge proxy receives form data and sends emails in under 50ms.",
  "headline": "Serverless Resend Proxy for JAMstack, Astro, and Static Sites",
  "category": "security",
  "categoryLabel": "Security & Secret Vault",
  "urgency": 10,
  "clientPlatform": "Static HTML / Astro",
  "upstreamServices": [
    "Resend"
  ],
  "searchIntentQuery": "call resend api from static html site",
  "directAnswerSummary": "Static sites have no server to hold RESEND_API_KEY. RealComposer provides a zero-maintenance edge proxy that receives form submissions from your static HTML site and sends emails via Resend with sub-50ms latency.",
  "problem": {
    "title": "Static Sites Lack Server Secret Storage",
    "explanation": "Putting a Resend API key in static HTML contact forms lets anyone extract it and send emails from your domain.",
    "risks": [
      "Email spoofing from your verified domain",
      "Resend daily quota exhaustion",
      "DKIM/SPF domain reputation damage"
    ]
  },
  "solutionSteps": [
    {
      "stepNumber": 1,
      "title": "Vault Resend Key",
      "description": "Store RESEND_API_KEY in RealComposer Secret Vault."
    },
    {
      "stepNumber": 2,
      "title": "Post from Static HTML",
      "description": "Wire standard HTML form to RealComposer endpoint."
    }
  ],
  "pipelineConfig": {
    "name": "Resend Static Proxy",
    "method": "POST",
    "cacheTtlSeconds": 0,
    "steps": [
      {
        "stepKey": "resend",
        "upstreamUrlTemplate": "https://api.resend.com/emails",
        "httpMethod": "POST",
        "headersTemplate": {
          "Authorization": "Bearer {{secrets.RESEND_API_KEY}}",
          "Content-Type": "application/json"
        },
        "timeoutMs": 3000
      }
    ],
    "outputMapping": {
      "version": 1,
      "fields": [
        {
          "targetPath": "id",
          "sourceStep": "resend",
          "sourcePath": "id"
        }
      ]
    }
  },
  "sampleBloatedInput": {
    "id": "49a39281-a8b2",
    "from": "contact@domain.com",
    "to": [
      "team@domain.com"
    ]
  },
  "sampleSlimmedOutput": {
    "id": "49a39281-a8b2"
  },
  "curlSnippet": "curl -X POST \"https://realcomposer.com/v1/acme/contact-form\"",
  "faqs": [
    {
      "question": "Do I need Cloudflare Workers or AWS Lambda?",
      "answer": "No, RealComposer operates as the complete managed edge layer."
    }
  ],
  "relatedRecipeSlugs": [
    "sendgrid-frontend-proxy",
    "call-private-api-from-webflow-securely"
  ],
  "links": {
    "page": "https://realcomposer.com/recipes/resend-email-api-static-site",
    "markdown": "https://realcomposer.com/recipes/resend-email-api-static-site.md",
    "json": "https://realcomposer.com/recipes/resend-email-api-static-site.json",
    "install": "https://realcomposer.com/dashboard/pipelines/new?recipe=resend-email-api-static-site&via=agent"
  }
}