Developers
Connect your systems to Aikho.
Your system can call Aikho, Aikho can call your system, or both. This page is everything a developer needs: each call, each answer, and how to test before you go live.
What you can connect
A system connects to an Aikho workspace in one direction or both. Each needs one thing from the workspace's owner, in Settings.
| Direction | What it does | What the owner sets up |
|---|---|---|
| Aikho calls your system | Connect your own ATS. Aikho reads your jobs, so a recruiter can create a role from one. When a person finishes their interview on that role, Aikho puts them on the job with their CV, the report, the score and a note. | Settings › ATS › Your own ATS |
| Your system calls Aikho | The workspace API: your system creates roles from its own descriptions, publishes them and reads where they are. It can send its own applicants to a role: Aikho invites each one and your system reads their results. Webhooks tell your system when a person's CV review is done, their interview is assessed or they reach the shortlist. | Settings › API keys, and Settings › Webhooks |
What the owner does in Settings
- Settings › API keys. Only an owner opens this page. Under What will use this key? they name the key after your system, then press Create key. The key is shown once: copy it then, because Aikho keeps only a fingerprint of it. The key belongs to the workspace, not to the person who made it: it keeps working if they leave, and what it creates is shown as created by the key. Any owner can revoke it, and it stops working at once.
- Settings › ATS › Your own ATS. The owner picks Your own ATS and types a Name for your system (what their team calls it, 40 characters at most), the API address and the API key your system made for Aikho, then presses Connect. Aikho keeps the key sealed and never shows it again. It then runs two checks: Your API answers, and Aikho can read your jobs.
- Settings › Webhooks. The owner types the Address, ticks the moments under Send a message when, and presses Add webhook. The signing secret is shown once, then. A workspace has at most three webhooks.
If the ATS page does not offer Your own ATS, or Settings has no Webhooks, they are not available to your workspace yet: contact Aikho.
The workspace API
Your system creates roles in a workspace, publishes them and reads where each one is. It adds people to a live role, whom Aikho invites, and reads what each one's interview showed. Every call goes to the workspace's own address and carries a workspace API key.
Address and key
The API is at the workspace's address, the one your team opens Aikho at: https:/. Every path starts with /api/.
Send the key on every call as Authorization: Bearer <your API key>. A key works only on its own workspace's address and only under /api/; sent anywhere else, it is refused with 401 api_key_not_accepted_here. A missing, revoked or unknown key, or a key of another workspace, gets 401 invalid_api_key. Personal access tokens are not accepted.
A workspace API key starts with nova_key_. Copy it whole, that start included: Aikho refuses a key without it with 401 invalid_api_key.
A call
curl https://<workspace>.nova.aikho.ai/api/v1/roles/6f1d2c3e-8a47-4b6e-9d0a-2c5e7f4b1a90 \
-H "Authorization: Bearer $AIKHO_API_KEY"Limits
- Rate. A key can send a burst of 20 requests, then one more each second. Over that, Aikho answers
429 rate_limitedwith aRetry-Afterheader: the seconds to wait. When Aikho cannot count a request, it answers503 try_againwithRetry-After, and the request does not run. - Size. A JSON body is at most 1 MB, a multipart body at most 10 MB.
- Time. A create waits while Aikho writes the brief, up to three minutes. Past that it answers
502 unavailable, nothing is created, and you can send it again.
Errors
Every refusal has one shape. Branch on code; message is a sentence you can show a person. Two refusals say more inside error: brief_incomplete adds missing, and plan_limit_reached adds metric, limit, used and, for a monthly allowance, resets_at.
A refusal
{
"error": {
"code": "invalid_api_key",
"message": "The API key is not valid for this workspace."
}
}| Status | Code | When |
|---|---|---|
400 | invalid_request | The body is not one JSON object with the documented fields, or a multipart body or its file could not be read. |
400 | input_required | A create with neither input nor a file. |
400 | invalid_idempotency_key | The Idempotency-Key is longer than 255 characters. |
400 | name_required | An add with no name. |
400 | email_required | An add with no email. |
400 | invalid_email | The email is not an email address. |
400 | too_long | A name over 300 characters, or an email over 320. |
400 | external_id_too_long | An external_id over 128 characters. |
400 | invalid_limit | A list's limit that is not a whole number from 1 to 100. |
400 | invalid_cursor | A cursor this list did not give. Start again without one. |
401 | invalid_api_key | No key, or a key that is revoked, unknown or of another workspace. |
401 | api_key_not_accepted_here | A workspace API key sent to a path outside /api/. |
403 | journey_disabled | The workspace's plan does not include hiring. |
404 | not_found | No such role in this workspace, no such person on the role, or no such path on the API. |
409 | plan_limit_reached | A publish when the plan's Open roles are all taken. message says the limit and what to do; nothing started. Creating a draft takes nothing from the plan, so a create never gets it. |
409 | busy | The role is being changed right now. Retry in a minute. |
409 | request_in_progress | A request with this Idempotency-Key is still running. |
409 | role_not_live | An add to a role that is not live: a draft, a role still being prepared, or one paused or closed. |
409 | cannot_send | The workspace has no mailbox that can send the invitation. The owner connects one in Settings › Mailboxes. |
409 | messages_off | Messages to candidates are turned off for the role, so Aikho invites nobody to it. |
409 | sample_role | The role is a sample role, which invites nobody. |
409 | unsubscribed | The person asked this workspace not to contact them. Aikho does not invite them. |
409 | external_id_taken | Another person on the role has this external_id. |
409 | not_invitable | The person cannot be invited to this role, for a reason your team sees on the role in Aikho. |
409 | no_report | A report link for a person with no report yet: their CV has not been reviewed and they have not taken part in the interview. |
413 | request_too_large | A JSON body over 1 MB, or a multipart body over 10 MB. |
415 | unsupported_media_type | The body is neither application/ nor multipart/. |
415 | unsupported_file_type | The file is not a PDF, a DOCX or a plain-text file. |
422 | brief_incomplete | The description states no job title or no must-have skill. Nothing was created; missing lists what it lacks. |
422 | file_unreadable | The file could not be read as a document. |
422 | not_publishable | The draft is not ready to publish; message says why. |
422 | idempotency_key_reused | This Idempotency-Key was already used with a different request. |
429 | rate_limited | The key sent requests too fast. Wait for the seconds in Retry-After. |
500 | internal | Aikho could not record or read something. Try again. |
502 | unavailable | The brief could not be written, or the publish could not start, right now. Nothing was created; try again. |
503 | try_again | The request could not be counted against the key's limit, so it did not run. Wait for the seconds in Retry-After. |
Retrying safely
Send an Idempotency-Key header with a create, an add or a report link: any text of yours, at most 255 characters. For a day, the same key from the same API key on the same call gets the first answer back instead of running again. Three things can happen:
- The first request has finished. You get its answer again, as it was, with the header
Idempotent-Replayed: true. - The first request is still running.
409 request_in_progress. Retry when it has finished. - The key came with a different request.
422 idempotency_key_reused.
Only an answer the same request would get again is kept: a created role, a refused description (brief_incomplete), a person added or found, and a report link. A plan refusal, any other refusal, an outage or a crash leaves the key free, so a retry runs afresh. Publishing needs no key: it happens once by itself.
Roles
A role keeps one id for its whole life: the role_id create returns. Use it to publish the role and to read it, before and after it is published.
Create a role from a description
POST /api/
Send whatever your system holds about the role: an advertisement, a requisition, a short note. Aikho reads it with the workspace's company profile and playbook and writes a draft role. The draft appears in the workspace's roles, shown as created by the key, and your team can open and change it.
A job title and at least one must-have skill are required. When the description gives neither, nothing is created and the answer is 422 brief_incomplete with what is missing. A location, start date or salary the description does not give is set open (location_open, start_date_open and salary_range_open are true): the interview then asks each candidate for theirs instead of checking them against one. Creating a draft takes none of the plan's Open roles; publishing takes one.
Send application/ with the fields below, or multipart/ with the same fields and a file.
| Field | Type | Required | What it holds |
|---|---|---|---|
input | string | Yes, unless a file is sent | The description, as text. |
title | string | No | The role's title, when your system has one. It is kept as sent. |
file | file, multipart only | No | The description as a PDF, a DOCX or a TXT, at most 10 MB. Text sent beside it in input is read too. |
Request
curl https://<workspace>.nova.aikho.ai/api/v1/roles \
-H "Authorization: Bearer $AIKHO_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: req-2026-11-27-0042" \
-d '{"title": "Data analyst", "input": "Data analyst in Lyon, full time. Must have: SQL, Python. You will build the dashboards our sales team runs on."}'Answer, with the brief shortened to a few of its fields
HTTP/1.1 201 Created
Content-Type: application/json
{
"role_id": "6f1d2c3e-8a47-4b6e-9d0a-2c5e7f4b1a90",
"status": "draft",
"brief": {
"title": "Data analyst",
"must_have_skills": ["SQL", "Python"],
"key_responsibilities": ["Build the dashboards the sales team runs on"],
"location": "Lyon",
"location_open": false,
"employment_type": "Full time",
"start_date": null,
"start_date_open": true,
"salary_range": null,
"salary_range_open": true
},
"url": "https://<workspace>.nova.aikho.ai/journeys/hiring/drafts/6f1d2c3e-8a47-4b6e-9d0a-2c5e7f4b1a90"
}The same create with a file
curl https://<workspace>.nova.aikho.ai/api/v1/roles \
-H "Authorization: Bearer $AIKHO_API_KEY" \
-F "title=Data analyst" \
-F "file=@data-analyst.pdf"A description with no must-have skill
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
{
"error": {
"code": "brief_incomplete",
"message": "The description does not say enough to create a role. It is missing: at least one must-have skill.",
"missing": ["at least one must-have skill"]
}
}Its refusals: 400, 401, 403, 409 request_in_progress, 413, 415, 422 (brief_incomplete, file_unreadable, idempotency_key_reused), 429, 502 and 503.
Publish a draft
POST /api/
Publishes the draft as Publish does in Aikho: Aikho prepares what the interview looks for, the job post and its image, prepares the interview and opens the role. It starts no search for candidates: people come through the role's application link.
It answers 202 at once with the role. Follow its status with GET. Publishing happens once: sent again while it runs, or after, it answers the role as it is.
Its refusals: 404, 409 plan_limit_reached when the plan's Open roles are all taken, 409 busy, 422 not_publishable, 502, and the key's 401, 403, 429 and 503.
Request and answer
curl -X POST https://<workspace>.nova.aikho.ai/api/v1/roles/6f1d2c3e-8a47-4b6e-9d0a-2c5e7f4b1a90/publish \
-H "Authorization: Bearer $AIKHO_API_KEY"
HTTP/1.1 202 Accepted
Content-Type: application/json
{
"role_id": "6f1d2c3e-8a47-4b6e-9d0a-2c5e7f4b1a90",
"status": "publishing",
"brief": { "title": "Data analyst" },
"url": "https://<workspace>.nova.aikho.ai/journeys/hiring/drafts/6f1d2c3e-8a47-4b6e-9d0a-2c5e7f4b1a90"
}Read where a role is
GET /api/
The role's status, its brief, its page in Aikho for your team (url), and once it is live, the link candidates apply through (application_url).
| Status | What it means |
|---|---|
draft | Created and not published. |
publishing | The publish is running. |
preparing | Published; Aikho is preparing the interview. |
live | Open: application_url is where candidates apply. |
paused | Paused by your team in Aikho. |
closed | Closed by your team in Aikho. |
failed | The publish, or the interview's preparation, gave up; failure says why. A role whose publish failed is still a draft: publish it again to retry. |
Request and answer
curl https://<workspace>.nova.aikho.ai/api/v1/roles/6f1d2c3e-8a47-4b6e-9d0a-2c5e7f4b1a90 \
-H "Authorization: Bearer $AIKHO_API_KEY"
HTTP/1.1 200 OK
Content-Type: application/json
{
"role_id": "6f1d2c3e-8a47-4b6e-9d0a-2c5e7f4b1a90",
"status": "live",
"brief": { "title": "Data analyst" },
"url": "https://<workspace>.nova.aikho.ai/journeys/hiring/live/2b7e4f1a-9c3d-5e8b-a6f0-1d2c3b4a5e6f",
"application_url": "https://<workspace>.nova.aikho.ai/j/k7Qm2xVb9pLs?src=api"
}People
The people on a role: those your system adds, and those who came another way, invited by your team, applying through the role's link, or found by a search and invited. A person keeps one id on a role, from their first contact to the end; it is the candidate.id webhooks send. A simulated candidate, the invented person your team tries a role with (Simulate a candidate), is never listed.
One person per role. Send an address the role already has, whoever added that person and however they came, and Aikho answers 200 with the person it has: nobody is added and nobody is invited again. The same address on another role is another person.
Reading creates nothing: no person, no invitation, no report link. A person's answer never says whether to hire them: no stage, no status, no recommendation. It says what their run reached and what it measured.
Add a person to a role
POST /api/
Aikho invites the person to the live role exactly as your team's invitation by email address does: the same email, from the workspace's mailbox, with the same reminders. The person appears on the role's Sourcing tab under Added by you. The invitation is queued and goes within minutes; invited_at is set once it went.
No invited_at means the invitation has not gone yet. Besides the few minutes after the add, it waits while the role is paused or while the plan's candidate allowance is used up. Each wait ends by itself: the invitation goes when the role is live again, or when the plan has room again. A person your system adds is invited even when another of the workspace's roles contacted them in the last 30 days. Two cases end without an invitation: a role paused for more than 14 days before the person was contacted, and a mailbox that stopped sending. Your team then sees the invitation as failed on the role's Sourcing tab and can retry it. The person's invitation says which case holds: see Where an invitation stands, below.
It answers 201 with the person. Send an Idempotency-Key to retry safely.
| Field | Type | Required | What it holds |
|---|---|---|---|
name | string | Yes | The person's name, as the invitation greets them. |
email | string | Yes | The address the invitation goes to. |
external_id | string | No | Your own id for the person, at most 128 characters, unique on the role. Every answer and every webhook about the person carries it. |
Request
curl https://<workspace>.nova.aikho.ai/api/v1/roles/6f1d2c3e-8a47-4b6e-9d0a-2c5e7f4b1a90/candidates \
-H "Authorization: Bearer $AIKHO_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: applicant-5521" \
-d '{"name": "Maya Okafor", "email": "maya.okafor@example.com", "external_id": "app-5521"}'Answer
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70",
"name": "Maya Okafor",
"email": "maya.okafor@example.com",
"external_id": "app-5521",
"added_at": "2026-11-27T09:00:12Z",
"reached": [],
"invitation": {"state": "queued"}
}Its refusals: 400 (invalid_request, name_required, email_required, invalid_email, too_long, external_id_too_long), 404, 409 (role_not_live, cannot_send, messages_off, sample_role, unsubscribed, external_id_taken, not_invitable, busy, request_in_progress), 413, 422 idempotency_key_reused, and the key's 401, 403, 429 and 503.
Where an invitation stands
Every answer about a person carries invitation when an invitation to them was asked for, by your system, your team or a search: state, then reason when it waits or ended without going, and until when Aikho knows when a wait ends. It is read from what the role's Sourcing tab shows. It describes Aikho's sending, never the person. A person who applied through the role's link with no invitation has none.
| State | What it means |
|---|---|
queued | Not gone yet; it goes by itself within minutes. |
waiting | Not gone yet; it waits for reason and goes by itself when the reason ends. |
sent | The invitation went; invited_at says when. |
not_sent | It ended without going; reason says why. |
| Reason | What it means |
|---|---|
contacted_recently | Waits: another role of the workspace contacted the person in the last 30 days; it goes when the 30 days end. A person added by hand or through the API never waits for it. |
conversation_muted | Waits: the person's conversation is muted; it goes when it is unmuted. |
email_lookups_used_up | Waits: the month's paid email lookups are used up; it goes when the workspace has lookups again. |
finding_email | Waits: Aikho is looking up the person's email address. |
linkedin_capacity | Waits: the connected LinkedIn account has no capacity left for now; it goes when capacity returns. |
linkedin_request_pending | Waits: a LinkedIn connection request is out; the invitation goes when the person accepts it. |
mailbox_needs_attention | Waits: the workspace's mailbox needs attention; it goes once it sends again. |
messages_off | Waits: messages to candidates are turned off for the role; it goes when they are turned on. |
no_mailbox | Waits: the workspace has no mailbox to send from; it goes once one is connected. |
plan_applications_used_up | Waits: the plan's applications for this period are used up; it goes when the period starts over or the plan has room. |
plan_candidates_used_up | Waits: the plan's candidate allowance is used up; it goes when the plan has room again. |
role_paused | Waits: the role is paused; it goes when the role is live again, unless the pause lasts more than 14 days. |
applied | Not sent: the person applied before it went. |
ats_applicant | Not sent: the person is an applicant of the workspace's ATS, invited from there. |
before_link | Not sent: the person applied in the ATS before the role was linked; your team invites them from Aikho if it wants to. |
closed_in_ats | Not sent: the person's application is closed in the ATS. |
could_not_send | Not sent: it could not be sent; your team can retry it. |
erased | Not sent: the contact was erased before it went. |
inmail_used_up | Not sent: the LinkedIn InMail allowance was used up; your team can retry it. |
invited_by_ats | Not sent: the person was invited through the workspace's ATS instead. |
linkedin_blocked | Not sent: LinkedIn does not allow contacting the person. |
linkedin_not_found | Not sent: LinkedIn has no such profile. |
linkedin_self | Not sent: the profile is the connected LinkedIn account's own. |
linkedin_stopped | Not sent: the LinkedIn invitation stopped before it reached the person. |
linkedin_unconfirmed | Not sent: LinkedIn never confirmed it went. |
mailbox_stopped_sending | Not sent: no mailbox of the workspace could send it; your team can retry it. |
no_email | Not sent: no email address is known or was found for the person. |
no_email_lookups | Not sent: the plan had no paid email lookup to find the address; your team can retry it. |
no_linkedin_account | Not sent: no LinkedIn account could send it; your team can retry it. |
no_route | Not sent: no way to reach the person was open. |
other | Not sent, for another reason; your team sees it on the role in Aikho. |
past_reviewing_in_ats | Not sent: the person's application was past Reviewing in the ATS when Aikho read it, so Aikho sends its first email only when your team asks. |
role_changed | Not sent: the role was paused or its messages turned off before it went; your team can retry it. |
role_closed | Not sent: the role closed before it went. |
role_paused_too_long | Not sent: the role stayed paused for more than 14 days before the person was contacted; your team can retry it. |
sample_role | Not sent: the role is a sample role, which invites nobody. |
sourced_in_ats | Not sent: the person is in the ATS's Sourced stage and never applied. |
stopped_by_team | Not sent: your team stopped it on the role in Aikho. |
unavailable | Not sent: the person cannot be contacted. |
undeliverable | Not sent: the person's address cannot receive mail. |
unsubscribed | Not sent: the person asked the workspace not to contact them. |
withdrawn_in_ats | Not sent: the person's application was withdrawn or closed in the ATS before it went. |
An invitation waiting for the plan
{
"id": "d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70",
"name": "Maya Okafor",
"email": "maya.okafor@example.com",
"external_id": "app-5521",
"added_at": "2026-11-27T09:00:12Z",
"reached": [],
"invitation": {"state": "waiting", "reason": "plan_applications_used_up", "until": "2026-12-01T00:00:00Z"}
}List a role's people
GET /api/
Newest first, a page at a time. limit is 1 to 100, 25 by default. When more follow, the answer carries next_cursor: send it back as cursor for the next page. A page has no offset, so a person added while you read does not shift the pages. external_id keeps only the person who holds it.
Its refusals: 400 (invalid_limit, invalid_cursor), 404, and the key's 401, 403, 429 and 503.
Request and answer
curl "https://<workspace>.nova.aikho.ai/api/v1/roles/6f1d2c3e-8a47-4b6e-9d0a-2c5e7f4b1a90/candidates?limit=2" \
-H "Authorization: Bearer $AIKHO_API_KEY"
HTTP/1.1 200 OK
Content-Type: application/json
{
"items": [
{"id": "8a1b2c3d-4e5f-4a6b-9c7d-0e1f2a3b4c5d", "name": "Tom Brennan", "email": "tom.brennan@example.com",
"added_at": "2026-11-27T11:40:03Z", "reached": [],
"invitation": {"state": "not_sent", "reason": "mailbox_stopped_sending"}},
{"id": "d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70", "name": "Maya Okafor", "email": "maya.okafor@example.com",
"external_id": "app-5521", "added_at": "2026-11-27T09:00:12Z", "invited_at": "2026-11-27T09:01:30Z",
"reached": ["candidate.screened"], "result": {"role_title": "Data analyst", "cv_reviewed": true, "…": "…"},
"invitation": {"state": "sent"}}
],
"next_cursor": "eyJhdCI6IjIwMjYtMTEtMjdUMDk6MDA6MTJaIn0"
}Read one person
GET /api/
The person as the add answered, with what their run reached since.
| Field | What it says |
|---|---|
id, name, email, external_id | Who the person is on this role; external_id only when your system gave one. |
added_at | When the role first had the person. |
invited_at | When Aikho's invitation went. Absent while it waits, and for a person who came without one. |
invitation | Where Aikho's invitation to the person stands: see Where an invitation stands. |
reached | The moments the person's run reached, in order, by the names webhooks send: candidate.screened, candidate.assessed, candidate.shortlisted. Empty until they start. |
result | What the run measured, field for field the result of a webhook. Absent until the person starts. |
Request and answer
curl https://<workspace>.nova.aikho.ai/api/v1/roles/6f1d2c3e-8a47-4b6e-9d0a-2c5e7f4b1a90/candidates/d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70 \
-H "Authorization: Bearer $AIKHO_API_KEY"
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70",
"name": "Maya Okafor",
"email": "maya.okafor@example.com",
"external_id": "app-5521",
"added_at": "2026-11-27T09:00:12Z",
"invited_at": "2026-11-27T09:01:30Z",
"reached": ["candidate.screened", "candidate.assessed"],
"result": {
"role_title": "Data analyst",
"cv_reviewed": true,
"cv_review_unavailable": false,
"cv_criteria_shown": 4,
"cv_criteria": 6,
"screened_at": "2026-11-27T09:29:58Z",
"interviewed": true,
"assessment_unavailable": false,
"assessed_at": "2026-11-28T14:04:51Z",
"scored": true,
"score": 74,
"coverage": 82,
"strengths": ["SQL", "Explaining results"],
"gaps": ["Python"]
},
"invitation": {"state": "sent"}
}Get a link to a person's report
POST /api/
Makes a new link to the person's report, which opens without an Aikho sign-in, and answers 201 with report_url. Each call makes another link; Turn off report link on the person's page in Aikho turns them all off. A GET never makes one.
Its refusals: 404, 409 no_report while the person has no report (no CV reviewed, no interview taken part in), 409 request_in_progress, 422 idempotency_key_reused, and the key's 401, 403, 429 and 503.
Request and answer
curl -X POST https://<workspace>.nova.aikho.ai/api/v1/roles/6f1d2c3e-8a47-4b6e-9d0a-2c5e7f4b1a90/candidates/d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70/report_link \
-H "Authorization: Bearer $AIKHO_API_KEY"
HTTP/1.1 201 Created
Content-Type: application/json
{"report_url": "https://<workspace>.nova.aikho.ai/r/9f2c4e6a8b0d1f3e5a7c9e1b3d5f7a9c"}Joining the API and the webhooks
A webhook's candidate.id is the person's id here, and its role.id the role_id. When your system gave an external_id, the webhook's candidate carries it too, so you can file the message against your own record without a lookup. Webhooks tell you when to read; a read tells you where the person stands now.
The OpenAPI description
Each workspace serves its own description, in OpenAPI 3.1, at https:/, with no key. It is built from the same table that serves the routes, so it lists exactly what the workspace serves, with every field of the brief and of a person. Settings › API keys links it as Read the API description (OpenAPI).
Connect your own ATS
When your team hires in a system you built, Aikho can call its API. Your API answers twelve calls. With them Aikho reads your jobs, so a recruiter can create a role from one, and puts each person who finishes an interview on that role on the job, with their CV, the report, the score and one note.
The twelve calls
Paths sit directly under the address the owner types: with https:/, Aikho calls https:/.
| Call | When Aikho makes it |
|---|---|
GET / | When the owner connects, at each check, and every 15 minutes while the connection needs attention. |
GET / | When a recruiter opens the list of your jobs in Aikho, and at the second check. |
GET / | When a recruiter creates a role from one of your jobs. |
POST / | First, when a person finishes their interview on a linked role. |
GET / | Before adding a person to the job, and again before writing their results. |
POST / | When nobody holds the person's email address. |
POST / | When the person has no application to the job. |
GET / | Before adding the CV to an application Aikho made, and before adding the report. |
POST / | The CV, then the report, each by a download link. |
PUT / | When the interview measured enough for a score. |
GET / | Before the note, to find out whether it is already there. |
POST / | Last: one note with the assessment. |
Rules for your API
- Address. An https address that answers from the internet. Aikho never calls a private or local address and follows no redirect: a redirect counts as no answer.
- Key. Your system makes one key for Aikho. Aikho sends it on every call as
Authorization: Bearer <your key for Aikho>. - JSON. Bodies are JSON in UTF-8, with
Content-Type: application/. Aikho ignores fields it does not know. Do not escapejson /in strings. - Lists. A list is
{"data": [...], "has_more": false}. OnlyGET /pages, withjobs limitandoffset; every other list answers everything at once. - Dates and ids. Dates in RFC 3339, such as
2026-11-27T09:30:00Z. Ids are strings that never change for an object. - Time. Aikho waits 10 seconds for an answer, and 30 seconds for a call under
/documents, where your system may fetch the file before it answers. An answer weighs at most 8 MB. - Refusals. Answer a refusal as
{"error": {"code": "…", "message": "…"}}, withexisting_idon a409. A404without that body reads as a wrong address, not a missing object, and is tried again. - Codes. Aikho acts on the status. It reads
codein four answers only:404 client_not_found,404 job_not_foundonGET /,jobs/ {job_id} 409 candidate_existsand409 application_exists. Every other code, and everymessage, is for your own logs:invalid_keyon a401andinvalid_requeston a400are good choices. - Outages. Answer
429or503when you cannot take a call: Aikho tries again later. To pause Aikho on purpose, for a maintenance for example, answer403: every write waits, and goes by itself once your API lets Aikho in again. Never answer401for an outage: Settings then says your API refused Aikho's key.
A refusal from your API
HTTP/1.1 404 Not Found
Content-Type: application/json
{"error": {"code": "job_not_found", "message": "Job not found"}}The objects
Job. In a list, a job needs at least id, name, status, created_at and updated_at; read alone, the rest.
| Field | Type | Rule |
|---|---|---|
id, name | string | Required. The name is the job's title. |
status | string | Required. OPEN or CLOSED. |
description | string | The whole text, without HTML. Line breaks and - lists are kept. |
skills, locations, questions | list of strings | The skills it asks for, one line per place, the questions it asks applicants. |
remote | boolean | Remote work is possible. |
employment_type | string | FULL_TIME, PART_TIME, CONTRACTOR, INTERN, CONSULTANT, VOLUNTEER, CASUAL, SEASONAL, FREELANCE or TEMPORARY. |
compensation | list of objects | type (SALARY, BONUS, EQUITY, STOCK_OPTIONS, OTHER), min, max, currency, frequency (YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, ONE_TIME). |
minimum_degree, minimum_experience_years | string, number | The degree and the years of experience the job asks for. |
public_url | string | The job's public page. |
created_at, updated_at | date | Required. |
Candidate: id and name, required; emails, a list; profile_url, their page in your system, which a recruiter opens from Aikho; source.
Application: id, candidate_id, job_id, status and source, required, with created_at and updated_at. A new application is IN_PROGRESS. Aikho reads status for one thing only: whether the application is closed. REJECTED, DECLINED, WITHDRAWN, HIRED and ACCEPTED close it, in capitals or not, and Aikho adds nothing to a closed application: no report, no score, no note. Every other status is open. Aikho's own applications carry "source": "aikho".
Document: id, application_id, name, kept exactly as sent, type (RESUME for a CV, REPORT for Aikho's report) and updated_at. Note: id, application_id, body, kept exactly, up to 20,000 characters, and created_at.
Connecting, and the two checks
Before it keeps anything, Aikho calls GET / once with the key. Answer 200 with {"active": true}. When that call fails, the owner's form says what to fix: the address is not https; it is private or local; nothing at it answered (no answer, or not this answer); or your API refused the key (401, 403 or {"active": false}).
Aikho then runs its two checks, Your API answers (GET /) and Aikho can read your jobs (GET /); Check again reruns them. While the connection needs attention, Aikho checks again every 15 minutes, and it works again at the first check that passes.
Is your API on for Aikho
GET /status
Answer {"active": false}, or 403, while your system has switched Aikho off. Aikho reads active only here: when the owner connects, at Check now, and every 15 minutes while the connection needs attention. It stops none of the other calls by itself: answer them 403 too. The first 403 makes the connection need attention and every write wait; once this call answers {"active": true} again, Aikho sends what waited, with no one pressing anything. See What Aikho does on each answer.
Request and answer
GET https://ats.example.com/api/status
Authorization: Bearer $KEY_FOR_AIKHO
HTTP/1.1 200 OK
Content-Type: application/json
{"active": true}Creating a role from a job
In Aikho's roles, a recruiter opens From and your system's name: the list of your jobs, a page at a time, with a search. Create role reads the whole job and writes a draft from it, as the workspace API does with a description, and links the role to the job. Aikho reads the job once: a later change in your system does not change the role.
A job without a readable title or must-have skill is refused with what it lacks. A role created from a job publishes once its brief has at least three must-have skills and says what the work involves; when the job says less, the recruiter completes the draft in Aikho.
A job has no start date field. Aikho takes a start date only from the job's words; when they give none, the role's start date is open, and the interview asks each candidate when they can start.
List your jobs
GET /jobs
limit from 1 to 100 (25 when absent; Aikho asks for at most 100), offset from 0, and q, words to find in the title, ignoring case. Sort OPEN jobs first, then the newest created_at first, then by id, and set has_more when more follow. Aikho shows them in your order.
Request and answer
GET https://ats.example.com/api/jobs?limit=25&offset=0&q=analyst
{
"data": [
{"id": "job_7712", "name": "Data analyst", "status": "OPEN",
"created_at": "2026-11-20T08:00:00Z", "updated_at": "2026-11-24T10:15:00Z"}
],
"has_more": false
}Read one job
GET /jobs/
The whole job. A deleted job answers 404 with job_not_found.
Request and answer
GET https://ats.example.com/api/jobs/job_7712
{
"id": "job_7712",
"name": "Data analyst",
"status": "OPEN",
"description": "You build the dashboards our sales team runs on.\n\nWhat you bring:\n- SQL\n- Python\n- Three years of analytics",
"skills": ["SQL", "Python"],
"locations": ["Lyon, France"],
"remote": false,
"employment_type": "FULL_TIME",
"compensation": [{"type": "SALARY", "min": 45000, "max": 55000, "currency": "EUR", "frequency": "YEAR"}],
"public_url": "https://careers.example.com/jobs/7712",
"created_at": "2026-11-20T08:00:00Z",
"updated_at": "2026-11-24T10:15:00Z"
}Adding a person at the end of their interview
When a person finishes their interview on a role linked to one of your jobs, whatever its outcome, Aikho puts them on the job. Nobody else reaches your system: not a person who was only invited, not one a recruiter shortlists without an interview, and never an address that asked the workspace for no more email.
Aikho reads before it writes, so a try after a lost answer finds what the earlier try made:
POST /with the person's email address: every candidate holding it, ignoring case.candidates/ search - Aikho compares the name it holds with yours, ignoring case, accents and extra spaces. Several people with the address, or one person under another name: Aikho writes nothing, and the person's page in Aikho says why. The recruiter puts the record right in your system, then presses Retry.
- Nobody found:
POST /. The name's last word iscandidates last_nameand the restfirst_name; a one-word name has-as itslast_name. GET /: an application to the job is used as it is, and a closed one gets nothing. On an application Aikho made that holds nocandidates/ {candidate_id}/ applications? job_id=… RESUME, Aikho adds the CV.- No application:
POST /. Place it at the first step of your pipeline, silently: no email to the candidate, no automation.applications - The CV:
POST /withapplications/ {application_id}/ documents "type": "RESUME"and a download link. A CV your system refuses does not stop the rest: the person is added without it.
A 409 with candidate_exists or application_exists and existing_id goes on with the object that exists.
Find a person by email
POST /candidates/
Request and answer
POST https://ats.example.com/api/candidates/search
{"email": "maya.okafor@example.com"}
{"data": [], "has_more": false}Create a person
POST /candidates
Aikho sends all four fields every time, none of them empty: first_name, last_name, email, in lower case, and "source": "aikho". Your API may require all four. A one-word name such as Maya comes as first_name Maya and last_name -. Hold it as Maya or as Maya -: Aikho's name check accepts both.
Answer 409 candidate_exists only when a candidate already holds this email address, ignoring case: the candidate POST / answers for it, with its id as existing_id. Aikho takes that candidate as the person without comparing names, and puts them on the job. If your system makes a second candidate with the same address instead, the next search finds two people, and Aikho then writes nothing for that address.
Request, answer, and the answer to a repeat
POST https://ats.example.com/api/candidates
{"first_name": "Maya", "last_name": "Okafor", "email": "maya.okafor@example.com", "source": "aikho"}
HTTP/1.1 201 Created
{"id": "cand_3402", "name": "Maya Okafor", "emails": ["maya.okafor@example.com"],
"profile_url": "https://ats.example.com/candidates/3402"}
HTTP/1.1 409 Conflict
{"error": {"code": "candidate_exists", "message": "Candidate already exists", "existing_id": "cand_3402"}}Read a person's applications to a job
GET /candidates/
job_id is required. List the person's applications to that job, newest first.
Put a person on a job
POST /applications
Accept a CLOSED job too.
Answer 409 application_exists when the candidate already has an application to this job, whatever its status, with its id as existing_id. Aikho finds it again in GET / and goes on with it, or writes nothing when it is closed. An existing_id that list does not show fails the person's send.
The read, the write and its answer
GET https://ats.example.com/api/candidates/cand_3402/applications?job_id=job_7712
{"data": [], "has_more": false}
POST https://ats.example.com/api/applications
{"candidate_id": "cand_3402", "job_id": "job_7712", "source": "aikho"}
HTTP/1.1 201 Created
{"id": "app_3403", "candidate_id": "cand_3402", "job_id": "job_7712",
"status": "IN_PROGRESS", "source": "aikho",
"created_at": "2026-11-27T09:31:02Z", "updated_at": "2026-11-27T09:31:02Z"}Add a document
POST /applications/
type is RESUME or REPORT, name the file's name, download_url the file's link. Keep the name exactly as sent.
Request and answer
POST https://ats.example.com/api/applications/app_3403/documents
{"type": "RESUME", "name": "Maya Okafor CV.pdf",
"download_url": "https://<workspace>.nova.aikho.ai/dl/9b2f6c0e4d7a18b35e6f0a2c4d8e1b7f93a5c2e6d0f4b8a1c7e3d9f5b2a6c4e8"}
HTTP/1.1 201 Created
{"id": "doc_3404", "application_id": "app_3403", "name": "Maya Okafor CV.pdf",
"type": "RESUME", "updated_at": "2026-11-27T09:31:03Z"}Writing the results
Right after the person is on the job, Aikho writes their interview's assessment, in this order:
- It reads the application's status again. Closed (
REJECTED,DECLINED,WITHDRAWN,HIREDorACCEPTED) or gone from the list: it writes nothing. - The report: it reads the application's documents and, when none has the report's name, posts it with
"type": "REPORT", a download link and the report file's name, which names the person in the workspace's language:aikho assessment - Maya Okafor.pdf, orÉvaluation aikho - Maya Okafor.pdfin French. Keep the name exactly as sent: it is how a retry finds the report already there. A report your API refuses (400,413,415,422) is left out: the score and the note still follow, and the note carries the report's link. - The score:
PUT /withapplications/ {application_id}/ score scoreandcoverage, whole numbers from 0 to 100, only when the interview measured enough for a score. A second call replaces the first. - The note, last: it reads the application's notes and stops when one already carries this result's reference; otherwise it posts one note. The note is the only write that adds something each time it is sent, so it comes last.
Write the score
PUT /applications/
Request and answer
PUT https://ats.example.com/api/applications/app_3403/score
{"score": 74, "coverage": 82}
HTTP/1.1 200 OK
{"application_id": "app_3403", "score": 74, "coverage": 82}Write the note
POST /applications/
Show the note to your team, never to the candidate, as Aikho wrote it: keep its line breaks, read no HTML in it, and make its https links clickable. It carries a link to the person's report, which opens without an Aikho sign-in. Its words change from one person to the next: do not parse them.
Accept these writes on any application that exists, closed or not: an application can close between Aikho's read and its write.
Aikho's note is never empty: its last line is its reference. It is at most ten short lines, far below the 20,000 characters your API keeps.
The read, the write and its answer
GET https://ats.example.com/api/applications/app_3403/notes
{"data": [], "has_more": false}
POST https://ats.example.com/api/applications/app_3403/notes
{"body": "…"}
HTTP/1.1 201 Created
{"id": "note_3405", "application_id": "app_3403", "body": "…", "created_at": "2026-11-27T09:31:05Z"}Download links
Aikho gives your system the CV and the report as a download_url on the workspace's own address: https:/. Fetch it with a plain GET and no key. It works for 24 hours from the moment Aikho sends it, serves the file itself with no redirect, and is never cached. Each try gets a fresh link. Aikho links files of at most 25,000,000 bytes; a larger file is not sent, and the note still carries the report's link.
Fetch the file before you answer: Aikho waits 30 seconds. When the fetch fails, answer 503: Aikho tries again with a fresh link, five tries in all, and writes nothing after the document meanwhile. Refuse with a 4xx other than 401, 403 and 404 only a file your system will never take: a refused CV is left out and the person is still added; a refused report is left out and the score and the note are still written, the note carrying the report's link. Your team sees in Aikho that your system refused the report file. Never answer 201 for a file you could not fetch: Aikho then counts the document as kept and never sends it again.
What Aikho does on each answer
| Your API answers | What Aikho does |
|---|---|
2xx | Goes on to the next call. |
401 | The connection needs attention: Settings › ATS says your API refused Aikho's key. Every write waits. Aikho checks again every 15 minutes and goes on at the first check that passes; the owner can also Reconnect with a new key. |
404 with client_not_found | The connection needs attention: your API answered that Aikho is not known to it. |
403 | The connection needs attention: Settings › ATS says your API answered that Aikho is not allowed. Every write waits, the one answered 403 included. Aikho checks again every 15 minutes (GET /) and, at the first check that passes, sends what waited by itself. Answer 403 only to pause Aikho altogether; to refuse one write you will never take, answer another 4xx, such as 422. |
404 with job_not_found, candidate_not_found or application_not_found | On a read while writing results, the application counts as gone: Aikho writes nothing more on it. Anywhere else, the call is refused. |
409 with existing_id | Aikho takes the object that exists and goes on. |
400, 413, 415, 422 or any other refusal | The call is refused. For the CV, the person is added without it; for the report, the score and the note are still written; anywhere else, nothing after it is written. |
429, 5xx, a redirect, no answer in time, a 404 with no error body, an answer over 8 MB | No answer: Aikho tries again, five tries in all, with waits that grow between them, then the write fails and Retry sends it again. The connection's state does not change. |
Each failed try waits longer before the next: by the queue's retry rule (the try's number to the fourth power, in seconds, give or take a tenth), about 1 second, 16 seconds, 1 minute 21 and 4 minutes 16, so the fifth try comes about six minutes after the first.
What your team sees: the person's page in Aikho has a block named after your system. It says when the person was sent, or why not yet, or why it failed, with Retry. Retry sends the same writes again.
What Aikho never does
- Move an application to another step, reject anyone or send a decline.
- Email your candidates through your system.
- Create, change or close a job.
- Read the applicants in your system. The contract covers your jobs and the people who finish an interview on a linked role. To send your applicants to Aikho, your system adds them through the workspace API: see People, in The workspace API.
Webhooks
A webhook is an address of your system that Aikho calls when something happens to a person on one of your roles. It works for every role, with or without an ATS. A simulated candidate, the invented person your team tries a role with, sends nothing.
Events
Aikho sends each moment once to each address.
| Event | When Aikho sends it | Its name in Settings |
|---|---|---|
candidate.screened | The person's CV review is done. | CV review done |
candidate.assessed | The person's interview is assessed. | Interview assessed |
candidate.shortlisted | The person is in your pipeline, from the shortlist on, and not rejected. | Shortlisted |
webhook.test | The owner pressed Send a test event. No role, no person. | Test event |
The body
A JSON object, written when the moment happens and sent unchanged on every try: id, type, created_at, then role (id, the role_id the workspace API knows, and title), candidate (id, name, email, and external_id when your system gave one through the workspace API), result and report_url. The test event has only id, type and created_at. It never says whether to hire anyone: no stage, no status, no recommendation.
| Field of result | What it says |
|---|---|
role_title | The role's title. |
cv_reviewed, cv_review_unavailable | The CV review produced an assessment of the CV; it never answered. |
cv_criteria_shown, cv_criteria | How many of the role's requirements the CV shows, out of how many; cv_criteria is 0 when the role has none. |
screened_at | When the CV review was written. |
interviewed, assessment_unavailable | The person took part in the interview; its assessment could not be made. |
assessed_at | When the interview's assessment was written. |
scored, score | The interview measured enough for a score, and the overall score from 0 to 100. |
coverage | How much of the role's skills the evidence covers, from 0 to 100, scored or not. |
strengths, gaps | Up to two skills each, by the role's names for them: the highest scored at or above the bar, and the lowest below it. |
candidate.id is Aikho's id for this person on this role, the same from their first contact to the end, and the id the workspace API's People calls answer with. report_url opens the person's report without an Aikho sign-in, whether or not an ATS is connected: it comes with candidate.screened when the CV review produced an assessment, and with candidate.assessed when the person took part in the interview. The report offers a PDF only when Aikho also filed it in an ATS. role.id is empty for an older role that has no draft behind it. A date is RFC 3339.
candidate.screened
{
"id": "0b6f6c1e-4f3a-4d9e-8a52-5c1d2e3f4a5b",
"type": "candidate.screened",
"created_at": "2026-11-27T09:30:00Z",
"role": {"id": "6f1d2c3e-8a47-4b6e-9d0a-2c5e7f4b1a90", "title": "Data analyst"},
"candidate": {"id": "d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70", "name": "Maya Okafor", "email": "maya.okafor@example.com", "external_id": "app-5521"},
"result": {
"role_title": "Data analyst",
"cv_reviewed": true,
"cv_review_unavailable": false,
"cv_criteria_shown": 4,
"cv_criteria": 6,
"screened_at": "2026-11-27T09:29:58Z",
"interviewed": false,
"assessment_unavailable": false,
"scored": false,
"score": 0,
"coverage": 0
},
"report_url": "https://<workspace>.nova.aikho.ai/r/3c8e1f5a9b2d6e0c4a7f1b3d5e9c2a6f"
}candidate.assessed
{
"id": "5a9d2c7e-1b4f-4e8a-9c3d-6f0e2a4b8c1d",
"type": "candidate.assessed",
"created_at": "2026-11-28T14:05:00Z",
"role": {"id": "6f1d2c3e-8a47-4b6e-9d0a-2c5e7f4b1a90", "title": "Data analyst"},
"candidate": {"id": "d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70", "name": "Maya Okafor", "email": "maya.okafor@example.com", "external_id": "app-5521"},
"result": {
"role_title": "Data analyst",
"cv_reviewed": true,
"cv_review_unavailable": false,
"cv_criteria_shown": 4,
"cv_criteria": 6,
"screened_at": "2026-11-27T09:29:58Z",
"interviewed": true,
"assessment_unavailable": false,
"assessed_at": "2026-11-28T14:04:51Z",
"scored": true,
"score": 74,
"coverage": 82,
"strengths": ["SQL", "Explaining results"],
"gaps": ["Python"]
},
"report_url": "https://<workspace>.nova.aikho.ai/r/3c8e1f5a9b2d6e0c4a7f1b3d5e9c2a6f"
}candidate.shortlisted
{
"id": "e2c4a6b8-0d1f-4a3c-8e5b-7d9f1a3c5e7b",
"type": "candidate.shortlisted",
"created_at": "2026-11-29T10:12:00Z",
"role": {"id": "6f1d2c3e-8a47-4b6e-9d0a-2c5e7f4b1a90", "title": "Data analyst"},
"candidate": {"id": "d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70", "name": "Maya Okafor", "email": "maya.okafor@example.com", "external_id": "app-5521"},
"result": {
"role_title": "Data analyst",
"cv_reviewed": true,
"cv_review_unavailable": false,
"cv_criteria_shown": 4,
"cv_criteria": 6,
"screened_at": "2026-11-27T09:29:58Z",
"interviewed": true,
"assessment_unavailable": false,
"assessed_at": "2026-11-28T14:04:51Z",
"scored": true,
"score": 74,
"coverage": 82,
"strengths": ["SQL", "Explaining results"],
"gaps": ["Python"]
}
}Headers
Each message is a POST with these headers.
| Header | Value |
|---|---|
Content-Type | application/ |
User-Agent | aikho-webhooks/ |
webhook-id | The message's id, the same as the body's id. It is the same on every try: a message you see twice is one message. |
webhook-timestamp | When this try was signed, in Unix seconds. |
webhook-signature | v1, followed by the signature in base64. |
Checking the signature
Aikho signs in the Standard Webhooks scheme. Check every message before you act on it:
- Take the signing secret Settings showed. It starts with
whsec_; the rest is the key in base64. Decode it. - Join the
webhook-idheader, a dot, thewebhook-timestampheader, a dot, and the body exactly as received. - Compute its HMAC-SHA256 with the key, and encode it in base64.
- Compare it, in constant time, with the part after
v1,inwebhook-signature. Aikho sends one signature; the scheme allows several, separated by spaces, so accept the message when one of them matches. - Refuse a timestamp far from your clock. These samples allow five minutes either way.
New signing secret, in Settings, replaces the secret at once: the old one stops working.
A worked example: with this secret, id, timestamp and body, the signature is this
secret whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw
webhook-id 7c1e9a2b-3f4d-4e5a-8b6c-0d1e2f3a4b5c
webhook-timestamp 1795771800
body {"id":"7c1e9a2b-3f4d-4e5a-8b6c-0d1e2f3a4b5c","type":"webhook.test","created_at":"2026-11-27T09:30:00Z"}
webhook-signature v1,KHNDBE6dCL7tlpvTDVS9vIsCSHK84CHDG6wcWV3DCtM=Python, standard library
import base64, hashlib, hmac, time
def verify(secret, headers, body, tolerance=300):
key = base64.b64decode(secret.removeprefix("whsec_"))
msg_id = headers["webhook-id"]
timestamp = headers["webhook-timestamp"]
if abs(time.time() - int(timestamp)) > tolerance:
return False
signed = msg_id.encode() + b"." + timestamp.encode() + b"." + body
expected = base64.b64encode(hmac.new(key, signed, hashlib.sha256).digest()).decode()
for signature in headers["webhook-signature"].split(" "):
version, _, value = signature.partition(",")
if version == "v1" and hmac.compare_digest(value, expected):
return True
return FalseNode.js, standard library
const crypto = require("node:crypto");
function verify(secret, headers, body, toleranceSeconds = 300) {
const key = Buffer.from(secret.replace(/^whsec_/, ""), "base64");
const id = headers["webhook-id"];
const timestamp = headers["webhook-timestamp"];
if (Math.abs(Date.now() / 1000 - Number(timestamp)) > toleranceSeconds) return false;
const expected = crypto.createHmac("sha256", key)
.update(id + "." + timestamp + ".").update(body).digest();
return headers["webhook-signature"].split(" ").some((signature) => {
const [version, value] = signature.split(",");
const given = Buffer.from(value || "", "base64");
return version === "v1" && given.length === expected.length && crypto.timingSafeEqual(given, expected);
});
}Go, standard library
package webhook
import (
"crypto/hmac"
"crypto/sha256"
"encoding/base64"
"math"
"net/http"
"strconv"
"strings"
"time"
)
// Verify reports whether body, with its headers, was signed by Aikho with secret.
func Verify(secret string, h http.Header, body []byte, now time.Time) bool {
key, err := base64.StdEncoding.DecodeString(strings.TrimPrefix(secret, "whsec_"))
if err != nil {
return false
}
id, timestamp := h.Get("webhook-id"), h.Get("webhook-timestamp")
seconds, err := strconv.ParseInt(timestamp, 10, 64)
if err != nil || math.Abs(float64(now.Unix()-seconds)) > 300 {
return false
}
mac := hmac.New(sha256.New, key)
mac.Write([]byte(id + "." + timestamp + "."))
mac.Write(body)
expected := mac.Sum(nil)
for _, signature := range strings.Fields(h.Get("webhook-signature")) {
version, value, _ := strings.Cut(signature, ",")
given, err := base64.StdEncoding.DecodeString(value)
if version == "v1" && err == nil && hmac.Equal(given, expected) {
return true
}
}
return false
}What to answer
Answer within 10 seconds, and do the work after answering. Aikho calls only https addresses that answer from the internet, never a private or local one, and follows no redirect.
| Your answer | What Aikho does |
|---|---|
2xx | Delivered. |
408, 429, 5xx, no answer within 10 seconds, no connection | Tries again, five tries in all, with waits that grow between them, then marks the message Failed. |
410 | Failed, and the webhook is turned off: Settings says the address answered that it is gone. The owner can turn it on again. |
| Any other answer, a redirect included | Failed at once: the address refused the message. |
Each failed try waits longer before the next: by the queue's retry rule (the try's number to the fourth power, in seconds, give or take a tenth), about 1 second, 16 seconds, 1 minute 21 and 4 minutes 16, so the fifth try comes about six minutes after the first.
A message whose signature or timestamp does not check: answer 401. Aikho marks it Failed at once and does not try it again. The webhook stays on and shows Needs attention, and Retry sends the message again, signed with the current secret. Never answer such a message with a 2xx, which Aikho counts as Delivered, or with 410, which turns the webhook off.
In Settings
Latest deliveries lists each message as Delivered, Waiting or Failed, with its number of tries. Retry sends a failed message again. Send a test event sends webhook.test. Turn off stops a webhook at once; a message still waiting then fails. A webhook whose last message failed shows Needs attention. Messages are kept 30 days, then deleted.
Messages go out one by one as moments happen, with no order between them: read type and the dates. A webhook added later hears of a person's earlier moments when that person's run reaches its next step.
Test before you go live
Call your own API as Aikho will, with test data: invented people at example.com, one job you can delete. Each row is a case Aikho's own tests play against its copy of the contract.
| # | Call | Expected answer |
|---|---|---|
| 1 | GET / with the key. | 200 with {"active": true}. |
| 2 | GET / with a wrong key, and with none. | 401. |
| 3 | GET / while your system has switched Aikho off. | 403, or 200 with {"active": false}. |
| 4 | GET / and POST /, at your address with nothing added before the path. | Both answered; a list is {"data": [...], "has_more": false}. |
| 5 | POST / without email. | 400. |
| 6 | POST / with a name, an email and "source": "aikho", then the same again. | 201 with the candidate's id, then 409 with candidate_exists and existing_id set to that id. |
| 7 | POST / for that candidate and a job, then the same again. | 201 with "status": "IN_PROGRESS" and "source": "aikho", then 409 with application_exists and existing_id. |
| 8 | Right after, POST / with the address in capitals. | That one candidate. |
| 9 | GET /, then without job_id, then after deleting the job. | The one application, then 400, then 404 with job_not_found. |
| 10 | POST / with several lines, accents, ✓ and an https link, then GET the notes. | The body comes back exactly as sent, with no \/ in the JSON. |
| 11 | A note, a score and a document on a REJECTED application to a CLOSED job. | 201, 200, 201. |
| 12 | PUT …/ with 74 and 82, then 60 and 90, then 101. | The second replaces the first; 101 gets 400. |
| 13 | POST …/ with "type": "REPORT", a name with accents, an apostrophe and &, and an https download_url; then the list; then an http download_url. | The name comes back byte for byte with "type": "REPORT"; the http link gets 400. |
| 14 | In Settings, an address that is not https, carries a user name or a query, or leads to a private address. | Aikho refuses it before calling anything. |
Before you go live
- Settings › ATS shows Your API answers and Aikho can read your jobs, both passed.
- A test role, created from one of your jobs and published, with a test person who finishes the interview: on the job, once, with the CV, the report, the score and one note.
- Your team sees the note, the score and the report on the application; candidates never do.
- A person Aikho adds receives no email from your system and starts no automation.
- The four reads show a write the moment it is answered.
- Your API answers
503for an outage, never401. - Your webhook checks the signature, answers within 10 seconds, and skips a
webhook-idit has already handled. - The workspace API key, the key your API made for Aikho and the signing secret are kept as secrets on your side.
Getting help
Write to the team from Contact, or book a call.