This page is for a careers page you control the HTML of: a static site, Webflow, Squarespace or a WordPress custom HTML block, anything that can hold a <form>. The form posts directly to Recruit Swipe with a public form key, the applicant lands in the job’s Applied stage with their resume, and the visitor is sent on to your own thank-you page. It works without JavaScript; the optional job picker further down is the only part that needs it.
1. Create a public form key
In the app, open Settings → Sources → Developer & API, tap New key in the API keys group and create a key of kind Public. In Allowed origins, list every address the form will be served from, one per line, exactly as the browser shows it: scheme, host and port, no path, no trailing slash.
https://www.example.com
https://example.com
http://localhost:4321
https://www.example.comandhttps://example.comare different origins. If your site answers on both, list both.https://*.example.comcovers every subdomain ofexample.com(https://jobs.example.com,https://www.example.com), but nothttps://example.comitself.http://is only accepted forlocalhost, so you can test on your own machine. Use whatever port your dev server runs on;4321is Astro’s default.
The key starts rs_pk_. It is meant to sit in your page’s HTML in plain view: all it can do is add applicants, from those origins, and list your open jobs.
2. Paste the form
Replace the three values marked REPLACE — the key, the job id (copy it from GET /jobs, see the quickstart) and your thank-you page — then style it however you like.
<form
action="https://lbhikadtsmbnzkzetpyb.supabase.co/functions/v1/api/v1/applications"
method="post"
enctype="multipart/form-data"
>
<!-- Who is sending, which job, where to go afterwards -->
<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" />
<!-- Spam trap: people never see it, bots fill it in. Leave it empty. -->
<div class="rs-trap" aria-hidden="true">
<label for="rs-gotcha">Leave this field empty</label>
<input type="text" id="rs-gotcha" name="_gotcha" tabindex="-1" autocomplete="off" />
</div>
<label for="rs-name">Full name</label>
<input id="rs-name" name="name" autocomplete="name" required />
<label for="rs-email">Email</label>
<input id="rs-email" name="email" type="email" autocomplete="email" required />
<label for="rs-phone">Phone</label>
<input id="rs-phone" name="phone" type="tel" autocomplete="tel" />
<label for="rs-linkedin">LinkedIn profile</label>
<input id="rs-linkedin" name="linkedin" type="url" placeholder="https://www.linkedin.com/in/…" />
<label for="rs-resume">Resume (PDF, Word, text or image, up to 10 MB)</label>
<input id="rs-resume" name="resume" type="file" accept=".pdf,.doc,.docx,.txt,.jpg,.jpeg,.png" />
<!-- Any other field is kept as an answer on the application, under its name. -->
<label for="rs-why">Why do you want this role?</label>
<textarea id="rs-why" name="Why do you want this role?" rows="4"></textarea>
<button type="submit">Apply</button>
</form>
<style>
.rs-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
</style>
What the special fields do:
api_keycarries the public key, because a plain HTML form cannot set a header.job_idis the job the person is applying to._redirectis where the visitor goes next. It must be on one of the key’s allowed origins. On success they are sent there unchanged (303 See Other). If something is wrong they are sent there witherror=<code>added to the query string, for examplehttps://www.example.com/thanks?error=validation_failed. Without_redirect, or with one that is not on an allowed origin, the visitor sees the raw JSON response instead (201with{"ok": true}on success); a bad_redirectis ignored, never an error._gotchais the spam trap. If anything is in it, we answer as if it worked and store nothing.- Anything else (
Why do you want this role?above) is kept on the application as an answer, under the field’sname: up to 40 of them, names up to 64 characters, values up to 4,000. The API reference lists every field name we recognise.
A person needs a name and at least one of an email, a phone or a LinkedIn URL. If they have applied to this job before, they are matched to the same application rather than duplicated, and the visitor sees the same success either way: a public key always answers 201 with {"ok": true}, and never says whether the person already existed.
3. Show errors on the thank-you page
Because failures go to the same _redirect address with error= added, one small script on that page can tell the two apart:
<p id="rs-ok">Thanks, your application is in. We will be in touch.</p>
<p id="rs-failed" hidden>Something went wrong sending your application. Please go back and try again.</p>
<script>
if (new URLSearchParams(location.search).has('error')) {
document.getElementById('rs-ok').hidden = true;
document.getElementById('rs-failed').hidden = false;
}
</script>
Optional: let the visitor pick the job
One form for every open role: swap the hidden job_id input for a <select> and fill it from GET /jobs. Public keys can read the job list from an allowed origin; send the key in the X-Api-Key header.
<label for="rs-job">Role</label>
<select id="rs-job" name="job_id" required>
<option value="">Loading roles…</option>
</select>
<script>
(async () => {
const select = document.getElementById('rs-job');
try {
const res = await fetch(
'https://lbhikadtsmbnzkzetpyb.supabase.co/functions/v1/api/v1/jobs?limit=100',
{ headers: { 'X-Api-Key': 'rs_pk_REPLACE' } },
);
if (!res.ok) throw new Error('HTTP ' + res.status);
const { data } = await res.json();
select.replaceChildren(new Option('Choose a role', ''));
for (const job of data) {
const label = job.location ? `${job.title} (${job.location})` : job.title;
select.add(new Option(label, job.id));
}
} catch (err) {
select.replaceChildren(new Option('Roles could not be loaded. Please refresh.', ''));
}
})();
</script>
Remove the hidden job_id input when you add the select, so the form sends only one. Only open jobs you created in the app are listed, newest first.
Testing locally
- Serve the page from a local web server whose address is in the key’s allowed origins, for example
http://localhost:4321. Any static server will do:npx serve -l 4321, orpython -m http.server 4321. - A page opened straight from disk (
file:///…/careers.html) has no origin. The browser sendsOrigin: null, which never matches, so every submission fails withorigin_not_allowed. - Public keys also have a small per-IP limit on top of the per-key one, so a burst of test submissions from one machine can be turned away with
rate_limitedfor up to 10 minutes. Real applicants do not hit it.
If it doesn’t work
Find the error code, either in the JSON response (take _redirect out while you test) or after error= on your thank-you page.
invalid_key(401). Theapi_keyvalue is mistyped or the key was revoked.plan_required(402). The workspace owner is not on a paid plan.origin_not_allowed(403). The page’s origin is not in the key’s list. Compare it character for character:www.,httpsand the port all count. Pages opened from disk never match.forbidden(403). A public key was used for something only secret keys can do. A form never needs that.not_found(404). Thejob_idis wrong, or belongs to another workspace.job_not_open(422). The job was closed or put on hold, or it is a job synced from your ATS.validation_failed(422). Usually no name, or none of an email, a phone and a LinkedIn URL (reported underfields.email).payload_too_large(413). The whole submission was over 12 MB.rate_limited(429). Too many submissions in a minute; wait and send again.
A resume over 10 MB, or of a type we do not store (anything but PDF, Word, plain text, JPEG or PNG), does not fail the application. The person still lands, without the file, and the JSON response ({"ok": true, "warnings": [...]}) carries a warnings entry saying why.