CRM REST API
Read and write the Hyreflow CRM over REST: candidates, contacts, companies, jobs, applications, placements, notes, tasks and files, with cursor paging, filters, idempotent creates and one error body.
The CRM has a REST API with one route per kind of record, the way other recruitment CRMs do. Use it to connect your
career site, your own tools or an integration platform to the CRM. The base URL is https://recruit.hyreflow.ai, and
the machine-readable spec of every route below is at
/api/v2/crm-api/openapi.json (OpenAPI 3).
Authentication
Send a workspace API key as a bearer token. Make one in the CRM under Settings → API keys, or in the app's Settings: they are the same keys, so one made in either shows in both. A key's secret is shown once, when it is made. The workspace owner revokes or rotates any key, a member only their own.
curl https://recruit.hyreflow.ai/api/v2/jobs -H "Authorization: Bearer hf_live_xxx"The key acts as the member who made it, with their role: every member reads and writes records, and deleting a
candidate, contact, company, job or placement (which takes its applications, notes and files with it) is for
workspace admins and team leads. A key reaches its own workspace only: an X-Workspace-Id naming another workspace
answers 403, even when the key's member belongs to it too. The API is there for workspaces with the CRM
switched on; anywhere else every route answers 404.
Each key may make 600 requests a minute. Past that a route answers 429 with a Retry-After header.
Records
Every record has an id, created_at and updated_at. Field names are plain English: a link to another record is
<name>_id (company_id, owner_id), an amount is {"amount": 80000, "currency": "EUR"}, a location is
{"city", "state", "postcode", "country", "text"} with an ISO country code, and a date is YYYY-MM-DD.
| Resource | Fields |
|---|---|
candidates | name, owner_id, job_title, company_id, headline, location, emails, phones, linkedin_url, person_type, seniority, skills, languages, candidate_status, current_salary, expected_salary, expected_rate, available_from, notice_length, work_authorisation, workplace_preference, open_to_relocate, has_cv (read only), source, about, custom_fields |
contacts | name, owner_id, job_title, company_id, headline, location, emails, phones, linkedin_url, person_type, seniority, skills, languages, decision_maker, function, bd_tags, source, about, custom_fields |
companies | name, owner_id, company_type, industries, company_size, headcount, websites, linkedin_url, location, fee_percent, terms_signed_at, about, custom_fields |
jobs | name, status, owner_id, company_id, hiring_manager_id, location, priority, salary_min, salary_max, fee_percent, openings, seniority, workplace, days_on_site, skills, languages, visa_sponsorship, category, confidential_client, opened_at, description (markdown), employment_type (set at create), closed_at (read only), custom_fields |
applications | candidate_id, job_id, stage, origin, fit_score, tier, fit_reason, next_action, next_action_at, rejection_reason, custom_fields |
placements | name, status, owner_id, candidate_id, company_id, contact_id, job_id, deal_id, start_date, salary, fee, fee_percent, fee_type, end_date, guarantee_ends_at, custom_fields |
notes | title, body (markdown), type_id, and the record it is on: person_id, company_id, job_id, application_id or placement_id |
tasks | title, body, status (TODO or DONE), due_at, owner_id, call_outcome, and the record it is on: person_id, company_id, job_id or placement_id |
files | name, kind (CV, COVER_LETTER, CONTRACT, JD, OTHER), mime_type, size_bytes, has_text, person_id, job_id, owner_id, download_url |
users | name, email, role, active, team_id (read only) |
A person is a candidate, a contact or both (person_type). Someone who is both is listed under each, and deleting
them from either deletes the person.
A person's name is {"first_name", "last_name", "text"}. To write it, send first_name and last_name, or
name as one string. emails and phones are lists of {"email" | "phone", "label"} where the label is WORK or
PERSONAL, the first one the main one.
Custom fields
Your workspace's own fields sit in custom_fields, by their key. List them with GET /api/v2/custom-fields, and
write them like any field: {"custom_fields": {"visa_status": "Needs sponsorship"}}. A select takes an option's
name or value, a date is YYYY-MM-DD, and null clears a field.
Lists
A list answers one page:
{"data": [{"id": "0193...", "name": "Data engineer", "status": "OPEN"}], "has_more": true, "next_cursor": "bzo1MA"}| Parameter | Does |
|---|---|
limit | Records a page, 1 to 200 (50 by default) |
cursor | The next_cursor of the previous page. Read on until has_more is false. A list pages 10,000 records deep at most (deeper answers 400 cursor_too_deep): to read every record, page with updated_since instead |
updated_since | Only records changed at or after this ISO 8601 time, oldest change first. A record changed while you page moves to the end, so a sync misses nothing |
filter | The filter the CRM's saved views use, as JSON (below). Candidates, contacts, companies, jobs and placements |
sort | field:asc or field:desc, on a field the list can sort by. Elsewhere created_at or updated_at |
expand | Linked records to include in full, comma separated: expand=company,owner adds company and owner beside company_id and owner_id |
Applications narrow by job_id, candidate_id and stage. Notes and tasks narrow by the record they are on
(person_id, company_id, job_id, and for notes application_id), oldest first. Files narrow by person_id and job_id.
Filters and sorts use the field names records have (job_title, owner_id, custom.visa_status).
A filter is a group of conditions, three levels deep at most:
{"join": "and", "items": [
{"field": "job_title", "op": "contains", "value": "engineer"},
{"field": "custom.visa_status", "op": "is", "value": ["NEEDS_SPONSORSHIP"]},
{"join": "or", "items": [{"field": "country", "op": "is", "value": ["PT"]}, {"field": "country", "op": "is", "value": ["ES"]}]}
]}Text fields take contains, not_contains, is, is_not, empty, not_empty. Numbers and amounts take eq, neq,
gt, gte, lt, lte. Dates take is, before, after. Selects and owner take is and is_not with a list of
values ("me" is the key's member). A select takes an option's value, or its name in any case (a built-in select's value in any case too: "open" is OPEN).
A company's fields are company.<field> on candidates, contacts and jobs. A value a field can't use (an option it
doesn't have, a word for a number, an empty list) answers 400 naming it: a condition is never dropped.
Creating and changing records
POST creates and answers 201 with the record. PATCH changes only the fields you send. DELETE moves the record
to the CRM's trash, with what is linked to it, and answers {"id", "deleted": true}.
Send an Idempotency-Key header with any POST, a unique value you choose per record. A retry with the same key and
the same body returns the first answer (with the header Idempotent-Replayed: true) instead of making a second
record. The same key with a different body answers 409 idempotency_key_reused, and a retry while the first request
is still running answers 409 idempotency_key_in_use. A key is kept for a day, and a request refused with a 4xx frees its key for the corrected request, unless it was charged: then that answer is the one a retry gets. A request that fails with a 5xx keeps that answer too, since it may have made something first: check what it made, then send any new attempt with a new key.
Paid routes
POST /api/v2/candidates/from-cv reads a CV with AI, which costs credits. Without approved_credits, or with too
few, it answers 402 needs_approval with the estimate and charges nothing. Send the request again with
approved_credits set to the amount you accept. Every other route is free.
Errors
Every error has the same body and a 4xx status for anything in the request:
{"error": {"code": "invalid_request", "message": "jobs have no field 'title'. Fields: company_id, description, ..."}}| Status | code |
|---|---|
| 400 | invalid_request: a field, value, filter or cursor this route doesn't take. cursor_too_deep: a cursor past 10,000 records (page with updated_since) |
| 401 | unauthorized: no key, or a key that is revoked or belongs to no member |
| 402 | needs_approval: a paid route, with estimate. insufficient_credits: the workspace's balance can't pay for it |
| 403 | forbidden: your role or your key's access doesn't cover it |
| 404 | not_found |
| 405 | method_not_allowed |
| 409 | conflict (the record exists already, such as a candidate on a job twice), idempotency_key_reused, idempotency_key_in_use |
| 424 | upstream_error: a service the route depends on failed. Retry later |
| 429 | rate_limited |
Routes
Candidates
GET /api/v2/candidates: a page of candidates.
curl "https://recruit.hyreflow.ai/api/v2/candidates?limit=20&expand=company" -H "Authorization: Bearer hf_live_xxx"GET /api/v2/candidates/{id}: one candidate.
{"id": "0193...", "name": {"first_name": "Ada", "last_name": "Example", "text": "Ada Example"}, "job_title": "Data engineer", "candidate_status": "ACTIVE", "custom_fields": {}}POST /api/v2/candidates: add a candidate.
curl -X POST https://recruit.hyreflow.ai/api/v2/candidates -H "Authorization: Bearer hf_live_xxx" -H "Idempotency-Key: 7d1c..." \
-H "Content-Type: application/json" \
-d '{"first_name": "Ada", "last_name": "Example", "emails": [{"email": "[email protected]"}], "skills": ["SQL"]}'PATCH /api/v2/candidates/{id}: change fields, e.g. {"candidate_status": "PASSIVE"}.
DELETE /api/v2/candidates/{id}: delete a candidate (admins and team leads).
POST /api/v2/candidates/{id}/files: upload a CV or another file to a candidate, free. PDF, DOCX, DOC, RTF, ODT or
TXT up to 10 MB. Answers the file.
{"name": "Ada Example CV.pdf", "content_base64": "JVBERi0x...", "kind": "CV"}POST /api/v2/candidates/from-cv: make a candidate from a CV, or add it to the person it belongs to (paid, see above).
{"name": "Ada Example CV.pdf", "content_base64": "JVBERi0x...", "approved_credits": 0.1}Answers {"candidate": {...}, "created": true, "credits_charged": 0.1}.
Contacts
GET /api/v2/contacts: a page of client contacts, e.g. ?filter={"join":"and","items":[{"field":"decision_maker","op":"is","value":["YES"]}]}.
GET /api/v2/contacts/{id}: one contact.
POST /api/v2/contacts: add a contact, e.g. {"first_name": "Sam", "last_name": "Lee", "company_id": "0193...", "job_title": "Head of Talent"}.
PATCH /api/v2/contacts/{id}: change fields, e.g. {"decision_maker": "YES"}.
DELETE /api/v2/contacts/{id}: delete a contact (admins and team leads).
Companies
GET /api/v2/companies: a page of companies, e.g. ?sort=name:asc.
GET /api/v2/companies/{id}: one company.
POST /api/v2/companies: add a company, e.g. {"name": "Acme", "websites": ["acme.example.com"], "company_type": "CLIENT"}.
PATCH /api/v2/companies/{id}: change fields, e.g. {"fee_percent": 20}.
DELETE /api/v2/companies/{id}: delete a company (admins and team leads).
Jobs
GET /api/v2/jobs: a page of jobs, e.g. the open ones: ?filter={"join":"and","items":[{"field":"status","op":"is","value":["OPEN"]}]}.
GET /api/v2/jobs/{id}: one job, e.g. ?expand=company,hiring_manager.
POST /api/v2/jobs: add a job. It starts OPEN unless you send a status.
{"name": "Data engineer", "company_id": "0193...", "salary_min": {"amount": 60000, "currency": "EUR"}, "salary_max": {"amount": 90000, "currency": "EUR"}, "description": "Build the pipelines."}PATCH /api/v2/jobs/{id}: change fields, e.g. {"status": "FILLED"}.
A job with confidential_client: true reads with company_id and hiring_manager_id as null (and expand=company as null): the client is named only inside the CRM. A null company_id or hiring_manager_id sent back to a confidential job is ignored, so a read-modify-write keeps the client; unlink it on the job's page.
DELETE /api/v2/jobs/{id}: delete a job and its pipeline (admins and team leads).
Applications
An application is a candidate on a job's pipeline.
GET /api/v2/applications: a page, e.g. a job's pipeline: ?job_id=0193...&expand=candidate.
GET /api/v2/applications/{id}: one application.
POST /api/v2/applications: put a candidate on a job, at the pipeline's first stage unless you send stage, e.g. {"candidate_id": "0193...", "job_id": "0193..."}.
PATCH /api/v2/applications/{id}: change fields, e.g. {"next_action": "Send the offer", "next_action_at": "2027-01-08"}.
DELETE /api/v2/applications/{id}: take the candidate off the job.
POST /api/v2/applications/{id}/move-stage: move to a stage, by its value or its name, and with a note, log it on the candidate.
{"stage": "INTERVIEW", "note": "First interview booked for Tuesday"}Placements
GET /api/v2/placements: a page of placements.
GET /api/v2/placements/{id}: one placement, e.g. ?expand=candidate,job.
POST /api/v2/placements: record a hire from the application that was hired. The application moves to PLACED. The
same application again returns the placement it made, unchanged (200): change it with PATCH.
{"application_id": "0193...", "salary": {"amount": 70000, "currency": "EUR"}, "fee_percent": 20, "start_date": "2027-01-04"}PATCH /api/v2/placements/{id}: change fields, e.g. {"status": "INVOICED"}.
A placement on a job with confidential_client: true reads with company_id, contact_id and deal_id as null (and expand=company,contact as null). Those sent back as null are ignored.
DELETE /api/v2/placements/{id}: delete a placement (admins and team leads).
Notes
GET /api/v2/notes: a page of notes, e.g. a person's: ?person_id=0193....
GET /api/v2/notes/{id}: one note.
POST /api/v2/notes: add a note to one record. Without a title, its first line is the title.
{"company_id": "0193...", "body": "Met the CTO\nThey hire two engineers in Q1", "type": "Client meeting"}PATCH /api/v2/notes/{id}: change its title or body.
DELETE /api/v2/notes/{id}: delete a note.
Tasks
GET /api/v2/tasks: a page of tasks, e.g. ?company_id=0193....
GET /api/v2/tasks/{id}: one task.
POST /api/v2/tasks: add a to-do, e.g. {"title": "Call back", "company_id": "0193...", "due_at": "2027-01-05"}.
PATCH /api/v2/tasks/{id}: change it, e.g. {"status": "DONE"}. "due_at": null takes the date off.
DELETE /api/v2/tasks/{id}: delete a task.
Files
GET /api/v2/files: a page of files, e.g. ?person_id=0193....
GET /api/v2/files/{id}: one file.
POST /api/v2/files: store a file on a person or a job, e.g. {"job_id": "0193...", "name": "Job description.pdf", "content_base64": "JVBERi0x...", "kind": "JD"}.
PATCH /api/v2/files/{id}: change its name or kind.
DELETE /api/v2/files/{id}: delete a file.
GET /api/v2/files/{id}/download: the file itself, as a download.
Users and custom fields
GET /api/v2/users: the workspace's members in the CRM, with their role.
GET /api/v2/users/{id}: one member, e.g. {"id": "0193...", "name": "Jane Doe", "email": "[email protected]", "role": "RECRUITER", "active": true}.
GET /api/v2/custom-fields: your workspace's own fields, e.g. ?object=job.
{"data": [{"id": "a_3f9c1e2d4b5a", "object": "person", "key": "visa_status", "label": "Visa status", "type": "SELECT", "options": [{"value": "NEEDS_SPONSORSHIP", "label": "Needs sponsorship"}]}], "has_more": false, "next_cursor": null}GET /api/v2/custom-fields/{id}: one custom field.
API Reference
Every HTTP endpoint on the hyreflow engine: bearer-token auth, API key management, and the _meta block metered calls return with credits charged and balance.
Pricing
How hyreflow prices each call: per-method credit costs, 1 credit at about $0.10, free calls on your own keys (BYOK), and how to preview a cost before a run.