PeopleIQ Recruiter for developers

Connect your HRMS, careers site or internal tools to PeopleIQ Recruiter with the REST API, signed webhooks, the TypeScript SDK and drop-in web components.

Quickstart

The base URL for every endpoint is https://api.your-recruiteriq-host.example/v1. All requests and responses are JSON.

1. Create an API key

A workspace admin creates keys in Settings → API keys. Choose only the scopes your integration needs; keys without explicit scopes are read-only. The full key (sk_…) is shown once — store it in a secret manager, never in browser code.

2. List your openings

List openingsbash
curl https://api.your-recruiteriq-host.example/v1/openings?limit=10 \
  -H "Authorization: Bearer $PEOPLEIQ_API_KEY"
Responsejson
{
  "data": [
    { "id": "opn_…", "title": "Senior backend engineer", "status": "Open", … }
  ],
  "nextCursor": "eyJpZCI6Im9wbl8…",
  "hasMore": true
}

3. Use the SDK

Installbash
npm install @peopleiq/recruiter
List every open rolets
import { PeopleIQRecruiter } from "@peopleiq/recruiter";

const piq = new PeopleIQRecruiter({
  apiKey: process.env.PEOPLEIQ_API_KEY,
  baseUrl: "https://api.your-recruiteriq-host.example",
});

for await (const opening of piq.openings.listAll({ status: "Open" })) {
  console.log(opening.title);
}

Authentication

API key

Send the secret key as a bearer token, or in the X-API-Key header. Keys belong to one workspace and carry the scopes chosen when they were created.

API key headersbash
# Either header works
curl https://api.your-recruiteriq-host.example/v1/me -H "Authorization: Bearer sk_…"
curl https://api.your-recruiteriq-host.example/v1/me -H "X-API-Key: sk_…"

OAuth2 client credentials

For platforms that prefer short-lived tokens, exchange the key for an access token at POST /oauth/token. The client_id is the key id (apk_…) and the client_secret is the key itself. Tokens last one hour and carry the key's scopes.

Client credentials grantbash
curl -X POST https://api.your-recruiteriq-host.example/oauth/token \
  -d grant_type=client_credentials \
  -d client_id=apk_… \
  -d client_secret=sk_…

# → { "access_token": "…", "token_type": "Bearer", "expires_in": 3600, "scope": "read:openings read:applicants" }

Embed tokens

Embedded components running in a browser must never see your API key. Your backend mints an embed token (pqe_…) with POST /v1/embed-tokens using origin, the user's email or userId, and optionally applicantId, scopes and ttlSeconds. Tokens expire after 15 minutes by default and are bound to the workspace, the user (recorded as the reviewer on decisions) and the browser origin. Their scopes are limited to what the minting key holds and to the embed-safe set: read:applicants and decisions. The origin must be registered on the key under Settings → API keys.

Mint an embed tokenbash
curl -X POST https://api.your-recruiteriq-host.example/v1/embed-tokens \
  -H "Authorization: Bearer $PEOPLEIQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "origin": "https://hr.acme.com",
    "email": "recruiter@acme.com",
    "applicantId": "app_…",
    "scopes": ["read:applicants", "decisions"],
    "ttlSeconds": 900
  }'

# → 201 { "token": "pqe_…", "expiresAt": "…", "origin": "https://hr.acme.com", "scopes": ["read:applicants", "decisions"], "userId": "…", "applicantId": "app_…" }

Scopes

Each key has a set of scopes. Calls outside them fail with 403 insufficient_scope. New keys default to read:openings and read:applicants. Keys created before scopes existed keep full access and are labelled Full access (legacy) — set explicit scopes on them.

ScopeAllows
read:openingsList and read openings, job descriptions and interview rounds.
write:openingsCreate, update and close openings; generate and save job descriptions; configure rounds.
read:applicantsList and read applicants, interviews, offers, approvals and rejection reasons.
write:applicantsCreate applicants (resume upload) and issue candidate portal links.
decisionsRecord hiring decisions (advance, reject, offer, hire), send offers and decide approvals. Always requires a named human reviewer.
webhooksManage webhook subscriptions, send test events and read delivery logs.
adminFull access. Implies every other scope.

Errors

Errors use a single envelope. Branch on code — it is stable — and log the requestId when contacting support.

Error responsejson
{
  "error": {
    "code": "insufficient_scope",
    "message": "This API key is missing the write:openings scope.",
    "requestId": "req_…"
  }
}
StatusCodesMeaning
400invalid_requestvalidation_errorinvalid_cursorThe request is malformed, a field failed validation, or the pagination cursor is not valid.
401unauthenticatedinvalid_api_keytoken_expiredNo credential, an unknown or revoked key, or an expired OAuth/embed token.
402feature_not_in_planplan_limitThe workspace plan does not include this feature or a usage limit was reached.
403insufficient_scopeforbiddenorigin_not_allowedorg_suspendedreviewer_forbiddenThe credential lacks a scope, the browser origin is not registered, the workspace is suspended, or the named reviewer may not decide.
404not_foundThe resource does not exist in this workspace.
409conflictidempotency_in_progressThe resource changed, or a request with the same Idempotency-Key is still running.
422idempotency_key_reusedreviewer_requiredAn Idempotency-Key was reused with a different body, or a decision was sent without a named human reviewer.
429rate_limitedToo many requests. Wait for the number of seconds in Retry-After.
500internal_errorUnexpected failure. Retry with backoff and quote the requestId to support.

Pagination, idempotency and rate limits

Pagination

List endpoints accept limit (default 25, maximum 100) and cursor, and return { data, nextCursor, hasMore }. Pass nextCursor back as cursor until hasMore is false.

Next pagebash
curl "https://api.your-recruiteriq-host.example/v1/applicants?limit=100&cursor=eyJpZCI6…" \
  -H "Authorization: Bearer $PEOPLEIQ_API_KEY"

Idempotency

Send an Idempotency-Key header on any POST. Repeating the same key with the same body within 24 hours replays the original response with Idempotent-Replayed: true instead of acting twice. Reusing a key with a different body returns 422 idempotency_key_reused.

Idempotent createbash
curl -X POST https://api.your-recruiteriq-host.example/v1/applicants \
  -H "Authorization: Bearer $PEOPLEIQ_API_KEY" \
  -H "Idempotency-Key: 4f7c1e1a-2b0d-4c8e-9c4b-0d6c1f2a9e11" \
  -H "Content-Type: application/json" \
  -d '{ "openingId": "opn_…", "name": "Ada Lovelace", "email": "ada@example.com", "resumeText": "…" }'

Rate limits

Each key may make 300 requests per minute unless an admin set a different limit on it. Every response includes X-RateLimit-Limit and X-RateLimit-Remaining. When exceeded you receive 429 rate_limited with a Retry-After header in seconds.

Endpoints

Paths are relative to https://api.your-recruiteriq-host.example/v1. See the OpenAPI document for request and response schemas.

Account

EndpointScopeDescription
GET /meanyThe workspace and credential making the call, with its granted scopes.
GET /usageanyPlan usage for the current billing period.

Openings

EndpointScopeDescription
GET /openingsread:openingsList openings (paginated, filter by status).
POST /openingswrite:openingsCreate an opening.
GET /openings/{id}read:openingsRead one opening.
PATCH /openings/{id}write:openingsUpdate an opening.
DELETE /openings/{id}write:openingsClose an opening.
POST /openings/{id}/jd/generatewrite:openingsGenerate a job description draft.
PUT /openings/{id}/jdwrite:openingsSave the job description.
GET /openings/{id}/roundsread:openingsRead interview rounds.
PUT /openings/{id}/roundswrite:openingsReplace interview rounds.
POST /openings/{id}/rounds/suggestwrite:openingsSuggest rounds for the role.

Applicants

EndpointScopeDescription
GET /applicantsread:applicantsList applicants (paginated).
POST /applicantswrite:applicantsCreate an applicant with openingId and resumeText or resume {filename, mime, dataBase64}.
GET /applicants/{id}read:applicantsRead one applicant with screening results.
POST /applicants/{id}/decisiondecisionsadvance | reject | offer | hire with a named human reviewer (actor.email).
GET /applicants/{id}/interviewsread:applicantsInterviews for an applicant.
GET /applicants/{id}/offerread:applicantsThe applicant's offer.
POST /applicants/{id}/offer/senddecisionsSend the drafted offer.
GET /applicants/{id}/portal-linkread:applicantsRead the candidate portal link.
POST /applicants/{id}/portal-linkwrite:applicantsIssue a candidate portal link.
GET /rejection-reasonsread:applicantsConfigured rejection reason codes.

Approvals, interviews & offers

EndpointScopeDescription
GET /approvalsread:applicantsPending and recent approvals.
POST /approvals/{id}/decidedecisionsapprove | reject with a named human reviewer.
GET /interviewsread:applicantsInterviews across the workspace.
GET /offersread:applicantsOffers across the workspace.

Webhooks

EndpointScopeDescription
GET /webhook-eventsanyEvent types you can subscribe to.
GET /webhookswebhooksList subscriptions.
POST /webhookswebhooksCreate a subscription (the signing secret is returned once).
GET /webhooks/{id}webhooksRead a subscription.
PATCH /webhooks/{id}webhooksUpdate a subscription.
DELETE /webhooks/{id}webhooksDelete a subscription.
POST /webhooks/{id}/testwebhooksSend a webhook.test event.
GET /webhooks/{id}/deliverieswebhooksDelivery attempts and responses.

Embeds

EndpointScopeDescription
POST /embed-tokensread:applicantsMint a 15-minute pqe_ token for an embedded component (call from your backend).

Human oversight for decisions

Hiring decisions and approval decisions always name the human reviewer in actor.email; the reviewer must be a recruiter or admin in the workspace. Requests without one fail with 422 reviewer_required. Every decision is written to the audit log and the EU AI Act decision log.

Record a decisionbash
curl -X POST https://api.your-recruiteriq-host.example/v1/applicants/app_…/decision \
  -H "Authorization: Bearer $PEOPLEIQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "action": "advance", "note": "Strong systems design", "actor": { "email": "recruiter@acme.com" } }'

Webhooks

Subscribe an HTTPS endpoint to events with POST /v1/webhooks or in Settings → Automatic notifications. Each delivery is a POST with this envelope:

Event envelopejson
{
  "id": "evt_…",
  "event": "applicant.hired",
  "apiVersion": "2026-11-01",
  "tenantId": "ten_…",
  "deliveryId": "dlv_…",
  "occurredAt": "2026-11-21T10:30:00.000Z",
  "data": { "applicant": { "id": "app_…", … } }
}
EventSent when
applicant.createdA new applicant was added to an opening.
applicant.stage_changedAn applicant moved to a different pipeline stage.
applicant.rejectedAn applicant was rejected.
applicant.hiredAn applicant was hired.
interview.invitedA candidate was invited to an interview.
interview.scheduledAn interview was scheduled.
interview.completedAn interview was completed.
approval.createdAn approval was requested.
approval.decidedAn approval was approved or rejected.
offer.draftedAn offer was drafted.
offer.sentAn offer was sent to the candidate.
opening.createdAn opening was created.
opening.publishedAn opening was published to the careers page.
opening.closedAn opening was closed.
webhook.testA test event sent from the dashboard or API.

Headers and signature

  • X-PeopleIQ-Signature: v1=<hex> — HMAC-SHA256 of ${timestamp}.${rawBody} with your subscription secret.
  • X-PeopleIQ-Timestamp — Unix seconds. Reject deliveries older than 5 minutes.
  • X-PeopleIQ-Event and X-PeopleIQ-Delivery — the event name and delivery id.
  • Older integrations can read the same values from the X-RecruiterIQ-* aliases.
Verify a webhook in Node.jsjs
import crypto from "node:crypto";
import express from "express";

const app = express();

// Use the RAW body — re-serialised JSON will not match the signature.
app.post("/webhooks/peopleiq", express.raw({ type: "application/json" }), (req, res) => {
  const timestamp = req.get("X-PeopleIQ-Timestamp") ?? "";
  const signature = (req.get("X-PeopleIQ-Signature") ?? "").replace(/^v1=/, "");
  const rawBody = req.body.toString("utf8");

  // Reject replays older than 5 minutes.
  const age = Math.abs(Date.now() / 1000 - Number(timestamp));
  if (!Number.isFinite(age) || age > 300) return res.status(400).send("stale");

  const expected = crypto
    .createHmac("sha256", process.env.PEOPLEIQ_WEBHOOK_SECRET)
    .update(`${timestamp}.${rawBody}`)
    .digest("hex");
  const ok = signature.length === expected.length &&
    crypto.timingSafeEqual(Buffer.from(signature, "hex"), Buffer.from(expected, "hex"));
  if (!ok) return res.status(401).send("bad signature");

  const event = JSON.parse(rawBody);
  // Deduplicate on event.deliveryId — retries reuse it.
  console.log(event.event, event.data);
  res.sendStatus(200);
});

Retries

Respond with any 2xx within 15 seconds. Failed deliveries are retried after 10 seconds, 30 seconds, 2 minutes, 10 minutes and 1 hour, then marked dead. Every attempt is recorded and visible with GET /v1/webhooks/{id}/deliveries. Retries reuse the same deliveryId, so deduplicate on it.

TypeScript SDK

@peopleiq/recruiter wraps every endpoint with typed methods. It adds an Idempotency-Key to each POST automatically, retries with backoff while honouring Retry-After, and throws PeopleIQError with code, status and requestId. The older @recruiteriq/sdk package is deprecated.

Installbash
npm install @peopleiq/recruiter
Create an applicant and record a decisionts
import { PeopleIQRecruiter, PeopleIQError } from "@peopleiq/recruiter";

// API key …
const piq = new PeopleIQRecruiter({ apiKey: process.env.PEOPLEIQ_API_KEY, baseUrl: "https://api.your-recruiteriq-host.example" });
// … or OAuth2 client credentials (tokens are fetched and refreshed automatically)
// const piq = new PeopleIQRecruiter({ clientId: "apk_…", clientSecret: "sk_…", baseUrl: "https://api.your-recruiteriq-host.example" });

const { applicant } = await piq.applicants.create({
  openingId,
  name: "Ada Lovelace",
  email: "ada@example.com",
  resumeText,
});

try {
  await piq.applicants.decide(applicant.id, {
    action: "advance",
    actor: { email: "recruiter@acme.com" }, // named human reviewer (required)
  });
} catch (err) {
  if (err instanceof PeopleIQError) console.error(err.code, err.status, err.requestId);
  else throw err;
}
Verify a webhook with the SDKts
import { verifyWebhookSignature } from "@peopleiq/recruiter";

const event = verifyWebhookSignature({
  payload: rawBody,            // string or Buffer, exactly as received
  headers: req.headers,
  secret: process.env.PEOPLEIQ_WEBHOOK_SECRET,
}); // throws if the signature or timestamp is invalid

Embeds

@peopleiq/recruiter-embed ships two web components in peopleiq-embed.min.js. Register every site that hosts them as an embed origin on your API key under Settings → API keys.

Careers page

<peopleiq-careers> lists your public openings and lets candidates apply, including the automated-screening notice and consent.

Careers embedhtml
<script src="https://unpkg.com/@peopleiq/recruiter-embed/dist/peopleiq-embed.min.js" defer></script>

<peopleiq-careers api-base="https://api.your-recruiteriq-host.example" tenant="acme-slug"></peopleiq-careers>

Candidate review

<peopleiq-candidate-review> shows one applicant inside your HR tool. It authenticates with an embed token; set getToken so it can refresh before expiry.

Candidate review embedhtml
<peopleiq-candidate-review
  api-base="https://api.your-recruiteriq-host.example"
  applicant-id="app_…"
  token="pqe_…"
></peopleiq-candidate-review>

<script>
  // Refresh the short-lived embed token from your own backend,
  // which calls POST /v1/embed-tokens with your secret API key.
  const el = document.querySelector("peopleiq-candidate-review");
  el.getToken = async () =>
    fetch("/your-backend/embed-token").then((r) => r.json()).then((j) => j.token);
</script>

Theming

Both components read CSS custom properties, so they match your design system.

Theme variablescss
peopleiq-careers,
peopleiq-candidate-review {
  --piq-font: "Inter", system-ui, sans-serif;
  --piq-color-text: #1a1310;
  --piq-color-muted: #6b5e55;
  --piq-color-bg: #ffffff;
  --piq-color-surface: #faf7f3;
  --piq-color-border: #e6ddd3;
  --piq-color-accent: #a64c14;
  --piq-color-accent-contrast: #ffffff;
  --piq-color-danger: #b42318;
  --piq-radius: 10px;
  --piq-space: 16px;
}

OpenAPI

The complete OpenAPI 3.1 description is public at https://api.your-recruiteriq-host.example/v1/openapi.json. Import it into Postman or Insomnia, or generate a client in another language.

Download the specbash
curl -o peopleiq-openapi.json https://api.your-recruiteriq-host.example/v1/openapi.json