curl --request GET \
--url https://{workspace}.klef.ai/api/workers \
--cookie klef.session=import requests
url = "https://{workspace}.klef.ai/api/workers"
headers = {"cookie": "klef.session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'klef.session='}};
fetch('https://{workspace}.klef.ai/api/workers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{workspace}.klef.ai/api/workers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "klef.session=",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{workspace}.klef.ai/api/workers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "klef.session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{workspace}.klef.ai/api/workers")
.header("cookie", "klef.session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://{workspace}.klef.ai/api/workers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'klef.session='
response = http.request(request)
puts response.read_body{
"results": [
{
"id": "<string>",
"employeeId": "<string>",
"legalName": {
"givenName": "<string>",
"familyName": "<string>"
},
"preferredName": {
"givenName": "<string>",
"familyName": "<string>"
},
"name": "<string>",
"email": "<string>",
"businessCommunication": {
"emails": [
{
"address": "<string>",
"isPrimary": true
}
],
"phones": [
{
"kind": "mobile",
"number": "<string>",
"extension": "<string>",
"isPrimary": true
}
]
},
"personalCommunication": {
"emails": [
{
"address": "<string>",
"isPrimary": true
}
],
"phones": [
{
"kind": "mobile",
"number": "<string>",
"extension": "<string>",
"isPrimary": true
}
]
},
"profile": {
"preferredLanguage": "<string>",
"timeZone": "<string>",
"photoUrl": "<string>"
},
"workAuthorization": {
"type": "<string>",
"country": "<string>",
"expiresOn": "<string>"
},
"lifecycle": {
"originalHireDate": "<string>",
"seniorityDate": "<string>",
"probationEndDate": "<string>",
"terminationDate": "<string>",
"separationType": "unspecified",
"terminationReason": {
"code": "<string>",
"name": "<string>"
},
"isTransfer": true
},
"leave": {
"isOnLeave": true,
"type": "unspecified",
"startDate": "<string>",
"expectedReturnDate": "<string>"
},
"isContractor": true,
"source": "adp_workforce_now",
"sourceId": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"status": "unspecified",
"lifecycleStage": "pre_start",
"customFields": [
{
"code": "<string>",
"name": "<string>",
"kind": "text",
"value": "<unknown>"
}
],
"assignments": [
{
"id": "<string>",
"sourceId": "<string>",
"isPrimary": true,
"status": "unspecified",
"workerType": "employee",
"employmentType": "unspecified",
"timeType": "unspecified",
"department": {
"code": "<string>",
"name": "<string>"
},
"costCenter": {
"code": "<string>",
"name": "<string>"
},
"businessUnit": {
"code": "<string>",
"name": "<string>"
},
"job": {
"code": "<string>",
"name": "<string>"
},
"position": {
"code": "<string>",
"name": "<string>"
},
"assignedLocation": {
"code": "<string>",
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"region": "<string>",
"postalCode": "<string>",
"country": "<string>"
},
"physicalLocation": {
"code": "<string>",
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"region": "<string>",
"postalCode": "<string>",
"country": "<string>"
},
"managerId": "<string>",
"manager": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"customFields": [
{
"code": "<string>",
"name": "<string>",
"kind": "text",
"value": "<unknown>"
}
],
"organizationUnits": [
{
"isPrimary": true,
"type": "<string>",
"code": "<string>",
"name": "<string>"
}
],
"reporting": {
"manager": {
"id": "<string>",
"name": "<string>",
"jobTitle": "<string>"
},
"unsyncedManager": "<string>",
"teammates": [
{
"id": "<string>",
"name": "<string>"
}
]
}
}
],
"accounts": [
"adp_workforce_now"
],
"version": 123,
"isCurrent": true,
"primaryAssignment": {
"id": "<string>",
"sourceId": "<string>",
"isPrimary": true,
"status": "unspecified",
"workerType": "employee",
"employmentType": "unspecified",
"timeType": "unspecified",
"department": {
"code": "<string>",
"name": "<string>"
},
"costCenter": {
"code": "<string>",
"name": "<string>"
},
"businessUnit": {
"code": "<string>",
"name": "<string>"
},
"job": {
"code": "<string>",
"name": "<string>"
},
"position": {
"code": "<string>",
"name": "<string>"
},
"assignedLocation": {
"code": "<string>",
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"region": "<string>",
"postalCode": "<string>",
"country": "<string>"
},
"physicalLocation": {
"code": "<string>",
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"region": "<string>",
"postalCode": "<string>",
"country": "<string>"
},
"managerId": "<string>",
"manager": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"customFields": [
{
"code": "<string>",
"name": "<string>",
"kind": "text",
"value": "<unknown>"
}
],
"organizationUnits": [
{
"isPrimary": true,
"type": "<string>",
"code": "<string>",
"name": "<string>"
}
],
"reporting": {
"manager": {
"id": "<string>",
"name": "<string>",
"jobTitle": "<string>"
},
"unsyncedManager": "<string>",
"teammates": [
{
"id": "<string>",
"name": "<string>"
}
]
}
}
}
],
"errors": [
{
"errorCode": "validation_error",
"errorMessage": "<string>",
"target": "<string>"
}
],
"pagination": {
"nextCursor": 123,
"limit": 123,
"hasMore": true,
"total": 123
}
}{
"result": "<unknown>",
"errors": [
{
"errorCode": "validation_error",
"errorMessage": "<string>",
"target": "<string>"
}
]
}{
"result": "<unknown>",
"errors": [
{
"errorCode": "validation_error",
"errorMessage": "<string>",
"target": "<string>"
}
]
}{
"result": "<unknown>",
"errors": [
{
"errorCode": "validation_error",
"errorMessage": "<string>",
"target": "<string>"
}
]
}{
"result": "<unknown>",
"errors": [
{
"errorCode": "validation_error",
"errorMessage": "<string>",
"target": "<string>"
}
]
}List workers
curl --request GET \
--url https://{workspace}.klef.ai/api/workers \
--cookie klef.session=import requests
url = "https://{workspace}.klef.ai/api/workers"
headers = {"cookie": "klef.session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'klef.session='}};
fetch('https://{workspace}.klef.ai/api/workers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{workspace}.klef.ai/api/workers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "klef.session=",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{workspace}.klef.ai/api/workers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "klef.session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{workspace}.klef.ai/api/workers")
.header("cookie", "klef.session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://{workspace}.klef.ai/api/workers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'klef.session='
response = http.request(request)
puts response.read_body{
"results": [
{
"id": "<string>",
"employeeId": "<string>",
"legalName": {
"givenName": "<string>",
"familyName": "<string>"
},
"preferredName": {
"givenName": "<string>",
"familyName": "<string>"
},
"name": "<string>",
"email": "<string>",
"businessCommunication": {
"emails": [
{
"address": "<string>",
"isPrimary": true
}
],
"phones": [
{
"kind": "mobile",
"number": "<string>",
"extension": "<string>",
"isPrimary": true
}
]
},
"personalCommunication": {
"emails": [
{
"address": "<string>",
"isPrimary": true
}
],
"phones": [
{
"kind": "mobile",
"number": "<string>",
"extension": "<string>",
"isPrimary": true
}
]
},
"profile": {
"preferredLanguage": "<string>",
"timeZone": "<string>",
"photoUrl": "<string>"
},
"workAuthorization": {
"type": "<string>",
"country": "<string>",
"expiresOn": "<string>"
},
"lifecycle": {
"originalHireDate": "<string>",
"seniorityDate": "<string>",
"probationEndDate": "<string>",
"terminationDate": "<string>",
"separationType": "unspecified",
"terminationReason": {
"code": "<string>",
"name": "<string>"
},
"isTransfer": true
},
"leave": {
"isOnLeave": true,
"type": "unspecified",
"startDate": "<string>",
"expectedReturnDate": "<string>"
},
"isContractor": true,
"source": "adp_workforce_now",
"sourceId": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"status": "unspecified",
"lifecycleStage": "pre_start",
"customFields": [
{
"code": "<string>",
"name": "<string>",
"kind": "text",
"value": "<unknown>"
}
],
"assignments": [
{
"id": "<string>",
"sourceId": "<string>",
"isPrimary": true,
"status": "unspecified",
"workerType": "employee",
"employmentType": "unspecified",
"timeType": "unspecified",
"department": {
"code": "<string>",
"name": "<string>"
},
"costCenter": {
"code": "<string>",
"name": "<string>"
},
"businessUnit": {
"code": "<string>",
"name": "<string>"
},
"job": {
"code": "<string>",
"name": "<string>"
},
"position": {
"code": "<string>",
"name": "<string>"
},
"assignedLocation": {
"code": "<string>",
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"region": "<string>",
"postalCode": "<string>",
"country": "<string>"
},
"physicalLocation": {
"code": "<string>",
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"region": "<string>",
"postalCode": "<string>",
"country": "<string>"
},
"managerId": "<string>",
"manager": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"customFields": [
{
"code": "<string>",
"name": "<string>",
"kind": "text",
"value": "<unknown>"
}
],
"organizationUnits": [
{
"isPrimary": true,
"type": "<string>",
"code": "<string>",
"name": "<string>"
}
],
"reporting": {
"manager": {
"id": "<string>",
"name": "<string>",
"jobTitle": "<string>"
},
"unsyncedManager": "<string>",
"teammates": [
{
"id": "<string>",
"name": "<string>"
}
]
}
}
],
"accounts": [
"adp_workforce_now"
],
"version": 123,
"isCurrent": true,
"primaryAssignment": {
"id": "<string>",
"sourceId": "<string>",
"isPrimary": true,
"status": "unspecified",
"workerType": "employee",
"employmentType": "unspecified",
"timeType": "unspecified",
"department": {
"code": "<string>",
"name": "<string>"
},
"costCenter": {
"code": "<string>",
"name": "<string>"
},
"businessUnit": {
"code": "<string>",
"name": "<string>"
},
"job": {
"code": "<string>",
"name": "<string>"
},
"position": {
"code": "<string>",
"name": "<string>"
},
"assignedLocation": {
"code": "<string>",
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"region": "<string>",
"postalCode": "<string>",
"country": "<string>"
},
"physicalLocation": {
"code": "<string>",
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"region": "<string>",
"postalCode": "<string>",
"country": "<string>"
},
"managerId": "<string>",
"manager": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"customFields": [
{
"code": "<string>",
"name": "<string>",
"kind": "text",
"value": "<unknown>"
}
],
"organizationUnits": [
{
"isPrimary": true,
"type": "<string>",
"code": "<string>",
"name": "<string>"
}
],
"reporting": {
"manager": {
"id": "<string>",
"name": "<string>",
"jobTitle": "<string>"
},
"unsyncedManager": "<string>",
"teammates": [
{
"id": "<string>",
"name": "<string>"
}
]
}
}
}
],
"errors": [
{
"errorCode": "validation_error",
"errorMessage": "<string>",
"target": "<string>"
}
],
"pagination": {
"nextCursor": 123,
"limit": 123,
"hasMore": true,
"total": 123
}
}{
"result": "<unknown>",
"errors": [
{
"errorCode": "validation_error",
"errorMessage": "<string>",
"target": "<string>"
}
]
}{
"result": "<unknown>",
"errors": [
{
"errorCode": "validation_error",
"errorMessage": "<string>",
"target": "<string>"
}
]
}{
"result": "<unknown>",
"errors": [
{
"errorCode": "validation_error",
"errorMessage": "<string>",
"target": "<string>"
}
]
}{
"result": "<unknown>",
"errors": [
{
"errorCode": "validation_error",
"errorMessage": "<string>",
"target": "<string>"
}
]
}Authorizations
Cookie-based session. Obtain by completing the /auth/login/{provider} OAuth flow; the /auth/callback response sets the klef.session cookie that subsequent requests send automatically.
Query Parameters
Case-insensitive search across name, email, employee id, job, and department.
3 - 100Filter to workers with an assignment in any of these cost center codes.
Filter to workers with an assignment in any of these department codes.
Filter to workers with an assignment in any of these business unit codes.
Filter to workers holding any of these licenses, by sku part number.
Filter to workers in any of these lifecycle stages.
A stage in a worker's lifecycle that a policy configures behavior for.
pre_start, active, leave, suspended, departing, terminated Filter to workers Klef manages an account for on any of these systems.
An external system a workspace can connect to.
adp_workforce_now, oracle_fusion, microsoft_entra, gusto, microsoft365, google_workspace, oracle_oci, worker_model, aws, azure, aws_identity_center, bamboo_hr, slack, github, github_enterprise, salesforce, hubspot, box, linear, dropbox, openai, anthropic, one_password, keeper, bitwarden, atlassian, notion Filter to workers whose effective hire date is on or after this day.
Filter to workers whose effective hire date is on or before this day.
Order the results by this column (default: name).
name, start_date Sort direction for sort (default: ascending).
asc, desc Response
OK
The envelope for a collection response: IReadOnlyList<T> ApiCollectionResponse<T>.Results.
Was this page helpful?