Skip to main content
This guide is written for Nuxt 3 with <script setup>. You will keep the Public Key in runtime config and submit from a normal page.

1. Save your Public Key

Copy the Public Key from the Endpoint form’s General tab. Then register it in nuxt.config.ts:
nuxt.config.ts
Put the real value in a .env file:
.env
The key is public by design: it can only add responses to this form. Restart nuxt dev after creating the file.

2. Create the page

pages/contact.vue
Visit /contact, send a test response, and open Submissions to confirm it arrived.

Good to know

  • The request uses the browser’s fetch, not $fetch. fetch lets you read the error message from a 400, 402, or 403 response without extra handling.
  • The submit happens in the browser, so server rendering and static generation (nuxt generate) both work.
  • Using domain restriction? Add your production domain and localhost before testing.
  • For file uploads or CAPTCHA, keep the FormData body and follow Files and CAPTCHA.