CLOUDFLARE Integration
Quickstarts

CLOUDFLARE Integration

Overview

Deploy ultra-fast edge worker routes to relay customer form inputs to Voieform endpoints.

Build with AI (LLM Prompt)
promptprompt
Write a Cloudflare Worker fetch event listener that processes POST requests and relays payload to:
https://voieform.com/f/<YOUR-FORM-API-KEY-HERE>

What you'll get out of the box:

V8 runtime speed (edge computing)
Reduces client-side API key exposures
Allows custom route interceptors
No server required (serverless runtime)

Setup instructions

bashbash
# No packages required. Runs natively on Cloudflare runtime.

Code Example

javascriptjavascript
export default {
  async fetch(request, env, ctx) {
    if (request.method === "POST") {
      try {
        const data = await request.json();
        
        // Relay to Voieform
        const response = await fetch("https://voieform.com/f/YOUR_FORM_API_KEY", {
          method: "POST",
          headers: {
            "Content-Type": "application/json",
            "Accept": "application/json"
          },
          body: JSON.stringify(data)
        });

        return new Response(JSON.stringify({ status: "relayed" }), {
          headers: { "Content-Type": "application/json" }
        });
      } catch (err) {
        return new Response("Relay failed", { status: 500 });
      }
    }
    
    return new Response("Send a POST request.", { status: 400 });
  }
};
Ctrl+I
Cloudflare Workers - Voieforms (formerly Proforms)