Sign in

API reference / ZiloHR

ZiloHR

Employees, attendance and leave.

Base URL https://api.zilomail.in

List employees#

GET/v1/hr/employees
hr.read

Needs the person's role to allow Employees: view.

Query

qstring
Up to 200 characters.
statusstring
Up to 20 characters.
limitinteger
How many to return (1–200). Default 50.
cursorstring
The next value from the previous page. Up to 500 characters.

Answer · 200 OK

dataarray of object
idstring
codestring
The employee id (e.g. EMP-0001).
namestring
emailstring | null
phonestring | null
designationstring | null
departmentstring | null
statusstring
joinedOnstring | null
managerIdstring | null
nextstring | null
Pass as cursor for the next page; null on the last.
curl "https://api.zilomail.in/v1/hr/employees?limit=20" \
  -H "Authorization: Bearer $ZILO_TOKEN"
Answer · 200 OK
{
  "data": [
    {
      "id": "string",
      "code": "string",
      "name": "string",
      "email": "string",
      "phone": "string",
      "designation": "string",
      "department": "string",
      "status": "string",
      "joinedOn": "2026-10-17",
      "managerId": "string"
    }
  ],
  "next": "string"
}
Try it

Sign in to call it as yourself.

Get an employee#

GET/v1/hr/employees/{id}
hr.read

By id or employee code, or me. Anyone may read their own record (as in the ESS app); others need Employees: view.

Path

idstringrequired
An id this API gave out. Up to 64 characters.

Answer · 200 OK

idstring
codestring
The employee id (e.g. EMP-0001).
namestring
emailstring | null
phonestring | null
designationstring | null
departmentstring | null
statusstring
joinedOnstring | null
managerIdstring | null
curl "https://api.zilomail.in/v1/hr/employees/ID" \
  -H "Authorization: Bearer $ZILO_TOKEN"
Answer · 200 OK
{
  "id": "string",
  "code": "string",
  "name": "string",
  "email": "string",
  "phone": "string",
  "designation": "string",
  "department": "string",
  "status": "string",
  "joinedOn": "2026-10-17",
  "managerId": "string"
}
Try it

Sign in to call it as yourself.

Attendance#

GET/v1/hr/attendance
hr.read

Days from from to to (at most 62). Without employee, the person's own; others need Attendance: view.

Query

fromstringrequired
A calendar date, YYYY-MM-DD.
tostringrequired
A calendar date, YYYY-MM-DD.
employeestring
Up to 64 characters.

Answer · 200 OK

dataarray of object
employeeIdstring
datestring
A calendar date, YYYY-MM-DD.
statusstring
PRESENT, ABSENT, HALF_DAY, LEAVE, HOLIDAY, WEEKLY_OFF…
sourcestring
checkInstring | null
checkOutstring | null
notesstring | null
curl "https://api.zilomail.in/v1/hr/attendance?from=2026-10-01&to=2026-10-31" \
  -H "Authorization: Bearer $ZILO_TOKEN"
Answer · 200 OK
{
  "data": [
    {
      "employeeId": "string",
      "date": "2026-10-17",
      "status": "string",
      "source": "string",
      "checkIn": "2026-10-17T09:30:00.000Z",
      "checkOut": "2026-10-17T09:30:00.000Z",
      "notes": "string"
    }
  ]
}
Try it

Sign in to call it as yourself.

Check in#

POST/v1/hr/attendance/check-in
hr.attendanceIdempotency-Key

The person checks in now (their own attendance, as in the ESS app); location optional.

Body

latnumber
lngnumber

Answer · 200 OK

employeeIdstring
datestring
A calendar date, YYYY-MM-DD.
statusstring
PRESENT, ABSENT, HALF_DAY, LEAVE, HOLIDAY, WEEKLY_OFF…
sourcestring
checkInstring | null
checkOutstring | null
notesstring | null
curl -X POST "https://api.zilomail.in/v1/hr/attendance/check-in" \
  -H "Authorization: Bearer $ZILO_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
Answer · 200 OK
{
  "employeeId": "string",
  "date": "2026-10-17",
  "status": "string",
  "source": "string",
  "checkIn": "2026-10-17T09:30:00.000Z",
  "checkOut": "2026-10-17T09:30:00.000Z",
  "notes": "string"
}
Try it

Sign in to call it as yourself.

Check out#

POST/v1/hr/attendance/check-out
hr.attendanceIdempotency-Key

Body

latnumber
lngnumber

Answer · 200 OK

employeeIdstring
datestring
A calendar date, YYYY-MM-DD.
statusstring
PRESENT, ABSENT, HALF_DAY, LEAVE, HOLIDAY, WEEKLY_OFF…
sourcestring
checkInstring | null
checkOutstring | null
notesstring | null
curl -X POST "https://api.zilomail.in/v1/hr/attendance/check-out" \
  -H "Authorization: Bearer $ZILO_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
Answer · 200 OK
{
  "employeeId": "string",
  "date": "2026-10-17",
  "status": "string",
  "source": "string",
  "checkIn": "2026-10-17T09:30:00.000Z",
  "checkOut": "2026-10-17T09:30:00.000Z",
  "notes": "string"
}
Try it

Sign in to call it as yourself.

Leave types#

GET/v1/hr/leave/types
hr.read

With the person's balance for this year.

Answer · 200 OK

dataarray of object
idstring
namestring
paidboolean
halfDayboolean
availablenumber | null
Days left; null: no limit.
curl "https://api.zilomail.in/v1/hr/leave/types" \
  -H "Authorization: Bearer $ZILO_TOKEN"
Answer · 200 OK
{
  "data": [
    {
      "id": "string",
      "name": "string",
      "paid": false,
      "halfDay": false,
      "available": 0
    }
  ]
}
Try it

Sign in to call it as yourself.

Leave requests#

GET/v1/hr/leave
hr.read

The person's own requests, newest first.

Query

limitinteger
How many to return (1–200). Default 50.
cursorstring
The next value from the previous page. Up to 500 characters.

Answer · 200 OK

dataarray of object
idstring
numberstring
employeeIdstring
typeobject
idstring
namestring
paidboolean
fromstring
A calendar date, YYYY-MM-DD.
tostring
A calendar date, YYYY-MM-DD.
halfDayboolean
daysnumber
reasonstring | null
statusstring
PENDING_APPROVAL, APPROVED, REJECTED or CANCELLED.
createdAtstring
ISO 8601 date and time, UTC, e.g. 2026-10-17T09:30:00.000Z.
nextstring | null
Pass as cursor for the next page; null on the last.
curl "https://api.zilomail.in/v1/hr/leave?limit=20" \
  -H "Authorization: Bearer $ZILO_TOKEN"
Answer · 200 OK
{
  "data": [
    {
      "id": "string",
      "number": "string",
      "employeeId": "string",
      "type": {
        "id": "string",
        "name": "string",
        "paid": false
      },
      "from": "2026-10-17",
      "to": "2026-10-17",
      "halfDay": false,
      "days": 0,
      "reason": "string",
      "status": "string",
      "createdAt": "2026-10-17T09:30:00.000Z"
    }
  ],
  "next": "string"
}
Try it

Sign in to call it as yourself.

Apply for leave#

POST/v1/hr/leave
hr.leavemay wait for approval (202)Idempotency-Key

For the person themselves. It goes to their approvers like any request; working days only are counted.

Body

typeIdstringrequired
fromstringrequired
A calendar date, YYYY-MM-DD.
tostring
Default: the same day.
halfDayboolean
Default false.
reasonstring
Up to 500 characters.

Answer · 201 Created

idstring
numberstring
employeeIdstring
typeobject
idstring
namestring
paidboolean
fromstring
A calendar date, YYYY-MM-DD.
tostring
A calendar date, YYYY-MM-DD.
halfDayboolean
daysnumber
reasonstring | null
statusstring
PENDING_APPROVAL, APPROVED, REJECTED or CANCELLED.
createdAtstring
ISO 8601 date and time, UTC, e.g. 2026-10-17T09:30:00.000Z.

Or 202 with the approval it waits for: see Approvals.

curl -X POST "https://api.zilomail.in/v1/hr/leave" \
  -H "Authorization: Bearer $ZILO_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "typeId": "string",
  "from": "2026-10-17"
}'
Answer · 201 Created
{
  "id": "string",
  "number": "string",
  "employeeId": "string",
  "type": {
    "id": "string",
    "name": "string",
    "paid": false
  },
  "from": "2026-10-17",
  "to": "2026-10-17",
  "halfDay": false,
  "days": 0,
  "reason": "string",
  "status": "string",
  "createdAt": "2026-10-17T09:30:00.000Z"
}
Try it

Sign in to call it as yourself.