<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 innuxt.config.ts:
nuxt.config.ts
.env file:
.env
nuxt dev after creating the file.
2. Create the page
pages/contact.vue
/contact, send a test response, and open Submissions to confirm it arrived.
Good to know
- The request uses the browser’s
fetch, not$fetch.fetchlets you read the error message from a400,402, or403response 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
localhostbefore testing. - For file uploads or CAPTCHA, keep the
FormDatabody and follow Files and CAPTCHA.