Developer guide
Connect your own systems to Ghirbal. With the API, your system reads and changes your hiring data: jobs, applications, candidates, interviews and settings. With webhooks, Ghirbal tells your system the moment something happens. Every endpoint, field and schema is in the OpenAPI file, which also imports into Postman.
Quick start
- An admin opens Settings → Integrations → API and webhooks, turns it on, and creates a key. It's shown once, so copy it then.
- Every call goes to
https://ghirbal.dev.creativeadvtech.ml/api/v1with the key as a bearer token:
curl https://ghirbal.dev.creativeadvtech.ml/api/v1/jobs?limit=1 \ -H "Authorization: Bearer ghb_…"
{ "data": [ { "id": "77b1…", "title": "Cashier", "status": "published", … } ], "next": "c2a9…" }On dev and staging, /api/v1/docs lets you try every endpoint: paste a key from that environment into Authorize.
Keys and access
- Keys look like
ghb_…. Send one on every call asAuthorization: Bearer ghb_…, over HTTPS. - A key is read only or read & write. GET is a read; every other method needs a read & write key.
- A key reaches only its own company's data, and sees what an admin sees. It works only in the environment it was made in.
- What a key does shows in the candidate's timeline as done through the API, and any email it triggers goes out in the language chosen for the key.
- Revoking a key, or turning the company's API off, takes effect at once.
- Team invites and roles, privacy settings, the plan and the keys and webhooks themselves stay in the app, so a leaked key can't create more access.
Endpoints
Paths are relative to https://ghirbal.dev.creativeadvtech.ml/api/v1. GET needs any key; every other method needs a read & write key. The fields of each one are in the OpenAPI file.
Jobs
GET /jobsPOST /jobsGET /jobs/{id}PATCH /jobs/{id}DELETE /jobs/{id}POST /jobs/{id}/publishPOST /jobs/{id}/pausePOST /jobs/{id}/closePOST /jobs/{id}/archiveGET /jobs/{id}/stepsPUT /jobs/{id}/stepsGET /jobs/{id}/questionsPUT /jobs/{id}/questionsPUT /jobs/{id}/steps/{stepId}/guidePUT /jobs/{id}/steps/{stepId}/simulationApplications
GET /applicationsGET /applications/{id}GET /applications/{id}/cvPOST /applications/{id}/movePOST /applications/{id}/rejectPOST /applications/{id}/undo-rejectionPOST /applications/{id}/hirePOST /applications/{id}/choosePUT /applications/{id}/poolDELETE /applications/{id}/poolPUT /applications/{id}/scoresPUT /applications/{id}/quizPOST /applications/bulk/movePOST /applications/bulk/rejectCandidates
GET /candidatesGET /candidates/{id}DELETE /candidates/{id}GET /candidates/{id}/exportInterviews
GET /interviewsGET /interviews/{id}GET /interviews/{id}/slotsPOST /interviews/{id}/bookPOST /interviews/{id}/reschedulePOST /interviews/{id}/cancelPOST /interviews/{id}/remindPOST /interviews/{id}/no-showPOST /interviews/{id}/rebookGET /interviews/{id}/scorecardsSettings
GET /settings/companyPATCH /settings/companyPUT /settings/company/logoDELETE /settings/company/logoPUT /settings/company/patternDELETE /settings/company/patternGET /settings/messagesPUT /settings/messages/{kind}GET /settings/flowsPOST /settings/flowsPATCH /settings/flows/{id}DELETE /settings/flows/{id}PUT /settings/flows/defaultGET /settings/questionsPOST /settings/questionsPUT /settings/questions/{id}DELETE /settings/questions/{id}GET /settings/interviewsPUT /settings/interviewsGET /settings/teamGET /settings/simulationsGET /settings/rejection-reasonsRequests and paging
- Bodies are JSON, up to 1 MB. Times are ISO 8601 in UTC, and ids are UUIDs.
- One record comes back under
data. A list addsnext, the cursor for the following page, which isnullon the last. - Lists take
limit(1 to 100, default 50) andcursor. A cursor only works with the same filters. - Lists are newest first. With
updated_since(jobs and applications), they run oldest change first, so a sync can walk forward.
GET /applications?status=hired&updated_since=2026-11-01T00:00:00Z&limit=50
File links, like a CV's, last 10 minutes. GET /applications/{id}/cv makes a new one.
Errors
Every error has the same shape: a stable code to program against, a readable message, and for invalid input the fields at fault.
HTTP/1.1 400 Bad Request
{
"error": {
"code": "invalid_request",
"message": "Some fields are invalid.",
"fields": [ { "field": "title", "issue": "required" } ]
}
}| Status | Code | When |
|---|---|---|
| 400 | invalid_request | A field, parameter or header is wrong. fields names each one. |
| 401 | unauthorized | The key is missing, wrong or revoked, or the company switched the API off. |
| 403 | read_only_key | A read-only key tried to change something. |
| 404 | not_found | It doesn't exist, or belongs to another company. We never say which. |
| 409 | not_draft, not_active, … | Not allowed in its current state, like deleting a published job. The codes are the app's own. |
| 409 | skips_step | A move or hire would jump past an Interview, Evaluation or Offer step the candidate hasn't been through. Move them one step at a time. |
| 409 | idempotency_conflict | That Idempotency-Key was used with a different request. |
| 409 | idempotency_in_progress | A request with that Idempotency-Key is still running. |
| 413 | too_large | The body is over 1 MB, or the file is over its limit. |
| 429 | rate_limited | Too many calls. Wait for Retry-After seconds. |
| 500 | internal | Something went wrong on our side. It's safe to retry. |
Rate limits
Each key can make 120 calls a minute, and each company 300. Every reply carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset (seconds). Past the limit you get 429 with Retry-After.
Idempotency
Any POST takes an Idempotency-Key header (1 to 255 characters, a UUID is ideal). Sending the same key again within 24 hours returns the first reply, marked Idempotent-Replayed: true, without doing the work twice. So when a call times out, retry it with the same key.
Webhooks
In Settings → Integrations → API and webhooks, an admin adds up to 10 HTTPS URLs and picks the events each one gets. Each URL has its own signing secret, whsec_…, shown once. Send test sends a ping event with empty data, and Deliveries shows the last 50 notices, what your system answered, and Send again.
POST https://hr.example.com/ghirbal/webhook
Content-Type: application/json
User-Agent: Ghirbal-Webhooks/1.0
Ghirbal-Event-Id: 5b0e…
Ghirbal-Event-Type: application.hired
Ghirbal-Delivery-Id: 9f12…
Ghirbal-Signature: t=1794140100,v1=6f1c0a…
{
"id": "5b0e…",
"type": "application.hired",
"createdAt": "2026-11-08T10:15:00.000Z",
"change": {
"from": { "stepId": "s6…", "status": "active" },
"to": { "stepId": "s7…", "status": "hired" }
},
"data": { …the application, as GET /applications/{id} returns it… }
}- Answer with any 2xx within 10 seconds. Anything else, a timeout or a redirect (we don't follow them) counts as a failure.
- Retries come after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours and 12 hours: 7 tries over about 21 hours.
- At least once: the same event can arrive more than once.
idis the event's, the same on every retry and Send again, so skip one you've handled. - Order isn't kept. Use
createdAtto put events in order. datais the record when we prepared the notice, usually moments after the event, and retries send it unchanged. It may have moved on since: go bytypeand, for a step change (moved, rejected, hired),change, which says what the event itself changed.- File links in
dataare made fresh on every try, and last 10 minutes. - Switching off: a
410 Goneswitches the URL off at once, and so does a day of failures. The company's admins get an email, and turning it back on is one click. Notices due while it was off fail rather than wait; Send again sends one. - Someone erased for privacy is never sent: their waiting notices are deleted with them.
Verifying a webhook
Ghirbal-Signature is t=<unix seconds>,v1=<hex>, where v1 is the HMAC-SHA256 of `${t}.${rawBody}` with the URL's secret. Check it against the raw body, before parsing, and refuse a t more than five minutes off.
import crypto from "node:crypto";
// rawBody: the request body exactly as received, before any JSON parsing.
function verify(rawBody, header, secret) {
const { t, v1 } = Object.fromEntries(header.split(",").map((p) => p.split("=")));
const expected = crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
const fresh = Math.abs(Date.now() / 1000 - Number(t)) < 300; // five minutes
return fresh && v1?.length === expected.length && crypto.timingSafeEqual(Buffer.from(v1), Buffer.from(expected));
}
// Express: keep the raw body for this route.
app.post("/ghirbal/webhook", express.raw({ type: "application/json" }), (req, res) => {
if (!verify(req.body.toString("utf8"), req.get("Ghirbal-Signature") ?? "", process.env.GHIRBAL_WEBHOOK_SECRET)) return res.sendStatus(401);
const event = JSON.parse(req.body);
// Skip an event.id you've already handled, then do the work (or queue it) and answer quickly.
res.sendStatus(204);
});Events
data is the record as the endpoint shown returns it, in English.
| Event | When | data |
|---|---|---|
job.created | A job is created, as a draft. | GET /jobs/{id} |
job.published | A job is published. | GET /jobs/{id} |
job.paused | A job is paused. | GET /jobs/{id} |
job.closed | A job is closed. | GET /jobs/{id} |
job.archived | A job is archived. | GET /jobs/{id} |
job.filled | A job is filled. | GET /jobs/{id} |
application.created | Someone applies. | GET /applications/{id} |
application.moved | An application moves to another active step. | GET /applications/{id} |
application.rejected | A rejection is final: when its email goes out, or at once if it has none. Never while it can still be undone. | GET /applications/{id} |
application.withdrawn | The candidate withdraws, or is erased. Their details are deleted with it, so data holds nothing personal. | { id, status, job: { id } } |
application.hired | Someone is hired. | GET /applications/{id} |
interview.booked | An interview is booked. | GET /interviews/{id} |
interview.rescheduled | An interview moves to another time. | GET /interviews/{id} |
interview.cancelled | An interview is cancelled. | GET /interviews/{id} |
interview.no_show | The candidate didn't come. | GET /interviews/{id} |
interview.completed | An interview is done. | GET /interviews/{id} |
scorecard.submitted | An interviewer submits their scorecard. | GET /interviews/{id}/scorecards, plus interviewId and applicationId |
Changelog
Version 1 won't change in a breaking way. A breaking change goes into a version 2, shows here, and admins of every company with a key hear about it well ahead.
- November 2026, v1. Jobs, applications, candidates, interviews and settings endpoints, and the 17 webhook events.
/api/v1/hiresis retired: useGET /applications?status=hiredor theapplication.hiredwebhook.