Vue Contact Form API
Add a working contact form to any Vue 3 application with EasyFormAPI. Use the Composition API and fetch() to receive every form submission by email — no backend server required.
<script setup>
import { ref } from 'vue';
const status = ref('idle');
async function handleSubmit(event) {
status.value = 'sending';
const data = Object.fromEntries(new FormData(event.target));
const res = await fetch('https://api.easyformapi.com/submit', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ access_key: 'YOUR_ACCESS_KEY', ...data }),
});
status.value = res.ok ? 'sent' : 'error';
}
</script>
<template>
<form @submit.prevent="handleSubmit">
<input name="name" type="text" required placeholder="Name" />
<input name="email" type="email" required placeholder="Email" />
<textarea name="message" required placeholder="Message" rows="4"></textarea>
<button type="submit" :disabled="status === 'sending'">
{{ status === 'sending' ? 'Sending…' : 'Send Message' }}
</button>
<p v-if="status === 'sent'">Message sent!</p>
</form>
</template>Works With
- Vue 3 + Vite
- Nuxt 3 (client-side pages)
- Vue CLI
- Quasar
- Any HTML page with Vue CDN
Ready to receive form submissions by email?
Free plan: 250 submissions/month, spam protection, email notifications. No backend server required.
Get Started Free — No Credit Card Required Read the docs →Frequently Asked Questions
- How do I receive HTML form submissions by email without a backend?
- Point your form's
actionattribute tohttps://api.easyformapi.com/submit, add a hiddenaccess_keyinput, and every submission is delivered to your inbox instantly — no server, no PHP, no backend code required. - Is EasyFormAPI really free?
- Yes. The free plan includes 250 form submissions per month with spam protection and email notifications. No credit card required. See all plans.
- Does it work with React, Next.js and Vue?
- Yes. Call the API endpoint from any
onSubmithandler usingfetch(). See guides for React, Next.js and Vue. - Do I need to configure an email server or SMTP?
- No. EasyFormAPI handles email delivery on your behalf. You only need your EasyFormAPI access key.
- What spam protection is included?
- All plans include a honeypot filter. Pro plans additionally support hCaptcha and Google reCAPTCHA v3 verification. Spam protection docs.