This page is for a website whose application form posts to Formspree today. You have two options. Option A points the form straight at Recruit Swipe and drops Formspree from the path; it is the simplest and keeps resumes as real files. Option B keeps Formspree, for its inbox, email notifications or spam filtering, and forwards each submission on to us.
Option A: point the form at us
Your form already has the right shape: a <form> with named inputs. Only its first few lines change.
- Create a public form key in the app (Settings → Sources → Developer & API, New key, kind Public) and list your site’s origins, for example
https://www.example.com. The HTML form page explains the origin rules. - Change the form’s
actionfromhttps://formspree.io/f/…to our applications endpoint, and addenctype="multipart/form-data"if the form has a file input. - Add the hidden fields Formspree did not need.
<form
action="https://lbhikadtsmbnzkzetpyb.supabase.co/functions/v1/api/v1/applications"
method="post"
enctype="multipart/form-data"
>
<input type="hidden" name="api_key" value="rs_pk_REPLACE" />
<input type="hidden" name="job_id" value="REPLACE-JOB-ID" />
<input type="hidden" name="_redirect" value="https://www.example.com/thanks" />
<!-- your existing inputs, unchanged -->
</form>
- Check your input names. Ours are
name(orfirst_nameandlast_name),email,phone,linkedin, andresumefor the file. Anything else is kept on the application as an answer under its name, so an input calledmessagebecomes an answer called “message”. The full list is in the API reference.
Formspree’s own special fields carry over: _gotcha is our spam trap too, and works the same way. Formspree’s _next becomes our _redirect, which must be on one of the key’s allowed origins. Fields like _subject and _replyto mean nothing to us and are kept as answers; remove them.
If the form submits with JavaScript (fetch to Formspree with Accept: application/json), change the URL, keep sending the same FormData, and add the key as an X-Api-Key header instead of the hidden field. Remove the hidden _redirect field too: with it, fetch follows our 303 to your thank-you page and gets HTML back instead of JSON. Our JSON response is described in the API reference; with a public key, success is 201 with {"ok": true}.
Option B: keep Formspree and forward submissions
Formspree can send each new submission to another address with its webhook plugin. Whether your Formspree plan includes plugins depends on that plan; check your form’s Plugins tab.
You cannot point that webhook directly at our endpoint, for two reasons:
- Formspree’s webhook sends its own JSON shape, with your fields nested under a
submissionobject. We read fields from the top level of the body, so we would see no name and no email. - The request needs a secret key in a header, because it comes from Formspree’s servers, not a browser on your site. We have not found a way to add a custom header to Formspree’s webhook.
So put a small step in between that flattens the submission and adds the header. Either:
- Zapier or Make. Use Formspree’s own Zapier integration, or a “Catch Hook” trigger that Formspree’s webhook posts to, then a POST step to us. The Zapier and Make page shows the POST step; map each field of the submission to our field names.
- A relay on your own server, if you have one. It holds a secret key, so lock it down: give Formspree’s webhook a relay address that ends in a long random token (
https://your-server.example.com/formspree-relay?token=…) and refuse requests without it. That token is between you and Formspree; our API itself never takes a key in the URL. This is all the relay needs to do (Node 18 or later, with Express):
import crypto from 'node:crypto';
import express from 'express';
const RELAY_TOKEN = process.env.RELAY_TOKEN; // a long random string, also in the webhook URL
function tokenMatches(given) {
const a = Buffer.from(String(given ?? ''));
const b = Buffer.from(RELAY_TOKEN);
return a.length === b.length && crypto.timingSafeEqual(a, b);
}
const app = express();
app.use(express.json());
app.post('/formspree-relay', async (req, res) => {
if (!tokenMatches(req.query.token)) return res.status(401).end();
const { submission = {} } = req.body;
// Drop Formspree's timestamp and anything a visitor must not control: this
// request goes out with a secret key, which can set a stage or a date.
const {
_date, job, job_id, stage, applied_at, api_key, idempotency_key, source,
...fields
} = submission;
const r = await fetch(
'https://lbhikadtsmbnzkzetpyb.supabase.co/functions/v1/api/v1/applications',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Api-Key': process.env.RS_SECRET_KEY,
// Same submission, same key: a resend never makes a second application.
'Idempotency-Key': `formspree-${fields.email ?? ''}-${_date ?? ''}`,
},
// Your values last, so a submitted field can never override them.
body: JSON.stringify({ ...fields, job_id: process.env.RS_JOB_ID, source: 'formspree' }),
},
);
res.status(r.ok ? 200 : 502).end();
});
app.listen(3000);
Two things you give up with option B. Resumes: Formspree handles file uploads itself, so the most you can forward is a link to the file, if your plan stores uploads. Send it as resume_url and it is saved on the candidate as a link we never download. And speed: each submission takes one extra hop.
If it doesn’t work
401 invalid_key. The key is missing or revoked. In option A check the hiddenapi_keyfield; in option B theX-Api-Keyheader.402 plan_required. The workspace owner is not on a paid plan.403 origin_not_allowed. In option A, the page’s origin is not in the public key’s list (www.andhttpscount). In option B, you used a public key on a server; use a secret key.404 not_found. Thejob_idis wrong, or belongs to another workspace.422 job_not_open. The job was closed or put on hold, or it is a job synced from your ATS.422 validation_failed. Thefieldsobject names what is missing. After a switch from Formspree it is usually a name input that is not calledname, or no input calledemail,phoneorlinkedin.