> 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.

# Create a salary record

POST https://test.api.kota.io/employees/{employee_id}/salaries
Content-Type: application/json

Creates a new `salary` record for an `employee`, effective from the given date. Salary records are immutable — to change an employee's salary, create a new record with a later `effective_from` date rather than modifying an existing one.

Reference: https://docs.kota.io/api-reference/salaries/create-salary

## 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

### Path parameters

- `employee_id` (string, required)

### Headers

- `Idempotency-Key` (string, optional) — Unique key to ensure idempotent requests. If the same key is used for multiple _identical & successful_ requests, the same response will be returned. [Read more here](/api#idempotent-requests)
- `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.

### Body (application/json)

This endpoint expects a CreateSalaryRequest.

- `amount` (double, required) — Salary amount, in the given currency and pay frequency. Must be greater than 0.
- `currency` (enum, required) — ISO currency code the amount is denominated in
  - Allowed values: `eur`, `aed`, `afn`, `xcd`, `all`, `amd`, `aoa`, `ars`, `usd`, `aud`, `awg`, `azn`, `bam`, `bbd`, `bdt`, `xof`, `bgn`, `bhd`, `bif`, `bmd`, `bnd`, `bob`, `bov`, `brl`, `bsd`, `inr`, `btn`, `nok`, `bwp`, `byn`, `bzd`, `cad`, `xaf`, `cdf`, `chf`, `che`, `chw`, `nzd`, `clp`, `clf`, `cny`, `cop`, `cou`, `crc`, `cup`, `cuc`, `cve`, `ang`, `czk`, `djf`, `dkk`, `dop`, `dzd`, `egp`, `mad`, `ern`, `etb`, `fjd`, `fkp`, `mdl`, `gbp`, `gel`, `ghs`, `gip`, `gmd`, `gnf`, `gtq`, `gyd`, `hkd`, `hnl`, `hrk`, `htg`, `huf`, `idr`, `xdr`, `ils`, `iqd`, `irr`, `isk`, `jmd`, `jod`, `jpy`, `kes`, `kgs`, `khr`, `kmf`, `kpw`, `krw`, `kwd`, `kyd`, `kzt`, `lak`, `lbp`, `lkr`, `lrd`, `lsl`, `zar`, `lyd`, `mga`, `mkd`, `mmk`, `mnt`, `mop`, `mru`, `mur`, `mvr`, `mwk`, `mxn`, `mxv`, `myr`, `mzn`, `nad`, `xpf`, `ngn`, `nio`, `npr`, `omr`, `pab`, `pen`, `pgk`, `php`, `pkr`, `pln`, `pyg`, `qar`, `ron`, `rsd`, `rub`, `rwf`, `sar`, `sbd`, `scr`, `sdg`, `sek`, `sgd`, `shp`, `sll`, `sos`, `srd`, `ssp`, `stn`, `svc`, `xsu`, `syp`, `twd`, `szl`, `thb`, `tjs`, `tmt`, `tnd`, `top`, `try`, `ttd`, `tzs`, `uah`, `ugx`, `usn`, `uyu`, `uyi`, `uyw`, `uzs`, `ves`, `vnd`, `vuv`, `wst`, `yer`, `xua`, `zmw`, `zwl`
- `pay_frequency` (enum, required) — The period this amount represents (e.g. annual, monthly)
  - Allowed values: `annual`, `monthly`, `bi_weekly`, `weekly`
- `effective_from` (date, required) — Date from which this salary is effective

## Response

### 200

OK

- `id` (string, required) — Unique identifier for the salary record
- `employee_id` (string, required) — Unique identifier for the employee this salary belongs to
- `amount` (double, required) — Salary amount, in the given currency and pay frequency
- `currency` (enum, required) — ISO currency code the amount is denominated in
  - Allowed values: `eur`, `aed`, `afn`, `xcd`, `all`, `amd`, `aoa`, `ars`, `usd`, `aud`, `awg`, `azn`, `bam`, `bbd`, `bdt`, `xof`, `bgn`, `bhd`, `bif`, `bmd`, `bnd`, `bob`, `bov`, `brl`, `bsd`, `inr`, `btn`, `nok`, `bwp`, `byn`, `bzd`, `cad`, `xaf`, `cdf`, `chf`, `che`, `chw`, `nzd`, `clp`, `clf`, `cny`, `cop`, `cou`, `crc`, `cup`, `cuc`, `cve`, `ang`, `czk`, `djf`, `dkk`, `dop`, `dzd`, `egp`, `mad`, `ern`, `etb`, `fjd`, `fkp`, `mdl`, `gbp`, `gel`, `ghs`, `gip`, `gmd`, `gnf`, `gtq`, `gyd`, `hkd`, `hnl`, `hrk`, `htg`, `huf`, `idr`, `xdr`, `ils`, `iqd`, `irr`, `isk`, `jmd`, `jod`, `jpy`, `kes`, `kgs`, `khr`, `kmf`, `kpw`, `krw`, `kwd`, `kyd`, `kzt`, `lak`, `lbp`, `lkr`, `lrd`, `lsl`, `zar`, `lyd`, `mga`, `mkd`, `mmk`, `mnt`, `mop`, `mru`, `mur`, `mvr`, `mwk`, `mxn`, `mxv`, `myr`, `mzn`, `nad`, `xpf`, `ngn`, `nio`, `npr`, `omr`, `pab`, `pen`, `pgk`, `php`, `pkr`, `pln`, `pyg`, `qar`, `ron`, `rsd`, `rub`, `rwf`, `sar`, `sbd`, `scr`, `sdg`, `sek`, `sgd`, `shp`, `sll`, `sos`, `srd`, `ssp`, `stn`, `svc`, `xsu`, `syp`, `twd`, `szl`, `thb`, `tjs`, `tmt`, `tnd`, `top`, `try`, `ttd`, `tzs`, `uah`, `ugx`, `usn`, `uyu`, `uyi`, `uyw`, `uzs`, `ves`, `vnd`, `vuv`, `wst`, `yer`, `xua`, `zmw`, `zwl`
- `pay_frequency` (enum, required) — The period this amount represents (e.g. annual, monthly)
  - Allowed values: `annual`, `monthly`, `bi_weekly`, `weekly`
- `effective_from` (date, required) — Date from which this salary is effective
- `object` (string, optional) — The object type

## 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)

### 404 Not Found Error

Not Found

- `type` (string, optional, nullable)
- `title` (string, optional, nullable)
- `status` (integer, optional, nullable)
- `detail` (string, optional, nullable)
- `instance` (string, optional, nullable)

## Examples

**Request**

```json
{
  "amount": 123.45,
  "currency": "eur",
  "pay_frequency": "annual",
  "effective_from": "2024-12-01"
}
```

**Response**

```json
{
  "id": "sal_3b1333d87d9d4fd6ad83ba7f6b0e951a",
  "employee_id": "ee_3b1333d87d9d4fd6ad83ba7f6b0e951a",
  "amount": 123.45,
  "currency": "eur",
  "pay_frequency": "annual",
  "effective_from": "2024-12-01",
  "object": "string"
}
```

**SDK Code**

```python
import requests

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

payload = {
    "amount": 123.45,
    "currency": "eur",
    "pay_frequency": "annual",
    "effective_from": "2024-12-01"
}
headers = {
    "Authorization": "Bearer <apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://test.api.kota.io/employees/ee_3b1333d87d9d4fd6ad83ba7f6b0e951a/salaries';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <apiKey>', 'Content-Type': 'application/json'},
  body: '{"amount":123.45,"currency":"eur","pay_frequency":"annual","effective_from":"2024-12-01"}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

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

	payload := strings.NewReader("{\n  \"amount\": 123.45,\n  \"currency\": \"eur\",\n  \"pay_frequency\": \"annual\",\n  \"effective_from\": \"2024-12-01\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <apiKey>")
	req.Header.Add("Content-Type", "application/json")

	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/ee_3b1333d87d9d4fd6ad83ba7f6b0e951a/salaries")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"amount\": 123.45,\n  \"currency\": \"eur\",\n  \"pay_frequency\": \"annual\",\n  \"effective_from\": \"2024-12-01\"\n}"

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.post("https://test.api.kota.io/employees/ee_3b1333d87d9d4fd6ad83ba7f6b0e951a/salaries")
  .header("Authorization", "Bearer <apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"amount\": 123.45,\n  \"currency\": \"eur\",\n  \"pay_frequency\": \"annual\",\n  \"effective_from\": \"2024-12-01\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://test.api.kota.io/employees/ee_3b1333d87d9d4fd6ad83ba7f6b0e951a/salaries', [
  'body' => '{
  "amount": 123.45,
  "currency": "eur",
  "pay_frequency": "annual",
  "effective_from": "2024-12-01"
}',
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://test.api.kota.io/employees/ee_3b1333d87d9d4fd6ad83ba7f6b0e951a/salaries");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"amount\": 123.45,\n  \"currency\": \"eur\",\n  \"pay_frequency\": \"annual\",\n  \"effective_from\": \"2024-12-01\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "amount": 123.45,
  "currency": "eur",
  "pay_frequency": "annual",
  "effective_from": "2024-12-01"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://test.api.kota.io/employees/ee_3b1333d87d9d4fd6ad83ba7f6b0e951a/salaries")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```