> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.kota.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.kota.io/_mcp/server.

# List all employees

GET https://test.api.kota.io/employees

Returns a list of your `employees`. The `employees` are returned sorted by creation date, with the most recent `employees` appearing first.

Reference: https://docs.kota.io/api-reference/employees/list-employees

## Authentication

- `Authorization` header (bearer token, required) — Authorization header using the Bearer scheme

## Servers

- `https://test.api.kota.io` (test, default)
- `https://api.kota.io` (production)

## Request

### Query parameters

- `filter` (string, optional) — Multiple values can be provided by separating them with a comma. Allowed values are: `pending`, `active`, `offboarding`, `inactive`, `restricted`.
- `employer_id` (string, optional) — Filter by employer ID.
- `external_customer_id` (string, optional)
- `metadata_id` (string, optional) — Filter by the employee's metadata "id" value (case-insensitive, accent-insensitive, partial match)
- `page` (integer, optional) — The page of results to return. Defaults to 1 if not provided.
- `page_size` (integer, optional) — The number of results to return per page. Defaults to 10 if not provided. Maximum value is 100.

### Headers

- `X-Platform-Id` (string, optional) — The target platform id. Required only when calling with a dashboard (WorkOS AuthKit) access token instead of a platform API key — the token carries no platform claim, so the caller must say which platform it means. Ignored for platform API key / embed session token callers.

## Response

### 200

OK

- `items` (list of EmployeeResponse, required) — A paginated array containing the response elements
- `page` (integer, required) — The current page of the results
- `page_size` (integer, required) — The number of results on this page. This can be different from the requested page size if the total number of results is less than the requested page size
- `total_count` (integer, required) — The total number of elements available in the response. This is the total number of elements available across all pages, not just the current page.
- `has_next_page` (boolean, optional) — Whether there are more pages available after this page
- `has_previous_page` (boolean, optional) — Whether there are more pages available before this page

## Errors

### 400 Bad Request Error

Bad Request

- `type` (string, optional, nullable)
- `title` (string, optional, nullable)
- `status` (integer, optional, nullable)
- `detail` (string, optional, nullable)
- `instance` (string, optional, nullable)
- `errors` (map from string to list of string, optional)

## Types

### EmployeeResponse

- `first_name` (string, required) — First name of the employee. It can include the middle name
- `last_name` (string, required) — Last name of the employee
- `date_of_birth` (date, required) — Date of birth of the employee
- `sex_at_birth` (enum, required) — The sex assigned to the employee at birth
  - Allowed values: `male`, `female`
- `national_tax_id` (string, required) — PPSN in Ireland, NINo in the UK, DNI/NIE in Spain
- `phone_number` (string, required, nullable) — Phone number in E.164 international format (e.g. +447700900999)
- `email` (string, required) — Email address of the employee
- `platform_id` (string, optional) — Unique identifier for the platform
- `id` (string, optional) — Unique identifier for the employee
- `employer_id` (string, optional) — Unique identifier for the employer
- `status` (enum, optional) — Current status of the employee
  - Allowed values: `pending`, `active`, `offboarding`, `inactive`, `restricted`
- `external_customer_id` (string, optional, nullable) — A unique identifier assigned by the Employer of Record (EoR) platform to the Customer (i.e. the company using the EoR service) for which the employee is employed. This ID groups employees under this Customer, enabling the aggregation of contribution reporting and other values per Customer rather than per legal entity. This parameter is only available to EoR platforms.
- `home_address` (AddressModel, optional) — Location where the employee is legally registered to live
- `nationality` (enum, optional) — Nationality of the employee (e.g. IE for Ireland, GB for United Kingdom, ES for Spain)
  - Allowed values: `af`, `ax`, `al`, `dz`, `as`, `ad`, `ao`, `ai`, `aq`, `ag`, `ar`, `am`, `aw`, `au`, `at`, `az`, `bs`, `bh`, `bd`, `bb`, `by`, `be`, `bz`, `bj`, `bm`, `bt`, `bo`, `bq`, `ba`, `bw`, `bv`, `br`, `io`, `bn`, `bg`, `bf`, `bi`, `cv`, `kh`, `cm`, `ca`, `ky`, `cf`, `td`, `cl`, `cn`, `cx`, `cc`, `co`, `km`, `cg`, `cd`, `ck`, `cr`, `ci`, `hr`, `cu`, `cw`, `cy`, `cz`, `dk`, `dj`, `dm`, `do`, `ec`, `eg`, `sv`, `gq`, `er`, `ee`, `sz`, `et`, `fk`, `fo`, `fj`, `fi`, `fr`, `gf`, `pf`, `tf`, `ga`, `gm`, `ge`, `de`, `gh`, `gi`, `gr`, `gl`, `gd`, `gp`, `gu`, `gt`, `gg`, `gn`, `gw`, `gy`, `ht`, `hm`, `va`, `hn`, `hk`, `hu`, `is`, `in`, `id`, `ir`, `iq`, `ie`, `im`, `il`, `it`, `jm`, `jp`, `je`, `jo`, `kz`, `ke`, `ki`, `kp`, `kr`, `xk`, `kw`, `kg`, `la`, `lv`, `lb`, `ls`, `lr`, `ly`, `li`, `lt`, `lu`, `mo`, `mg`, `mw`, `my`, `mv`, `ml`, `mt`, `mh`, `mq`, `mr`, `mu`, `yt`, `mx`, `fm`, `md`, `mc`, `mn`, `me`, `ms`, `ma`, `mz`, `mm`, `na`, `nr`, `np`, `nl`, `nc`, `nz`, `ni`, `ne`, `ng`, `nu`, `nf`, `mk`, `mp`, `no`, `om`, `pk`, `pw`, `ps`, `pa`, `pg`, `py`, `pe`, `ph`, `pn`, `pl`, `pt`, `pr`, `qa`, `re`, `ro`, `ru`, `rw`, `bl`, `sh`, `kn`, `lc`, `mf`, `pm`, `vc`, `ws`, `sm`, `st`, `sa`, `sn`, `rs`, `sc`, `sl`, `sg`, `sx`, `sk`, `si`, `sb`, `so`, `za`, `gs`, `ss`, `es`, `lk`, `sd`, `sr`, `sj`, `se`, `ch`, `sy`, `tw`, `tj`, `tz`, `th`, `tl`, `tg`, `tk`, `to`, `tt`, `tn`, `tr`, `tm`, `tc`, `tv`, `ug`, `ua`, `ae`, `gb`, `um`, `us`, `uy`, `uz`, `vu`, `ve`, `vn`, `vg`, `vi`, `wf`, `eh`, `ye`, `zm`, `zw`
- `start_on` (date, optional) — Employment start date
- `earliest_benefits_start_date` (date, optional, nullable) — The earliest date this employee can be enrolled in any benefits. Before this date, the employee remains in a Pending state and is excluded from benefit activation. Ignored for statutory schemes where immediate coverage is legally required. Example: Local Netherlands and UAE schemes.
- `offboard_on` (datetime, optional, nullable) — Date when the employee was or will be offboarded
- `bank_account` (EmployeeBankAccount, optional) — Bank account details
- `metadata` (map from string to string, optional, nullable) — Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Maximum 25 keys. Individual keys can be up to 40 characters and values up to 500 characters.
- `object` (string, optional) — The object type

### AddressModel

- `line1` (string, required) — Must not be empty. NOTE: This field will be normalized according to our internal formatting rules.
- `city` (string, required) — Must not be empty. NOTE: This field will be normalized according to our internal formatting rules.
- `postal_code` (string, required) — Must not be empty, and a valid postal code for the specified country. NOTE: This field will be normalized according to our internal formatting rules.
- `country_code` (enum, required)
  - Allowed values: `af`, `ax`, `al`, `dz`, `as`, `ad`, `ao`, `ai`, `aq`, `ag`, `ar`, `am`, `aw`, `au`, `at`, `az`, `bs`, `bh`, `bd`, `bb`, `by`, `be`, `bz`, `bj`, `bm`, `bt`, `bo`, `bq`, `ba`, `bw`, `bv`, `br`, `io`, `bn`, `bg`, `bf`, `bi`, `cv`, `kh`, `cm`, `ca`, `ky`, `cf`, `td`, `cl`, `cn`, `cx`, `cc`, `co`, `km`, `cg`, `cd`, `ck`, `cr`, `ci`, `hr`, `cu`, `cw`, `cy`, `cz`, `dk`, `dj`, `dm`, `do`, `ec`, `eg`, `sv`, `gq`, `er`, `ee`, `sz`, `et`, `fk`, `fo`, `fj`, `fi`, `fr`, `gf`, `pf`, `tf`, `ga`, `gm`, `ge`, `de`, `gh`, `gi`, `gr`, `gl`, `gd`, `gp`, `gu`, `gt`, `gg`, `gn`, `gw`, `gy`, `ht`, `hm`, `va`, `hn`, `hk`, `hu`, `is`, `in`, `id`, `ir`, `iq`, `ie`, `im`, `il`, `it`, `jm`, `jp`, `je`, `jo`, `kz`, `ke`, `ki`, `kp`, `kr`, `xk`, `kw`, `kg`, `la`, `lv`, `lb`, `ls`, `lr`, `ly`, `li`, `lt`, `lu`, `mo`, `mg`, `mw`, `my`, `mv`, `ml`, `mt`, `mh`, `mq`, `mr`, `mu`, `yt`, `mx`, `fm`, `md`, `mc`, `mn`, `me`, `ms`, `ma`, `mz`, `mm`, `na`, `nr`, `np`, `nl`, `nc`, `nz`, `ni`, `ne`, `ng`, `nu`, `nf`, `mk`, `mp`, `no`, `om`, `pk`, `pw`, `ps`, `pa`, `pg`, `py`, `pe`, `ph`, `pn`, `pl`, `pt`, `pr`, `qa`, `re`, `ro`, `ru`, `rw`, `bl`, `sh`, `kn`, `lc`, `mf`, `pm`, `vc`, `ws`, `sm`, `st`, `sa`, `sn`, `rs`, `sc`, `sl`, `sg`, `sx`, `sk`, `si`, `sb`, `so`, `za`, `gs`, `ss`, `es`, `lk`, `sd`, `sr`, `sj`, `se`, `ch`, `sy`, `tw`, `tj`, `tz`, `th`, `tl`, `tg`, `tk`, `to`, `tt`, `tn`, `tr`, `tm`, `tc`, `tv`, `ug`, `ua`, `ae`, `gb`, `um`, `us`, `uy`, `uz`, `vu`, `ve`, `vn`, `vg`, `vi`, `wf`, `eh`, `ye`, `zm`, `zw`
- `line2` (string, optional, nullable) — NOTE: This field will be normalized according to our internal formatting rules.
- `line3` (string, optional, nullable) — NOTE: This field will be normalized according to our internal formatting rules.
- `state` (string, optional, nullable) — Required for United States (State), and Canada (Province). NOTE: This field will be normalized according to our internal formatting rules.

### EmployeeBankAccount

- `account_number_last4` (string, required) — Last 4 digits of the account number

## Examples

**Response**

```json
{
  "items": [
    {
      "first_name": "string",
      "last_name": "string",
      "date_of_birth": "2024-12-01",
      "sex_at_birth": "male",
      "national_tax_id": "string",
      "phone_number": null,
      "email": "string",
      "platform_id": "pt_3b1333d87d9d4fd6ad83ba7f6b0e951a",
      "id": "ee_3b1333d87d9d4fd6ad83ba7f6b0e951a",
      "employer_id": "er_3b1333d87d9d4fd6ad83ba7f6b0e951a",
      "status": "pending",
      "external_customer_id": null,
      "home_address": null,
      "nationality": null,
      "start_on": "2024-12-01",
      "earliest_benefits_start_date": "2024-12-01",
      "offboard_on": "2024-12-01T00:00:00Z",
      "bank_account": null,
      "metadata": {},
      "object": "string"
    }
  ],
  "page": 1,
  "page_size": 20,
  "total_count": 1,
  "has_next_page": false,
  "has_previous_page": false
}
```

**SDK Code**

```python
import requests

url = "https://test.api.kota.io/employees"

querystring = {"employer_id":"er_3b1333d87d9d4fd6ad83ba7f6b0e951a"}

headers = {"Authorization": "Bearer <apiKey>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://test.api.kota.io/employees?employer_id=er_3b1333d87d9d4fd6ad83ba7f6b0e951a';
const options = {method: 'GET', headers: {Authorization: 'Bearer <apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://test.api.kota.io/employees?employer_id=er_3b1333d87d9d4fd6ad83ba7f6b0e951a"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://test.api.kota.io/employees?employer_id=er_3b1333d87d9d4fd6ad83ba7f6b0e951a")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://test.api.kota.io/employees?employer_id=er_3b1333d87d9d4fd6ad83ba7f6b0e951a")
  .header("Authorization", "Bearer <apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://test.api.kota.io/employees?employer_id=er_3b1333d87d9d4fd6ad83ba7f6b0e951a', [
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://test.api.kota.io/employees?employer_id=er_3b1333d87d9d4fd6ad83ba7f6b0e951a");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://test.api.kota.io/employees?employer_id=er_3b1333d87d9d4fd6ad83ba7f6b0e951a")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```