Developers

Build on PeopleIQ

Public APIs for PeopleIQ HR and PeopleIQ Recruiter, plus the Partner API for HRMS vendors who resell and manage PeopleIQ for their customers.

Partner sign in →

Overview

Product APIs

Per-customer, machine-authenticated /v1 APIs of each product: HR chat, policies, tickets, users; Recruiter jobs and candidates.

Partner API

Your partner-level credentials: create and manage customer tenants, users, subscriptions and statements.

Sandboxes

Free customer tenants for development — flagged sandbox: true, never billed, purged after 30 days.

Conventions shared by every PeopleIQ API: JSON errors { error: { code, message, requestId } }, X-Request-ID on every response, Idempotency-Key on writes, per-credential rate limits with X-RateLimit-Limit/-Remaining/-Reset and 429 + Retry-After.

Product APIs

APIBase URLOpenAPI 3.1
PeopleIQ HRhttp://localhost:4300/v1http://localhost:4300/v1/openapi.json
PeopleIQ Recruiterhttp://localhost:4100/v1http://localhost:4100/v1/openapi.json
PeopleIQ Partnerhttps://peopleiq.datacaffe.ai/api/platform/partner/v1https://peopleiq.datacaffe.ai/api/platform/partner/v1/openapi.json

Authentication

API keys

A customer admin creates a key in the product's API settings (scoped, optional expiry and rate limit). Send it as a Bearer token from your backend only — never ship it to a browser.

curl http://localhost:4300/v1/me -H "Authorization: Bearer $PEOPLEIQ_HR_API_KEY"

OAuth2 client credentials

Exchange a client id + secret for a short-lived access token (JSON, form or HTTP Basic). Request a subset of the client's scopes with scope.

curl -X POST http://localhost:4300/v1/oauth/token -H "content-type: application/json" \
  -d '{"grant_type":"client_credentials","client_id":"…","client_secret":"…","scope":"chat act_as_user"}'
# → {"access_token":"…","token_type":"Bearer","expires_in":3600,"scope":"chat act_as_user"}

Act as a user

With the act_as_user scope, add X-PeopleIQ-User: <email | external id | user id>. The call then runs with that user's role, plan, features and allow-lists — exactly as in the web app. With provision_users, unknown users are created just in time.

curl -X POST http://localhost:4300/v1/chat -H "Authorization: Bearer $TOKEN" \
  -H "X-PeopleIQ-User: priya@customer.com" -H "Idempotency-Key: $(uuidgen)" \
  -H "content-type: application/json" -d '{"message":"How many leave days do I have?"}'

Embed tokens

Embed the HR chat widget in your HRMS: your backend mints a short-lived (≤15 min) embed token bound to tenant + user + origin (the origin must be on the customer's allowed embed origins list), then the page uses it.

// backend
const r = await fetch("http://localhost:4300/v1/embed-tokens", { method: "POST",
  headers: { authorization: `Bearer ${token}`, "content-type": "application/json" },
  body: JSON.stringify({ user: "priya@customer.com", origin: "https://hrms.example.com" }) });
const { token: embedToken } = await r.json();

<!-- page -->
<peopleiq-hr-chat token="EMBED_TOKEN"></peopleiq-hr-chat>

Provisioning & webhooks

The platform pushes every tenant / user change to the products as signed, idempotent snapshots (transactional outbox, retries with backoff, dead letters).

  • Headers: x-peopleiq-event-id, x-peopleiq-timestamp, x-peopleiq-signature: v1=<hex HMAC-SHA256(secret, timestamp + "." + rawBody)>. Reject timestamps outside ±5 min and already-seen event ids.
  • Types: tenant.updated (plan, features, subscription, readOnly, sandbox, managedByPartnerId), user.updated (role, product access, hasAccess).
  • credentials.requested — defined for partner-requested product API keys (same envelope + signature). Recorded today, delivered once the products accept it.
  • Sandbox expiry sends a final tenant.updated with status: "suspended" and owns: false before the platform purges the tenant.
import { createHmac, timingSafeEqual } from "node:crypto";
const want = "v1=" + createHmac("sha256", secret).update(`${ts}.${rawBody}`).digest("hex");
const ok = want.length === sig.length && timingSafeEqual(Buffer.from(want), Buffer.from(sig));

SDK quickstarts

@peopleiq/hr

npm install @peopleiq/hr

import { PeopleIQHR } from "@peopleiq/hr";
const hr = new PeopleIQHR({ baseUrl: "http://localhost:4300", apiKey: process.env.PEOPLEIQ_HR_API_KEY });
// or OAuth: new PeopleIQHR({ baseUrl, clientId, clientSecret, scopes: ["chat", "act_as_user"] })
const priya = hr.asUser("priya@customer.com");
const r = await priya.chat.send({ message: "What is the WFH policy?" });
console.log(r.reply);

@peopleiq/recruiter

npm install @peopleiq/recruiter

import { PeopleIQRecruiter } from "@peopleiq/recruiter";
const piq = new PeopleIQRecruiter({ baseUrl: "http://localhost:4100", apiKey: process.env.PEOPLEIQ_API_KEY }); // SDK appends /v1
for await (const opening of piq.openings.listAll({ status: "Open" })) console.log(opening.code, opening.title);
await piq.applicants.create({ openingId: "opn_…", name: "Asha Rao", email: "asha@example.com" });

Exact method names: see each SDK's README and the product's OpenAPI document.

Partner API

Create an API client in the partner console (scopes, optional sandbox-only), then:

TOKEN=$(curl -s -X POST https://peopleiq.datacaffe.ai/api/platform/partner/v1/oauth/token -H "content-type: application/json" \
  -d '{"grant_type":"client_credentials","client_id":"pcl_…","client_secret":"pqps_…"}' | jq -r .access_token)

# create a sandbox customer with HR + Recruiter (replay-safe)
curl -X POST https://peopleiq.datacaffe.ai/api/platform/partner/v1/tenants -H "Authorization: Bearer $TOKEN" -H "Idempotency-Key: onboard-acme-1" \
  -H "content-type: application/json" \
  -d '{"name":"Acme Ltd","sandbox":true,"adminEmail":"it@acme.example","products":[{"product":"hr","plan":"pro","seats":25},{"product":"recruiter"}]}'

curl -X PATCH https://peopleiq.datacaffe.ai/api/platform/partner/v1/tenants/ten_… -H "Authorization: Bearer $TOKEN" -d '{"status":"suspended"}' -H "content-type: application/json"
curl https://peopleiq.datacaffe.ai/api/platform/partner/v1/statements/2026-11/export -H "Authorization: Bearer $TOKEN" -o statement.csv

Scopes: tenants:read, tenants:write, users:read, users:write, subscriptions:write, credentials:write, statements:read. Customers you don't manage are always 404. Full reference: openapi.json.

Branding API

White-label settings resolve per tenant: GET https://peopleiq.datacaffe.ai/api/platform/branding?tenant=<tenantId> (or ?partner=, ?domain=). The response carries displayName, logoUrl, primaryColor and cssVariables — overrides for the shared design tokens (--color-accent, …) that a product can set on :root. Unknown or unbranded tenants get { branded: false }.

Playground

Sign in as partner staff to try the Partner API here with your sandbox-only credentials.