Invite

Invite an employee for a given email address

POSThttps://api.myhappyforce.com/api/v1/public/company/employees/invite
Body
namestring

Name of the employee

emailstring

Email of the employee

hierarchyIdstring
profilearray of EmployeeProfile (object)

Employee profile data, used for later segmentation

groupIdsarray of string

List of groups to which this user belongs

Response

OK

Body
namestring

Name of the employee

emailstring

Email of the employee

hierarchyIdstring
profilearray of EmployeeProfile (object)

Employee profile data, used for later segmentation

groupIdsarray of string

List of groups to which this user belongs

Request
const response = await fetch('https://api.myhappyforce.com/api/v1/public/company/employees/invite', {
    method: 'POST',
    headers: {
      "Content-Type": "*/*"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "name": "text",
  "email": "text",
  "hierarchyId": "text",
  "profile": [
    {
      "id": "text",
      "date": "2024-11-21T06:40:35.809Z",
      "valueId": "text"
    }
  ],
  "groupIds": [
    "text"
  ]
}