Skip to content
Recruit Swipe

Docs / Developer API

Server-side examples

Copy-paste code in cURL, Node, PHP and Python for creating applications with and without a resume, paging through applications, and adding talent-pool candidates.

This page is for calling the API from your own backend: a careers site with a server, a job-board import, a nightly sync to a spreadsheet. Each task below is shown in cURL, Node 18 or later (built-in fetch), PHP (the curl extension) and Python (requests). Every example uses a secret key read from the RS_KEY environment variable; never hard-code it or send it to a browser. The API reference has every field and response.

The base URL in every example is:

https://lbhikadtsmbnzkzetpyb.supabase.co/functions/v1/api/v1

Create an application (JSON)

The body carries the person, the job and any extra answers. Idempotency-Key makes a retry safe: the same key returns the application already made, with 200 and "created": false. Use something unique to the submission in your system, such as your own row id.

cURL

curl -X POST "https://lbhikadtsmbnzkzetpyb.supabase.co/functions/v1/api/v1/applications" \
  -H "X-Api-Key: $RS_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: careers-site-10482" \
  -d '{
    "job_id": "7f3c9a2e-4b1d-4e8a-9c55-1d2e3f4a5b6c",
    "first_name": "Jane",
    "last_name": "Doe",
    "email": "jane.doe@example.com",
    "phone": "+1 555 0142",
    "linkedin": "https://www.linkedin.com/in/janedoe",
    "skills": ["Python", "SQL"],
    "source": "careers-site",
    "Notice period": "4 weeks"
  }'

Node

const BASE = 'https://lbhikadtsmbnzkzetpyb.supabase.co/functions/v1/api/v1';

const res = await fetch(`${BASE}/applications`, {
  method: 'POST',
  headers: {
    'X-Api-Key': process.env.RS_KEY,
    'Content-Type': 'application/json',
    'Idempotency-Key': 'careers-site-10482',
  },
  body: JSON.stringify({
    job_id: '7f3c9a2e-4b1d-4e8a-9c55-1d2e3f4a5b6c',
    first_name: 'Jane',
    last_name: 'Doe',
    email: 'jane.doe@example.com',
    phone: '+1 555 0142',
    skills: ['Python', 'SQL'],
    source: 'careers-site',
    'Notice period': '4 weeks',
  }),
});

const body = await res.json();
if (!res.ok) throw new Error(`${res.status} ${body.error}: ${body.message}`);
console.log(body.application.id, body.application.created ? 'new' : 'already there');

PHP

<?php
$base = 'https://lbhikadtsmbnzkzetpyb.supabase.co/functions/v1/api/v1';

$ch = curl_init("$base/applications");
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'X-Api-Key: ' . getenv('RS_KEY'),
        'Content-Type: application/json',
        'Idempotency-Key: careers-site-10482',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'job_id' => '7f3c9a2e-4b1d-4e8a-9c55-1d2e3f4a5b6c',
        'first_name' => 'Jane',
        'last_name' => 'Doe',
        'email' => 'jane.doe@example.com',
        'phone' => '+1 555 0142',
        'skills' => ['Python', 'SQL'],
        'source' => 'careers-site',
        'Notice period' => '4 weeks',
    ]),
]);
$body = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);

if ($status >= 400) {
    throw new RuntimeException("$status {$body['error']}: {$body['message']}");
}
echo $body['application']['id'];

Python

import os
import requests

BASE = "https://lbhikadtsmbnzkzetpyb.supabase.co/functions/v1/api/v1"

res = requests.post(
    f"{BASE}/applications",
    headers={"X-Api-Key": os.environ["RS_KEY"], "Idempotency-Key": "careers-site-10482"},
    json={
        "job_id": "7f3c9a2e-4b1d-4e8a-9c55-1d2e3f4a5b6c",
        "first_name": "Jane",
        "last_name": "Doe",
        "email": "jane.doe@example.com",
        "phone": "+1 555 0142",
        "skills": ["Python", "SQL"],
        "source": "careers-site",
        "Notice period": "4 weeks",
    },
    timeout=30,
)
body = res.json()
if not res.ok:
    raise RuntimeError(f"{res.status_code} {body['error']}: {body['message']}")
print(body["application"]["id"], body["application"]["created"])

Create an application with a resume (multipart)

Send multipart/form-data with the file in a field called resume. Every other field is a plain form field; skills becomes a comma-separated string. Resumes can be PDF, Word (.doc, .docx), plain text, JPEG or PNG, up to 10 MB, and the whole request up to 12 MB. A resume we cannot store does not fail the request: the application is still created, and the response lists the reason in warnings. The file is stored only for a new person (a new application for someone already in your workspace keeps their existing resume); sent with a duplicate it is ignored.

If your code already holds the file as bytes, you can stay with JSON instead and send resume_base64 plus resume_filename. Base64 is a third larger than the file, so the 12 MB request limit caps a base64 resume at about 9 MB.

cURL

curl -X POST "https://lbhikadtsmbnzkzetpyb.supabase.co/functions/v1/api/v1/applications" \
  -H "X-Api-Key: $RS_KEY" \
  -H "Idempotency-Key: careers-site-10483" \
  -F job_id=7f3c9a2e-4b1d-4e8a-9c55-1d2e3f4a5b6c \
  -F name="Sam Lee" \
  -F email=sam.lee@example.com \
  -F skills="Recruiting, Sourcing" \
  -F "resume=@sam-lee-cv.pdf;type=application/pdf"

Do not set Content-Type yourself for multipart in any language: the client library adds it with the boundary.

Node

Uses BASE from the first Node example.

import { readFile } from 'node:fs/promises';

const form = new FormData();
form.append('job_id', '7f3c9a2e-4b1d-4e8a-9c55-1d2e3f4a5b6c');
form.append('name', 'Sam Lee');
form.append('email', 'sam.lee@example.com');
form.append('skills', 'Recruiting, Sourcing');
form.append(
  'resume',
  new Blob([await readFile('sam-lee-cv.pdf')], { type: 'application/pdf' }),
  'sam-lee-cv.pdf',
);

const res = await fetch(`${BASE}/applications`, {
  method: 'POST',
  headers: { 'X-Api-Key': process.env.RS_KEY, 'Idempotency-Key': 'careers-site-10483' },
  body: form,
});
const body = await res.json();
if (body.warnings) console.warn(body.warnings);

PHP

Uses $base from the first PHP example.

<?php
$ch = curl_init("$base/applications");
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'X-Api-Key: ' . getenv('RS_KEY'),
        'Idempotency-Key: careers-site-10483',
    ],
    // An array (not a string) makes curl send multipart/form-data.
    CURLOPT_POSTFIELDS => [
        'job_id' => '7f3c9a2e-4b1d-4e8a-9c55-1d2e3f4a5b6c',
        'name' => 'Sam Lee',
        'email' => 'sam.lee@example.com',
        'skills' => 'Recruiting, Sourcing',
        'resume' => new CURLFile('sam-lee-cv.pdf', 'application/pdf', 'sam-lee-cv.pdf'),
    ],
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);

Python

Uses BASE and the os and requests imports from the first Python example.

with open("sam-lee-cv.pdf", "rb") as cv:
    res = requests.post(
        f"{BASE}/applications",
        headers={"X-Api-Key": os.environ["RS_KEY"], "Idempotency-Key": "careers-site-10483"},
        data={
            "job_id": "7f3c9a2e-4b1d-4e8a-9c55-1d2e3f4a5b6c",
            "name": "Sam Lee",
            "email": "sam.lee@example.com",
            "skills": "Recruiting, Sourcing",
        },
        files={"resume": ("sam-lee-cv.pdf", cv, "application/pdf")},
        timeout=60,
    )
body = res.json()
print(body.get("warnings"))

List applications, page by page

Reads need a secret key. Lists come newest first, limit (default 50, at most 100) per page. Each page has next_cursor; pass it back as cursor for the next page, and stop when it is null. Filters (job_id, status, stage, updated_since) combine; this example fetches every application updated since 1 October.

cURL

curl -G "https://lbhikadtsmbnzkzetpyb.supabase.co/functions/v1/api/v1/applications" \
  -H "X-Api-Key: $RS_KEY" \
  --data-urlencode "updated_since=2026-10-01T00:00:00Z" \
  --data-urlencode "limit=100"
# then repeat with: --data-urlencode "cursor=<next_cursor from the last page>"

Node

Uses BASE from the first Node example.

async function* allApplications(params) {
  let cursor = null;
  do {
    const qs = new URLSearchParams({ ...params, limit: '100', ...(cursor ? { cursor } : {}) });
    const res = await fetch(`${BASE}/applications?${qs}`, {
      headers: { 'X-Api-Key': process.env.RS_KEY },
    });
    if (!res.ok) throw new Error(`HTTP ${res.status}`);
    const page = await res.json();
    yield* page.data;
    cursor = page.next_cursor;
  } while (cursor);
}

for await (const app of allApplications({ updated_since: '2026-10-01T00:00:00Z' })) {
  console.log(app.candidate.full_name, app.job.title, app.stage.name);
}

PHP

Uses $base from the first PHP example.

<?php
$cursor = null;
do {
    $query = ['updated_since' => '2026-10-01T00:00:00Z', 'limit' => 100];
    if ($cursor !== null) {
        $query['cursor'] = $cursor;
    }
    $ch = curl_init("$base/applications?" . http_build_query($query));
    curl_setopt_array($ch, [
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => ['X-Api-Key: ' . getenv('RS_KEY')],
    ]);
    $page = json_decode(curl_exec($ch), true);
    curl_close($ch);

    foreach ($page['data'] as $app) {
        echo "{$app['candidate']['full_name']} - {$app['job']['title']} - {$app['stage']['name']}\n";
    }
    $cursor = $page['next_cursor'];
} while ($cursor !== null);

Python

Uses BASE and the os and requests imports from the first Python example.

def all_applications(**filters):
    cursor = None
    while True:
        params = {**filters, "limit": 100}
        if cursor:
            params["cursor"] = cursor
        res = requests.get(
            f"{BASE}/applications",
            headers={"X-Api-Key": os.environ["RS_KEY"]},
            params=params,
            timeout=30,
        )
        res.raise_for_status()
        page = res.json()
        yield from page["data"]
        cursor = page["next_cursor"]
        if not cursor:
            break

for app in all_applications(updated_since="2026-10-01T00:00:00Z"):
    print(app["candidate"]["full_name"], app["job"]["title"], app["stage"]["name"])

If you hit 429 rate_limited while paging, wait for the number of seconds in the Retry-After header and carry on with the same cursor.

Add a candidate to the talent pool

POST /candidates adds a person without applying them to a job. If someone with the same email, phone or LinkedIn is already in your workspace, you get 200 with "matched": true and their existing id, never a duplicate.

cURL

curl -X POST "https://lbhikadtsmbnzkzetpyb.supabase.co/functions/v1/api/v1/candidates" \
  -H "X-Api-Key: $RS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Priya Shah",
    "email": "priya.shah@example.com",
    "headline": "Senior data engineer",
    "location": "Austin, TX",
    "skills": "Spark, Airflow, Python",
    "source": "referral"
  }'

Node

Uses BASE from the first Node example.

const res = await fetch(`${BASE}/candidates`, {
  method: 'POST',
  headers: { 'X-Api-Key': process.env.RS_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    name: 'Priya Shah',
    email: 'priya.shah@example.com',
    headline: 'Senior data engineer',
    location: 'Austin, TX',
    skills: ['Spark', 'Airflow', 'Python'],
    source: 'referral',
  }),
});
const { candidate } = await res.json();
console.log(candidate.id, candidate.matched ? 'already in the pool' : 'added');

PHP

Uses $base from the first PHP example.

<?php
$ch = curl_init("$base/candidates");
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['X-Api-Key: ' . getenv('RS_KEY'), 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => json_encode([
        'name' => 'Priya Shah',
        'email' => 'priya.shah@example.com',
        'headline' => 'Senior data engineer',
        'location' => 'Austin, TX',
        'skills' => ['Spark', 'Airflow', 'Python'],
        'source' => 'referral',
    ]),
]);
$candidate = json_decode(curl_exec($ch), true)['candidate'];
curl_close($ch);

Python

Uses BASE and the os and requests imports from the first Python example.

res = requests.post(
    f"{BASE}/candidates",
    headers={"X-Api-Key": os.environ["RS_KEY"]},
    json={
        "name": "Priya Shah",
        "email": "priya.shah@example.com",
        "headline": "Senior data engineer",
        "location": "Austin, TX",
        "skills": ["Spark", "Airflow", "Python"],
        "source": "referral",
    },
    timeout=30,
)
candidate = res.json()["candidate"]
print(candidate["id"], candidate["matched"])

If it doesn’t work

  • 401 invalid_key. RS_KEY is empty, mistyped or revoked. Print its first 12 characters and compare them with the prefix shown in the app.
  • 402 plan_required. The workspace owner is not on a paid plan.
  • 403 forbidden. You used a public key (rs_pk_) for a read. Reads need a secret key.
  • 403 origin_not_allowed. You used a public key from a server. Servers use secret keys.
  • 404 not_found. The job, candidate or application id is wrong or is in another workspace. (A job synced from your ATS is 404 on a read, and 422 job_not_open when you submit to it.)
  • 413 payload_too_large. The request was over 12 MB.
  • 415 unsupported_content_type. Send JSON, application/x-www-form-urlencoded or multipart/form-data.
  • 422 validation_failed. fields names each problem. 422 job_not_open means the job is closed or on hold, or was synced from your ATS.
  • 429 rate_limited. Over 120 requests a minute on this key; wait Retry-After seconds.