Skip to content

Employees

Manage employee records in your organization. Employees represent full-time and part-time staff with salary information, team memberships, and project assignments.

Endpoints

MethodPathDescription
GET/org/:orgId/employeesList employees
GET/org/:orgId/employees/:idGet employee
POST/org/:orgId/employeesCreate employee
PATCH/org/:orgId/employees/:idUpdate employee
DELETE/org/:orgId/employees/:idDelete employee

List Employees

GET /org/:orgId/employees

Returns a paginated list of employees in the organization.

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number
limitinteger20Records per page (max 200)
searchstringSearch by first name, last name, or email
sortBystringlastNameSort field (see below)
sortDirstringascasc or desc
scenarioIdstringScenario ID for what-if queries

Example Request

bash
curl -X GET "https://{tenant}.flowstate.inc/api/v1/org/{orgId}/employees?sortBy=lastName&limit=10" \
  -H "Authorization: Bearer private_..."

Example Response

json
{
  "data": [
    {
      "id": "clx1a2b3c4d5e6f7g8h9",
      "firstName": "Jane",
      "lastName": "Chen",
      "email": "jane.chen@example.com",
      "internalEmployeeId": "EMP-1042",
      "startDate": "2024-03-15",
      "endDate": null,
      "managerId": "clx9m4n5o6p7",
      "jobRoleId": "clx9r8q7w6e5",
      "workTypeId": "clx2w3x4y5z6",
      "geographyId": "clx3g2h1j0k9",
      "defaultCurrencyCode": "USD",
      "noticeDate": null,
      "metadata": {},
      "createdAt": "2024-03-15T10:30:00Z",
      "updatedAt": "2024-06-01T14:22:00Z"
    }
  ],
  "meta": {
    "page": 1,
    "limit": 10,
    "total": 142,
    "hasNextPage": true
  }
}

Get Employee

GET /org/:orgId/employees/:id

Returns a single employee by ID.

Example Request

bash
curl -X GET "https://{tenant}.flowstate.inc/api/v1/org/{orgId}/employees/clx1a2b3c4d5e6f7g8h9" \
  -H "Authorization: Bearer private_..."

Example Response

json
{
  "data": {
    "id": "clx1a2b3c4d5e6f7g8h9",
    "firstName": "Jane",
    "lastName": "Chen",
    "email": "jane.chen@example.com",
    "internalEmployeeId": "EMP-1042",
    "startDate": "2024-03-15",
    "endDate": null,
    "managerId": "clx9m4n5o6p7",
    "jobRoleId": "clx9r8q7w6e5",
    "workTypeId": "clx2w3x4y5z6",
    "geographyId": "clx3g2h1j0k9",
    "defaultCurrencyCode": "USD",
    "noticeDate": null,
    "metadata": {},
    "createdAt": "2024-03-15T10:30:00Z",
    "updatedAt": "2024-06-01T14:22:00Z"
  }
}

Create Employee

POST /org/:orgId/employees

Creates a new employee record.

Request Body

json
{
  "firstName": "Alex",
  "lastName": "Rivera",
  "email": "alex.rivera@example.com",
  "internalEmployeeId": "EMP-2001",
  "startDate": "2026-07-01",
  "jobRoleId": "clx9r8q7w6e5",
  "workTypeId": "clx2w3x4y5z6",
  "geographyId": "clx3g2h1j0k9",
  "defaultCurrencyCode": "GBP",
  "managerId": "clx9m4n5o6p7",
  "metadata": {
    "department": "Engineering"
  }
}

Example Request

bash
curl -X POST "https://{tenant}.flowstate.inc/api/v1/org/{orgId}/employees" \
  -H "Authorization: Bearer private_..." \
  -H "Content-Type: application/json" \
  -d '{
    "firstName": "Alex",
    "lastName": "Rivera",
    "email": "alex.rivera@example.com",
    "startDate": "2026-07-01",
    "defaultCurrencyCode": "GBP"
  }'

Example Response

json
{
  "data": {
    "id": "clx7n8m9k0j1h2g3",
    "firstName": "Alex",
    "lastName": "Rivera",
    "email": "alex.rivera@example.com",
    "internalEmployeeId": null,
    "startDate": "2026-07-01",
    "endDate": null,
    "managerId": null,
    "jobRoleId": null,
    "workTypeId": null,
    "geographyId": null,
    "defaultCurrencyCode": "GBP",
    "noticeDate": null,
    "metadata": {},
    "createdAt": "2026-03-11T09:15:00Z",
    "updatedAt": "2026-03-11T09:15:00Z"
  }
}

Status: 201 Created


Update Employee

PATCH /org/:orgId/employees/:id

Updates one or more fields on an existing employee. Only include the fields you want to change.

Example Request

bash
curl -X PATCH "https://{tenant}.flowstate.inc/api/v1/org/{orgId}/employees/clx1a2b3c4d5e6f7g8h9" \
  -H "Authorization: Bearer private_..." \
  -H "Content-Type: application/json" \
  -d '{
    "lastName": "Chen-Rivera",
    "endDate": "2026-12-31",
    "noticeDate": "2026-09-30"
  }'

Example Response

json
{
  "data": {
    "id": "clx1a2b3c4d5e6f7g8h9",
    "firstName": "Jane",
    "lastName": "Chen-Rivera",
    "email": "jane.chen@example.com",
    "internalEmployeeId": "EMP-1042",
    "startDate": "2024-03-15",
    "endDate": "2026-12-31",
    "managerId": "clx9m4n5o6p7",
    "jobRoleId": "clx9r8q7w6e5",
    "workTypeId": "clx2w3x4y5z6",
    "geographyId": "clx3g2h1j0k9",
    "defaultCurrencyCode": "USD",
    "noticeDate": "2026-09-30",
    "metadata": {},
    "createdAt": "2024-03-15T10:30:00Z",
    "updatedAt": "2026-03-11T09:20:00Z"
  }
}

Delete Employee

DELETE /org/:orgId/employees/:id

Deletes an employee record. This operation is permanent for live data. In scenario mode, it creates a soft-delete tombstone.

Example Request

bash
curl -X DELETE "https://{tenant}.flowstate.inc/api/v1/org/{orgId}/employees/clx1a2b3c4d5e6f7g8h9" \
  -H "Authorization: Bearer private_..."

Status: 204 No Content


Field Reference

FieldTypeRequiredDescription
idstringUnique identifier (read-only)
firstNamestringYesEmployee first name
lastNamestringYesEmployee last name
emailstringYesEmployee email address
internalEmployeeIdstringNoYour internal employee ID (e.g., from HRIS)
startDatedateYesEmployment start date (ISO 8601: YYYY-MM-DD)
endDatedateNoEmployment end date (null = currently active)
managerIdstringNoID of the reporting manager (employee ID)
jobRoleIdstringNoID of the job role
workTypeIdstringNoID of the work type
geographyIdstringNoID of the geography/location
defaultCurrencyCodestringNoISO 4217 currency code (e.g., USD, GBP)
noticeDatedateNoDate the employee gave notice
metadataobjectNoArbitrary JSON metadata (default: {})
createdAtdatetimeRecord creation timestamp (read-only)
updatedAtdatetimeLast modification timestamp (read-only)

Flowstate Documentation