Skip to main content
POST
/
employees
Create a new employee
curl --request POST \
  --url https://api.sandbox.flowpayroll.ai/v1/employees \
  --header 'Content-Type: application/json' \
  --header 'X-Auth-Token: <api-key>' \
  --data '
{
  "name": {
    "firstName": "John",
    "lastName": "Smith",
    "middleName": "Edward",
    "title": "Mr"
  },
  "email": "john.smith@company.com",
  "birthGender": "Male",
  "birthDate": "1985-07-23",
  "hoursWorkedCategory": "Above30Hours",
  "payrollConfigId": "payroll_config_001",
  "starterDetails": {
    "startDate": "2024-01-15",
    "starterDeclaration": "ThisIsMyOnlyJob",
    "secondedDetails": {
      "stayStatus": "Stay183DaysOrMore",
      "eEACitizen": true,
      "ePM6": false
    },
    "alreadySentToHmrcFps": false
  },
  "taxCodesPerYear": {
    "2025": [
      {
        "code": "1257L",
        "effectiveDate": "2025-04-06",
        "reason": "HMRC Update",
        "issuedBy": "HMRC",
        "week1Month1": false
      }
    ]
  },
  "phone": "+447700900123",
  "maritalStatus": "Married",
  "salary": 35000,
  "employeeCode": "EMP001",
  "secondaryEmail": "john.secondary@company.com",
  "address": {
    "line1": "123 Main Street",
    "line2": "Apt 4B",
    "city": "London",
    "county": "Greater London",
    "postcode": "SW1A 1AA",
    "countryCode": "UK"
  },
  "bankAccounts": [
    {
      "accountNumber": "12345678",
      "sortCode": "123456",
      "allocationPercentage": 100,
      "isPrimaryPayrollAccount": true,
      "accountHolderName": "John Smith"
    }
  ],
  "studentDetails": {
    "studentLoanDetails": {
      "loanType": "Plan2",
      "startDate": "2010-09-01",
      "endDate": "2025-07-31"
    },
    "postgraduateLoanDetails": {
      "loanType": "PostgraduateLoan",
      "startDate": "2015-09-01",
      "endDate": "2028-07-31"
    }
  },
  "tags": [
    {
      "name": "FullTime",
      "group": "EmploymentType",
      "value": "FullTime"
    }
  ],
  "previousEmployment": {
    "2026": {
      "grossTaxable": 15000,
      "tax": 3000
    }
  },
  "gender": "Male",
  "secondaryPhone": "+447700900124",
  "passportNumber": "123456789",
  "previousNames": [
    "John Doe"
  ],
  "directorDetails": {
    "directorsNICType": "Annual",
    "appointmentDate": "2024-01-15",
    "endDate": "2025-03-31"
  },
  "isIrregularEmployment": false,
  "isOffPayrollWorker": false,
  "workplaceDetails": {
    "workplaceId": "workplace_001",
    "workplaceName": "Head Office",
    "address": {
      "line1": "123 Main Street",
      "line2": "Apt 4B",
      "city": "London",
      "county": "Greater London",
      "postcode": "SW1A 1AA",
      "countryCode": "UK"
    }
  },
  "workingDays": {
    "standardWorkingDays": {
      "monday": true,
      "tuesday": true,
      "wednesday": true,
      "thursday": true,
      "friday": true,
      "saturday": false,
      "sunday": false
    },
    "shiftPattern": {
      "rotationStartDate": "2024-01-01",
      "shifts": [
        {
          "name": "Morning Shift",
          "workingDays": {
            "monday": true,
            "tuesday": true,
            "wednesday": true,
            "thursday": true,
            "friday": true,
            "saturday": false,
            "sunday": false
          },
          "durationInDays": 5,
          "weekNumber": 1
        },
        {
          "name": "Night Shift",
          "workingDays": {
            "monday": true,
            "tuesday": true,
            "wednesday": true,
            "thursday": true,
            "friday": true,
            "saturday": false,
            "sunday": false
          },
          "durationInDays": 5,
          "weekNumber": 2
        }
      ],
      "patternType": "FourOnFourOff",
      "patternWeeks": 8
    },
    "workingPattern": "Standard"
  },
  "partnerDetails": {
    "nationalInsuranceNumber": "QQ654321A"
  },
  "department": "Engineering",
  "jobTitle": "Software Engineer",
  "id": "emp_12345",
  "payrollId": "payroll_2023_001",
  "leaverDetails": {
    "leavingDate": "2024-12-31",
    "reason": "Retirement",
    "issuedBy": "Employer",
    "reportedToHmrc": false
  },
  "openingBalance": {},
  "openingBalanceDirector": {}
}
'
{
  "message": {
    "text": "<string>",
    "token": "<string>",
    "tokenArguments": [
      {
        "name": "<string>",
        "value": "<string>"
      }
    ]
  },
  "content": {
    "data": {
      "name": {
        "firstName": "John",
        "lastName": "Smith",
        "middleName": "Edward",
        "title": "Mr"
      },
      "email": "john.smith@company.com",
      "birthGender": "Male",
      "birthDate": "1985-07-23",
      "hoursWorkedCategory": "Above30Hours",
      "id": "emp_12345",
      "payrollConfigId": "payroll_config_001",
      "starterDetails": {
        "startDate": "2024-01-15",
        "starterDeclaration": "ThisIsMyOnlyJob",
        "secondedDetails": {
          "stayStatus": "Stay183DaysOrMore",
          "eEACitizen": true,
          "ePM6": false
        },
        "alreadySentToHmrcFps": false
      },
      "taxCodesPerYear": {
        "2025": [
          {
            "code": "1257L",
            "effectiveDate": "2025-04-06",
            "reason": "HMRC Update",
            "issuedBy": "HMRC",
            "week1Month1": false
          }
        ]
      },
      "niDetails": {
        "categoriesPerYear": {},
        "nationalInsuranceNumber": "QQ123456C"
      },
      "phone": "+447700900123",
      "maritalStatus": "Married",
      "salary": 35000,
      "employeeCode": "EMP001",
      "secondaryEmail": "john.secondary@company.com",
      "address": {
        "line1": "123 Main Street",
        "line2": "Apt 4B",
        "city": "London",
        "county": "Greater London",
        "postcode": "SW1A 1AA",
        "countryCode": "UK"
      },
      "bankAccounts": [
        {
          "accountNumber": "12345678",
          "sortCode": "123456",
          "allocationPercentage": 100,
          "isPrimaryPayrollAccount": true,
          "accountHolderName": "John Smith"
        }
      ],
      "studentDetails": {
        "studentLoanDetails": {
          "loanType": "Plan2",
          "startDate": "2010-09-01",
          "endDate": "2025-07-31"
        },
        "postgraduateLoanDetails": {
          "loanType": "PostgraduateLoan",
          "startDate": "2015-09-01",
          "endDate": "2028-07-31"
        }
      },
      "tags": [
        {
          "name": "FullTime",
          "group": "EmploymentType",
          "value": "FullTime"
        }
      ],
      "previousEmployment": {
        "2026": {
          "grossTaxable": 15000,
          "tax": 3000
        }
      },
      "gender": "Male",
      "secondaryPhone": "+447700900124",
      "passportNumber": "123456789",
      "previousNames": [
        "John Doe"
      ],
      "directorDetails": {
        "directorsNICType": "Annual",
        "appointmentDate": "2024-01-15",
        "endDate": "2025-03-31"
      },
      "isIrregularEmployment": false,
      "isOffPayrollWorker": false,
      "workplaceDetails": {
        "workplaceId": "workplace_001",
        "workplaceName": "Head Office",
        "address": {
          "line1": "123 Main Street",
          "line2": "Apt 4B",
          "city": "London",
          "county": "Greater London",
          "postcode": "SW1A 1AA",
          "countryCode": "UK"
        }
      },
      "workingDays": {
        "standardWorkingDays": {
          "monday": true,
          "tuesday": true,
          "wednesday": true,
          "thursday": true,
          "friday": true,
          "saturday": false,
          "sunday": false
        },
        "shiftPattern": {
          "rotationStartDate": "2024-01-01",
          "shifts": [
            {
              "name": "Morning Shift",
              "workingDays": {
                "monday": true,
                "tuesday": true,
                "wednesday": true,
                "thursday": true,
                "friday": true,
                "saturday": false,
                "sunday": false
              },
              "durationInDays": 5,
              "weekNumber": 1
            },
            {
              "name": "Night Shift",
              "workingDays": {
                "monday": true,
                "tuesday": true,
                "wednesday": true,
                "thursday": true,
                "friday": true,
                "saturday": false,
                "sunday": false
              },
              "durationInDays": 5,
              "weekNumber": 2
            }
          ],
          "patternType": "FourOnFourOff",
          "patternWeeks": 8
        },
        "workingPattern": "Standard"
      },
      "partnerDetails": {
        "name": {
          "firstName": "John",
          "lastName": "Smith",
          "middleName": "Edward",
          "title": "Mr"
        },
        "nationalInsuranceNumber": "QQ654321A"
      },
      "department": "Engineering",
      "jobTitle": "Software Engineer",
      "leaverDetails": {
        "leavingDate": "2024-12-31",
        "reason": "Retirement",
        "issuedBy": "Employer",
        "reportedToHmrc": false
      },
      "earningsToDatePerYear": {},
      "openingBalance": {},
      "openingBalanceDirector": {},
      "directorEarningsToDatePerYear": {},
      "payrollId": "PAY123",
      "createdDate": "2023-01-15T10:00:00Z",
      "createdBy": "admin@company.com",
      "updatedDate": "2023-06-01T12:00:00Z",
      "updatedBy": "hr@company.com"
    },
    "metadata": {
      "dateFormat": "yyyy-MM-dd",
      "dateTimeFormat": "yyyy-MM-ddTHH:mm:ss.fffZ",
      "paginationToken": "<string>"
    }
  },
  "validationIssues": [
    {
      "field": "<string>",
      "reason": "<string>",
      "reasonToken": "<string>",
      "reasonTokenArguments": [
        {
          "name": "<string>",
          "value": "<string>"
        }
      ]
    }
  ],
  "messageToken": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.flowpayroll.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-Auth-Token
string
header
required

Access token obtained from OAuth2 client credentials flow

Body

application/json
name
object
required
email
string<email>
required
Example:

"john.smith@company.com"

birthGender
enum<string>
required
Available options:
Male,
Female
Example:

"Male"

birthDate
string<date>
required
Example:

"1985-07-23"

hoursWorkedCategory
enum<string>
required
Available options:
UpTo16Hours,
From16To24Hours,
From24To30Hours,
Above30Hours,
Other
Example:

"Above30Hours"

payrollConfigId
string
required

The payroll config to assign the employee to.

Example:

"payroll_config_001"

starterDetails
object
required
taxCodesPerYear
object

Tax codes for the employee per tax year

Example:
{
"2025": [
{
"code": "1257L",
"effectiveDate": "2025-04-06",
"reason": "HMRC Update",
"issuedBy": "HMRC",
"week1Month1": false
}
]
}
niDetails
object

National Insurance details for the employee

phone
string | null
Example:

"+447700900123"

maritalStatus
enum<string> | null
Available options:
Single,
Married,
Divorced,
Widowed,
CivilPartnership,
FormerCivilPartnership,
SurvivorCivilPartnership
Example:

"Married"

salary
number<decimal>
Example:

35000

employeeCode
string | null

Employee code. An optional identifier for the employee.

Example:

"EMP001"

secondaryEmail
string<email> | null
Example:

"john.secondary@company.com"

address
object
bankAccounts
object[]
studentDetails
object

The student details of the employee

Example:
{
"studentLoanDetails": {
"loanType": "Plan2",
"startDate": "2010-09-01",
"endDate": "2025-07-31"
},
"postgraduateLoanDetails": {
"loanType": "PostgraduateLoan",
"startDate": "2015-09-01",
"endDate": "2028-07-31"
}
}
tags
object[]
previousEmployment
object

Earnings from a previous employer in the same tax year. Used for cumulative tax calculations only. Does not affect FPS reporting.

Example:
{
"2026": { "grossTaxable": 15000, "tax": 3000 }
}
gender
string | null
Example:

"Male"

secondaryPhone
string | null
Example:

"+447700900124"

passportNumber
string | null
Example:

"123456789"

previousNames
string[]
Example:
["John Doe"]
directorDetails
object
isIrregularEmployment
boolean | null
Example:

false

isOffPayrollWorker
boolean | null
Example:

false

workplaceDetails
object
workingDays
object

Configuration of employee's working days

partnerDetails
object
department
string | null
Example:

"Engineering"

jobTitle
string | null
Example:

"Software Engineer"

id
string

The unique identifier for the employee.

Example:

"emp_12345"

payrollId
string | null

Payroll ID. This is the ID of the payroll that the employee is associated with when sending the FPS submission to HMRC (payId field). If not provided a new one will be created. But this can affect the submission to HMRC.

Example:

"payroll_2023_001"

leaverDetails
object

Leaver details for migrating employees from another system.

openingBalance
object

Opening balance for this employment from a different payroll system (migration).

openingBalanceDirector
object

Opening balance for director earnings from a different payroll system (migration). Only NI-relevant fields.

Response

Employee Created

message
object
content
object
validationIssues
object[]
messageToken
string