Skip to content

Get started

Authentication, workspaces and storage

Authenticate every request with an X-API-Key header, keep each customer in its own workspace, and choose whether HireLayer stores what it processes.

Send your key in the X-API-Key header of every request. Only GET /health is public.

http
POST /api/v4/resumes/score HTTP/1.1
Host: hirelayer.co
X-API-Key: sk_xxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Content-Type: application/json
  • Authorization: Bearer … and keys in query strings are not accepted.
  • Keys look like sk_ + 6 hex characters + _ + 32 hex characters. A malformed key is rejected as invalid.
  • All keys of an account share its credit balance and work with every product.
  • A missing key answers 401 missing_api_key, a wrong one 401 invalid_api_key, a balance too low 403 insufficient_credits: nothing is processed or billed.

Create, name, rotate and revoke keys in Dashboard → API keys. The same page shows the secret that signs your webhooks.

  • Call HireLayer from your backend. Never ship a key in browser, mobile or desktop code.
  • Read it from an environment variable such as HIRELAYER_API_KEY and keep it out of version control.
  • Use one key per environment or service, so you can revoke one without touching the others.
.env
# .env: server-side only, never commit it
HIRELAYER_API_KEY=sk_xxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
HIRELAYER_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

If you serve several companies, send each one’s id in the HireLayer-Workspace header: its jobs, resumes and scores never mix with another’s, and erasing it (DELETE /workspaces/{workspace_id}) removes all of them: see Workspaces and account. Without the header, everything goes to default. A workspace is created on first use; ids are case-insensitive, made of letters, digits and . _ : ~ -, up to 200 characters.

Shell
curl https://hirelayer.co/api/v4/jobs \
  -H "X-API-Key: $HIRELAYER_API_KEY" \
  -H "HireLayer-Workspace: acme"

application_id designates a resume everywhere, job_id a job, criterion_id a criterion. Send your own ids wherever you send a resume or a job; without one, HireLayer derives it from the content: file_, text_ or job_ followed by the first 32 hexadecimal characters of the SHA-256 of the file bytes, the resume text or the job text, such as file_d7e21d373637a897b17b8fdf63122807. The same file sent twice is therefore the same resume.

By default, every product stores what it processes in the workspace: a pair already scored is free to ask again, a criterion corrected re-evaluates only that criterion, and the two searches have something to search. do_not_store_data=true processes without storing.

What is kept with do_not_store_data=true:

  • a usage line for billing: date, product, credits, the request_id returned to you, and the call's IP address, country and user agent; no file name and no content.
  • the candidate photo, when one is found: face_url works 10 minutes, and the image is deleted 30 days later.
  • the skill names read in the resume, alone (tied to no resume, call or account), kept to recognize them faster.
  • with webhook_url, while the call is processed, its job and resumes, then its result until it is delivered: each deleted at once after use, 24 hours at most after the call.

Nothing else: no file, text, parse, job, criterion or score, and no content in logs. To impose it on every call of a customer, set it once on its workspace: PUT /workspaces/{workspace_id} with {"do_not_store_data": true}. Without storage, the two searches answer 400 storage_required, and every scoring call evaluates and bills every resume again. In a workspace set this way, the writes that would store something in it (PUT /resumes/{application_id}, PUT /jobs/{job_id}, POST /jobs/{job_id}/criteria, PATCH /jobs/{job_id}/criteria/{criterion_id}) answer 400 storage_required too.