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
curl https://api.your-recruiteriq-host.example/v1/openings?limit=10 \
-H "Authorization: Bearer $PEOPLEIQ_API_KEY"{
"data": [
{ "id": "opn_…", "title": "Senior backend engineer", "status": "Open", … }
],
"nextCursor": "eyJpZCI6Im9wbl8…",
"hasMore": true
}3. Use the SDK
npm install @peopleiq/recruiterimport { 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.
# 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.
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.
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.
| Scope | Allows |
|---|---|
read:openings | List and read openings, job descriptions and interview rounds. |
write:openings | Create, update and close openings; generate and save job descriptions; configure rounds. |
read:applicants | List and read applicants, interviews, offers, approvals and rejection reasons. |
write:applicants | Create applicants (resume upload) and issue candidate portal links. |
decisions | Record hiring decisions (advance, reject, offer, hire), send offers and decide approvals. Always requires a named human reviewer. |
webhooks | Manage webhook subscriptions, send test events and read delivery logs. |
admin | Full 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": {
"code": "insufficient_scope",
"message": "This API key is missing the write:openings scope.",
"requestId": "req_…"
}
}| Status | Codes | Meaning |
|---|---|---|
| 400 | invalid_requestvalidation_errorinvalid_cursor | The request is malformed, a field failed validation, or the pagination cursor is not valid. |
| 401 | unauthenticatedinvalid_api_keytoken_expired | No credential, an unknown or revoked key, or an expired OAuth/embed token. |
| 402 | feature_not_in_planplan_limit | The workspace plan does not include this feature or a usage limit was reached. |
| 403 | insufficient_scopeforbiddenorigin_not_allowedorg_suspendedreviewer_forbidden | The credential lacks a scope, the browser origin is not registered, the workspace is suspended, or the named reviewer may not decide. |
| 404 | not_found | The resource does not exist in this workspace. |
| 409 | conflictidempotency_in_progress | The resource changed, or a request with the same Idempotency-Key is still running. |
| 422 | idempotency_key_reusedreviewer_required | An Idempotency-Key was reused with a different body, or a decision was sent without a named human reviewer. |
| 429 | rate_limited | Too many requests. Wait for the number of seconds in Retry-After. |
| 500 | internal_error | Unexpected 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.
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.
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
| Endpoint | Scope | Description |
|---|---|---|
GET /me | any | The workspace and credential making the call, with its granted scopes. |
GET /usage | any | Plan usage for the current billing period. |
Openings
| Endpoint | Scope | Description |
|---|---|---|
GET /openings | read:openings | List openings (paginated, filter by status). |
POST /openings | write:openings | Create an opening. |
GET /openings/{id} | read:openings | Read one opening. |
PATCH /openings/{id} | write:openings | Update an opening. |
DELETE /openings/{id} | write:openings | Close an opening. |
POST /openings/{id}/jd/generate | write:openings | Generate a job description draft. |
PUT /openings/{id}/jd | write:openings | Save the job description. |
GET /openings/{id}/rounds | read:openings | Read interview rounds. |
PUT /openings/{id}/rounds | write:openings | Replace interview rounds. |
POST /openings/{id}/rounds/suggest | write:openings | Suggest rounds for the role. |
Applicants
| Endpoint | Scope | Description |
|---|---|---|
GET /applicants | read:applicants | List applicants (paginated). |
POST /applicants | write:applicants | Create an applicant with openingId and resumeText or resume {filename, mime, dataBase64}. |
GET /applicants/{id} | read:applicants | Read one applicant with screening results. |
POST /applicants/{id}/decision | decisions | advance | reject | offer | hire with a named human reviewer (actor.email). |
GET /applicants/{id}/interviews | read:applicants | Interviews for an applicant. |
GET /applicants/{id}/offer | read:applicants | The applicant's offer. |
POST /applicants/{id}/offer/send | decisions | Send the drafted offer. |
GET /applicants/{id}/portal-link | read:applicants | Read the candidate portal link. |
POST /applicants/{id}/portal-link | write:applicants | Issue a candidate portal link. |
GET /rejection-reasons | read:applicants | Configured rejection reason codes. |
Approvals, interviews & offers
| Endpoint | Scope | Description |
|---|---|---|
GET /approvals | read:applicants | Pending and recent approvals. |
POST /approvals/{id}/decide | decisions | approve | reject with a named human reviewer. |
GET /interviews | read:applicants | Interviews across the workspace. |
GET /offers | read:applicants | Offers across the workspace. |
Webhooks
| Endpoint | Scope | Description |
|---|---|---|
GET /webhook-events | any | Event types you can subscribe to. |
GET /webhooks | webhooks | List subscriptions. |
POST /webhooks | webhooks | Create a subscription (the signing secret is returned once). |
GET /webhooks/{id} | webhooks | Read a subscription. |
PATCH /webhooks/{id} | webhooks | Update a subscription. |
DELETE /webhooks/{id} | webhooks | Delete a subscription. |
POST /webhooks/{id}/test | webhooks | Send a webhook.test event. |
GET /webhooks/{id}/deliveries | webhooks | Delivery attempts and responses. |
Embeds
| Endpoint | Scope | Description |
|---|---|---|
POST /embed-tokens | read:applicants | Mint 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.
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:
{
"id": "evt_…",
"event": "applicant.hired",
"apiVersion": "2026-11-01",
"tenantId": "ten_…",
"deliveryId": "dlv_…",
"occurredAt": "2026-11-21T10:30:00.000Z",
"data": { "applicant": { "id": "app_…", … } }
}| Event | Sent when |
|---|---|
applicant.created | A new applicant was added to an opening. |
applicant.stage_changed | An applicant moved to a different pipeline stage. |
applicant.rejected | An applicant was rejected. |
applicant.hired | An applicant was hired. |
interview.invited | A candidate was invited to an interview. |
interview.scheduled | An interview was scheduled. |
interview.completed | An interview was completed. |
approval.created | An approval was requested. |
approval.decided | An approval was approved or rejected. |
offer.drafted | An offer was drafted. |
offer.sent | An offer was sent to the candidate. |
opening.created | An opening was created. |
opening.published | An opening was published to the careers page. |
opening.closed | An opening was closed. |
webhook.test | A 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-EventandX-PeopleIQ-Delivery— the event name and delivery id.- Older integrations can read the same values from the
X-RecruiterIQ-*aliases.
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.
npm install @peopleiq/recruiterimport { 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;
}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 invalidEmbeds
@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.
<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.
<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.
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.
curl -o peopleiq-openapi.json https://api.your-recruiteriq-host.example/v1/openapi.json