Developer guide
Any tool can connect to HireKoi. You do not need to ask us first.
What works today
HireKoi is being built in phases. This page lists what works now, and nothing else.
- Apps: a person can let your app act for them, with the permissions they see and agree to.
- The API: one call so far, for the profile of the person who let your app in.
- Webhooks: we tell your server when something happens, signed so you know it came from us.
- Sandbox: every new app starts where only you can use it.
Jobs, applications and messages join the API as each one is built. Every new feature adds its API calls and its events.
Sandbox
- A new app is in sandbox. Only you, its maker, can let it in.
- So you build and test on your own account, and no one else's data is touched.
- Events sent to a sandbox app say that they are sandbox events.
- In sandbox a return address may be http://localhost, so you can build on your own machine.
- Going live needs a review by HireKoi staff. Reviews are not open yet.
Make an app
- Create a HireKoi account and turn on 2FA.
- Open Account, then Your apps, then Make an app.
- Give it a name and at least one return address.
- Save the app ID and the app secret. We show the secret only once.
Ask a person to let your app in
HireKoi uses OAuth 2.1 with PKCE. Every app uses PKCE, with or without a secret.
- Make a random verifier of 43 to 128 characters. Its challenge is the SHA-256 of the verifier, in base64url.
- Send the person to the Allow screen with these values:
/oauth/authorize ?response_type=code &client_id=YOUR_APP_ID &redirect_uri=https%3A%2F%2Fyour-app.example%2Fcallback &scope=profile%3Aread &state=A_RANDOM_VALUE &code_challenge=THE_CHALLENGE &code_challenge_method=S256 - The person sees what your app asks for and taps Allow or Cancel. If their last 2FA check is more than 10 minutes old, we check again first.
- We send the person back to your return address with a code, or with an error.
- Swap the code for tokens within 2 minutes. A code works once.
curl -X POST /oauth/token \ -d grant_type=authorization_code \ -d code=THE_CODE \ -d redirect_uri=https://your-app.example/callback \ -d client_id=YOUR_APP_ID \ -d client_secret=YOUR_APP_SECRET \ -d code_verifier=THE_VERIFIER{ "access_token": "hk_at_...", "token_type": "Bearer", "expires_in": 3600, "refresh_token": "hk_rt_...", "scope": "profile:read" } - An access token works for 1 hour. A refresh token works once, within 30 days, and gives you a new pair.
curl -X POST /oauth/token \ -d grant_type=refresh_token \ -d refresh_token=THE_REFRESH_TOKEN \ -d client_id=YOUR_APP_ID \ -d client_secret=YOUR_APP_SECRET
response_type- Always the word code.
client_id- Your app ID.
redirect_uri- One of your return addresses, exactly as you saved it.
scope- The permissions you ask for, with a space between two.
state- A random value of your own. We hand it back unchanged. Check it.
code_challenge- The challenge from step 1.
code_challenge_method- Always S256.
An app that runs on a server also sends its secret, as client_secret or with HTTP Basic sign-in.
If a code is used twice, we end the tokens it made. If a refresh token is used twice, we take it as stolen and end your app's access for that person.
The person must then let your app in again.
To give a token back, send it to the revoke address.
Errors follow the OAuth rules. Each answer names its error:
invalid_request
invalid_client
invalid_grant
unsupported_grant_typeThe addresses
/oauth/authorize- The Allow screen
/oauth/token- Tokens
/oauth/revoke- Give a token back
/.well-known/oauth-authorization-server- A list of these addresses for machines
Permissions
A permission is called a scope. Ask for the fewest your app needs.
profile:read- See a person's display name, role, country or region, and time zone.
jobs:read- See a person's jobs and how many people applied. Never who applied.
jobs:write- Make job drafts for a person and change them. Only the person can activate a job.
applications:read- See a person's own applications, their status and their next update date.
workers:search- Search workers for a person as their Find screen shows them, in words only. Never a photo, a clip, an ID or a contact detail.
applicants:summary- See how many people applied to each of a person's jobs and the status of the applications. Never names or answers.
profile:draft- Save private drafts of a worker's profile for them to review. Nothing changes on the profile until the worker uses a draft.
company:draft- Save private drafts of an employer's company profile for them to review. Nothing changes until the employer uses a draft.
More scopes arrive with each feature.
Call the API
Send the access token with each call:
curl /api/v1/profile \
-H "Authorization: Bearer hk_at_..."{
"profile": {
"id": "5b0d7c1e-3f52-4c0a-9d6e-2a1b8c4f7e90",
"role": "worker",
"display_name": "Amara O.",
"country": "NG",
"time_zone": "Africa/Lagos"
}
}All addresses start with /api/v1. Call the API from your server.
Calls your app can make
GET /api/v1/profile- See a person's display name, role, country or region, and time zone.
GET /api/v1/jobs- See a person's jobs and how many people applied. Never who applied.
POST /api/v1/jobs- Make job drafts for a person and change them. Only the person can activate a job.
GET /api/v1/jobs/{id}- See a person's jobs and how many people applied. Never who applied.
PATCH /api/v1/jobs/{id}- Make job drafts for a person and change them. Only the person can activate a job.
GET /api/v1/applications- See a person's own applications, their status and their next update date.
GET /api/v1/applications/{id}- See a person's own applications, their status and their next update date.
GET /api/v1/applications/{id}/history- See a person's own applications, their status and their next update date.
Every error has the same shape, with a code that never changes:
{
"error": {
"code": "insufficient_scope",
"message": "This app is not allowed to do that."
}
}The message is in the language of your request's Accept-Language header when HireKoi has that language, and in English when it does not. The Content-Language header names it. Act on the code, never on the message.
One app may make 300 calls a minute. Above that the answer is 429, with the seconds to wait.
Calls from a web page on another site are not open yet.
The full API description (OpenAPI 3.1)Webhooks
Add a webhook to your app, and we post each event to your address as it happens.
Events
ping- A test event. Sent when you ask for one.
authorization.granted- A person let your app in.
authorization.revoked- A person removed your app.
profile.updated- A person changed their display name or time zone.
account.deletion_requested- A person asked to delete their account. It is deleted for good after 30 days.
account.restored- A person took back the request to delete their account.
account.deleted- A person's account was deleted for good. Delete what you hold about it.
job.created- A person made a job draft.
job.updated- A person saved a change to a job.
job.status_changed- The status of a job changed, for example from draft to live.
job.intake_changed- A job started or stopped taking applications.
job.application_received- A person applied to a job. The event does not say who.
job.application_changed- An application to a job changed its status or its update date.
application.status_changed- The status of a person's own application changed.
application.update_date_changed- The employer set a new update date for a person's own application.
conversation.message_received- A worker wrote in the thread of an application to one of a person's jobs. The event holds ids, never the words.
Every event has this shape:
{
"id": "0e7a1b5c-8d42-4f6a-b3c9-7d5e2f1a6b48",
"type": "profile.updated",
"created_at": "2026-11-22T18:00:00.000Z",
"api_version": "v1",
"sandbox": true,
"data": {
"account_id": "5b0d7c1e-3f52-4c0a-9d6e-2a1b8c4f7e90",
"changed": [
"display_name"
]
}
}An event carries ids and short facts only. It never carries a name, an email or a phone number.
Each request carries three headers:
HireKoi-Event- The type of the event.
HireKoi-Delivery- The id of this delivery. It is the same on every try.
HireKoi-Signature- The time of signing and the signature.
Check the signature
- Read t and v1 from the HireKoi-Signature header.
- Compute HMAC-SHA256 of t, a full stop and the raw request body, with your signing secret as the key.
- Compare the result with v1 in constant time.
- Refuse the request if t is more than 5 minutes from your clock.
A check in Node.js:
import { createHmac, timingSafeEqual } from 'node:crypto';
export function isFromHireKoi(signingSecret, rawBody, header) {
const parts = Object.fromEntries(header.split(',').map((part) => part.trim().split('=')));
const expected = createHmac('sha256', signingSecret).update(parts.t + '.' + rawBody).digest('hex');
const given = String(parts.v1 ?? '');
const recent = Math.abs(Date.now() / 1000 - Number(parts.t)) <= 300;
return recent && given.length === expected.length && timingSafeEqual(Buffer.from(given), Buffer.from(expected));
}- Answer with any 2xx status within 10 seconds. Do slow work after you answer.
- If a try fails, we try again after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours and 24 hours. That is 7 tries.
- After 5 events in a row fail, we turn the webhook off. You turn it on again on its screen.
- An event can arrive more than once. Use its id to handle it once.
- We send only to public https addresses, and we do not follow redirects.
- One app can have 3 webhooks.
Rules
- Ask for the fewest permissions your app needs.
- Delete what you hold about a person when they remove your app or delete their account.
- Keep secrets and tokens on your server. Never put them in a web page or a public repository.
- Never ask a worker for money. Workers are free to join, apply, and get hired.
These four rules are the short form. The Developer terms say them in full.
Read the Developer terms