Form endpoint
What is a form endpoint?
A form endpoint is the URL an HTML form posts to. You set it as the form’s action, and when someone submits, the browser sends the field values there over HTTP. A PortForm endpoint takes it from there: stores the submission, filters spam, and emails it to you.
How <form action> works.
The action attribute is the endpoint. Set it to your PortForm URL, add a hidden access_key so we know which form it is, and the browser posts the rest. No fetch, no framework, no build step.
<form action="https://app.portform.co/api/submit" method="POST">
<input type="hidden" name="access_key" value="YOUR_ACCESS_KEY" />
<input type="text" name="name" required />
<input type="email" name="email" required />
<textarea name="message" required></textarea>
<button type="submit">Send</button>
</form>Replace YOUR_ACCESS_KEY with the access key from your dashboard. Create one free.
What happens when the request arrives.
- The endpoint validates the payload and checks the honeypot (and a CAPTCHA on Pro) before anything else.
- The submission is written to storage first, so it exists even if the email later fails.
- You get an email with Reply-To set to the sender, and any integrations fire.
- The endpoint responds: a JSON body for fetch, or a redirect to a thank-you page for a plain form post.
The endpoint is the front door of a form backend. To have submissions emailed to you, see sending an HTML form to email. Field names, reserved fields and the exact responses are in the docs.
Start from a working form.
Each of these already has the endpoint and the honeypot wired in.
One endpoint, every kind of form.
- Waitlist formsCollect early signups before you have a product.
- Contact formsThe classic name / email / message, delivered to your inbox.
- Newsletter signupCapture subscribers straight into your inbox or a sheet.
- Lead captureRoute new leads to your inbox, Slack, or CRM.
- Feedback formsLet customers tell you what to fix, straight to your inbox.
- Survey formsMulti-question responses collected as one submission.
- Job application formsCollect applications and résumés in one submission.
- Event registrationRSVPs and sign-ups collected straight to your inbox.
- Customer supportA support form that reaches your team fast.
- Demo requestsQualify and route demo requests to sales.
Questions
- What is a form endpoint?
- A form endpoint is the URL an HTML form sends its data to. You set it as the action attribute on the form; when someone submits, the browser makes an HTTP POST to that URL with the field values. The service at that URL decides what happens next.
- How do I add a form endpoint to my HTML form?
- Set the endpoint URL as the form’s action and add a hidden access_key field. No JavaScript is required: a plain <form action="..." method="POST"> posts to the endpoint directly.
- Does a form endpoint need JavaScript?
- No. The browser posts the form to the endpoint natively. You can add fetch to submit without a page reload, but the endpoint works from a zero-JavaScript static page.
- What formats does the PortForm endpoint accept?
- Form encoding, multipart (for file uploads) and JSON. Anything that can make an HTTP request can use it, so React, Vue, a server action or curl all work against the same URL.
Point a form at it and go.
Create an access key, set it as your form action, and the submissions start arriving. 300 every 30 days, free, no card.