Prerequisites

To get the most out of this guide, you’ll need to:

1. Create a Deno Deploy project

Go to dash.deno.com/projects and create a new playground project

2. Edit the handler function

Paste the following code into the browser editor and update the ENDPOINT_URL.

index.ts
import { serve } from "https://deno.land/[email protected]/http/server.ts";

const ENDPOINT_URL = "https://api.formizee.com/v1/f/enp_123456";

const handler = async (_request: Request): Promise<Response> => {
	const res = await fetch(ENDPOINT_URL, {
		method: "POST",
		headers: {
			"Content-Type": "application/json",
		},
		body: JSON.stringify({
			name: "example",
			email: "[email protected]",
		}),
	});
	const data = await res.json();
	return new Response(JSON.stringify(data), {
		headers: {
			"Content-Type": "application/json",
		},
	});
};

serve(handler);

3. Deploy and ingest submissions

Click on Save & Deploy at the top of the screen.

4. Try it yourself

Formizee Deno Deploy Example

See the full source code