Getting started
The QHR Open API lets your own software read and update your company's HR data: employees, leave, attendance, documents and more. It is the same data and the same rules as the QHR web app. If you can do something in QHR, you can do it through the API, and if you can't, the API won't let you either.
You don't need to be a developer to use QHR outside the web app. If you just want to ask Claude about your leave or your team, skip to Connect Claude. No code is involved.
What you need
- A QHR account in a company where the API & Integrations feature is switched on.
- Permission to do whatever you plan to automate. An employee can read their own leave; an HR manager can list every employee. The API follows your role exactly.
- A tool that can send HTTPS requests:
curl, Postman, or any programming language.
Step 1: Create a token
A token is a long secret key that stands in for your password when software talks to QHR.
- Sign in to QHR.
- Open Settings › API & Integrations › My tokens.
- Select Create token, give it a name you will recognise later (for example
ERP sync), choose an expiry date, and tick Allow changes only if the integration needs to create or update data. - Copy the token. It starts with
qhr_and is shown only once.
Warning: Treat a token like a password. Anyone who has it can act as you in QHR. Store it in a secret manager or an environment variable, never in source code or a shared document.
The Authentication & tokens guide covers expiry, revoking and the difference between read and read & write tokens.
Step 2: Make your first call
Load the token into an environment variable through a hidden prompt. Paste the token when asked and press Enter. Nothing is shown on screen, and because the token is never typed as part of a command, it stays out of your shell history and your scripts.
# bash / zsh
read -rs QHR_TOKEN && export QHR_TOKEN
# PowerShell 7 or later
$env:QHR_TOKEN = Read-Host -MaskInput "QHR token"
# Windows PowerShell 5.1
$env:QHR_TOKEN = [Net.NetworkCredential]::new("", (Read-Host -AsSecureString "QHR token")).Password
The variable lasts until you close the terminal. Don't write export QHR_TOKEN="qhr_…" with the token in it: a command typed like that is saved in your shell history.
The examples below use bash. In PowerShell, write $env:QHR_TOKEN where they say $QHR_TOKEN.
Ask QHR who the token belongs to:
curl https://qhr-api.qdev.it/open/v1/me \
-H "Authorization: Bearer $QHR_TOKEN"
You should get back your name, your company, the token's access level and expiry, and the permissions you hold:
{
"user": { "id": 42, "name": "Sara Ahmed", "email": "[email protected]" },
"company": { "id": 7, "name": "Acme Trading Co." },
"employee_id": 1203,
"locale": "ar",
"token": { "name": "Claude", "public_id": "Ab3dEf7hJk9m", "access": "read_write", "expires_at": "2027-02-25T00:00:00Z" },
"features": ["open_api", "attendance", "leave", "payroll", "tickets"],
"permissions": ["open_api/use", "employees/view", "employees/edit", "leave/view", "leave/approve", "attendance/view"]
}
GET /me is the quickest way to check that a token works and to see what it is allowed to do. It works with any valid token.
Step 3: Read some real data
List the first page of employees:
curl "https://qhr-api.qdev.it/open/v1/employees?per_page=5" \
-H "Authorization: Bearer $QHR_TOKEN" \
-H "Accept-Language: en"
Every endpoint page in the API reference has ready-to-run examples in curl, JavaScript and Python, generated from the same definition the API is built from.
The basics
| Base URL | https://qhr-api.qdev.it/open/v1 |
| Protocol | HTTPS only |
| Authentication | Authorization: Bearer qhr_… on every request |
| Format | JSON in, JSON out (file uploads use multipart/form-data) |
| Dates | ISO 8601: 2026-12-14 for dates, 2026-12-14T09:00:00Z for date-times (UTC) |
| Language | Accept-Language: ar or en. See Languages |
| Errors | Always { "error": "…", "code": "…" }. See Errors |
| Lists | Paged with page and per_page. See Pagination |
| Limits | 120 requests per minute per token. See Rate limits |
How the API is organised
Endpoints are grouped by area of QHR, the same way the web app is: people and organisation, time and attendance, leave and requests, and so on. Each endpoint has a page that explains:
- what it does in business terms and when to use it,
- the permission your role needs and whether a read-only token is enough,
- which other call gives you the ids it needs,
- every parameter, the request body and the response, with examples,
- every error it can return, what it means and how to fix it.
The whole API is also described in one machine-readable OpenAPI document at https://qhr-api.qdev.it/open/v1/openapi.json. Import it into Postman or Insomnia, or feed it to a code generator.
Next steps
- Learn the token rules: Authentication & tokens.
- Plan for failure: Errors and Rate limits.
- Browse the API reference.