For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Get access
Getting Started Key Concepts Integration Types Core Components Embed Hosted API API Reference
  • API Reference
    • Contribution Reports
    • Events and Webhooks
      • GETList associated persons
      • POSTCreate an associated person
      • GETRetrieve an associated person
      • PUTUpdate an associated person
      • DELDelete an associated person
    • API Errors
Get access
LogoLogo
API ReferenceAssociated Persons

Create an associated person

POST
/employees/:employee_id/associated_persons
POST
/employees/:employee_id/associated_persons
$curl -X POST https://test.api.kota.io/employees/ee_3b1333d87d9d4fd6ad83ba7f6b0e951a/associated_persons \
> -H "Authorization: Bearer <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "first_name": "Emily",
> "last_name": "Johnson",
> "date_of_birth": "1985-07-14",
> "sex_at_birth": "female",
> "relationship_type": "spouse"
>}'
1{
2 "id": "ap_7f9c2d8a4e6b4f3a9c1d2e7f8b0a9c3d",
3 "employee_id": "ee_3b1333d87d9d4fd6ad83ba7f6b0e951a",
4 "first_name": "Emily",
5 "last_name": "Johnson",
6 "date_of_birth": "1985-07-14",
7 "sex_at_birth": "female",
8 "relationship_type": "spouse",
9 "platform_id": "pt_9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d",
10 "object": "associated_person"
11}

Creates an associated person (dependent or beneficiary) linked to an employee.

Previous

List associated persons

Next

Retrieve an associated person

Built with

Authentication

AuthorizationBearer
Authorization header using the Bearer scheme

Path parameters

employee_idstringRequiredformat: "ee_.+"

Request

This endpoint expects an object.
first_namestringRequired

Must not be empty. NOTE: This field will be normalized according to our internal formatting rules.

last_namestringRequired

Must not be empty. NOTE: This field will be normalized according to our internal formatting rules.

date_of_birthdateRequired

Must be in the past, but after 1900-01-01

sex_at_birthenumRequired
The sex assigned to the associated person at birth
Allowed values:
relationship_typeenumRequired
The relationship type between the employee and the associated person
Allowed values:
emailstring or nullOptional

NOTE: This field will be normalized according to our internal formatting rules.

phone_numberstring or nullOptional

Phone number in E.164 international format (e.g. +447700900999). NOTE: This field will be normalized according to our internal formatting rules.

Response

OK
idstringformat: "ap_.+"
Unique identifier for the associated person
employee_idstringformat: "ee_.+"
Unique identifier for the employee this person is associated with
first_namestring
First name of the associated person
last_namestring
Last name of the associated person
date_of_birthdate
Date of birth of the associated person
sex_at_birthenum
The sex assigned to the associated person at birth
Allowed values:
relationship_typeenum
The relationship type between the employee and the associated person
Allowed values:
platform_idstringformat: "pt_.+"
Unique identifier for the platform
emailstring or null
Email address of the associated person
phone_numberstring or null

Phone number in E.164 international format (e.g. +447700900999)

objectstringRead-only
The object type

Errors

400
Bad Request Error
404
Not Found Error