Scopes used on this page: employees:read. Calling an endpoint your key was not granted the scope for returns 403 insufficient_scope.
Every call below needs your API key — see Partner API: authentication and your first call — and every response follows the paging and field-selection rules in Partner API: pagination, field selection and identifiers.
GET /v1/employees
The employee directory for your tenant, one page at a time. Returns ACTIVE and RESIGNED employees unless ?status= says otherwise; terminated employees are opt-in. custom_fields is present only on keys that also hold custom_fields:read.
Scope required: employees:read.
Query parameters:
limit— Rows per page, 1-200. Defaults to 50.cursor— Opaque cursor from the previous page's next_cursor. Omit for the first page; a null next_cursor means there are no further pages.fields— Comma-separated subset of this endpoint's response fields, at most 100. Narrowing only: a name outside the documented field list is rejected with 400, never silently ignored.employee_id— Exact match on the employee's business code.entity_id— Restrict to one legal entity, by the id /v1/entities returns.employment_type— Exact match on employment type.status— Employee status filter. Omitted returns ACTIVE and RESIGNED; TERMINATED is opt-in. ALL means the three listed statuses, never employees who have not joined or have been deleted. One of:ACTIVE,RESIGNED,TERMINATED,ALL.department— Exact match on the department NAME, not its id.designation— Exact match on the designation NAME, not its id.
Fields on each record, and the only names ?fields= accepts: asan_empcode, custom_fields, date_of_birth, date_of_exit, date_of_joining, department, designation, employee_id, employment_type, entity_id, full_name, gender, manager_empcode, nationality, status, tax_residence, work_address_name, work_email.
Example:
curl -s "https://api.asanify.com/v1/employees?limit=2" \ -H "Authorization: Bearer $ASANIFY_API_KEY"
GET /v1/employees/{emp_id}
One employee by Asanify employee code. A code belonging to another tenant is reported as 404, the same as a code that does not exist anywhere.
Scope required: employees:read.
Path variables:
emp_id— the employee'sasan_empcode. Despite the name, this is not your ownemployee_id— sending that returns 404.
Query parameters:
fields— Comma-separated subset of this endpoint's response fields, at most 100. Narrowing only: a name outside the documented field list is rejected with 400, never silently ignored.
Fields on the response, and the only names ?fields= accepts: asan_empcode, custom_fields, date_of_birth, date_of_exit, date_of_joining, department, designation, employee_id, employment_type, entity_id, first_name, gender, last_name, manager_empcode, middle_name, nationality, status, tax_residence, work_email.
Example:
curl -s "https://api.asanify.com/v1/employees/{emp_id}" \
-H "Authorization: Bearer $ASANIFY_API_KEY"
Substitute {emp_id} before running it.
