Skip to main content
GET
/
v1
/
employees
JavaScript
import BlueHive from '@bluehive/sdk';

const client = new BlueHive({
  apiKey: 'My API Key',
});

const employees = await client.employees.list({ employerId: 'employerId' });

console.log(employees.employees);
{
  "success": true,
  "employees": [
    {
      "_id": "<string>",
      "firstName": "<string>",
      "lastName": "<string>",
      "email": "<string>",
      "dob": "<string>",
      "title": "<string>",
      "activeAccount": "Active",
      "blurb": "<string>",
      "address": {
        "street1": "<string>",
        "street2": "<string>",
        "city": "<string>",
        "state": "<string>",
        "postalCode": "<string>",
        "county": "<string>",
        "country": "<string>"
      },
      "phone": [
        {
          "number": "<string>",
          "type": "Cell"
        }
      ],
      "employer_id": "<string>",
      "departments": [
        "<string>"
      ],
      "extendedFields": [
        {
          "name": "<string>",
          "value": "<string>"
        }
      ],
      "createdAt": "2023-11-07T05:31:56Z",
      "createdBy": "<string>",
      "updatedAt": "2023-11-07T05:31:56Z",
      "updatedBy": "<string>"
    }
  ],
  "total": 123,
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

API key for accessing BlueHive API endpoints. Format: "ApiKey <your-api-key>" or "Bearer <your-api-key>"

Query Parameters

employerId
string
required

ID of the employer to list employees for

limit
string

Maximum number of employees to return (default: 50)

offset
string

Number of employees to skip (default: 0)

Response

Employees retrieved successfully

success
boolean
required
employees
object[]
required

List of employees

total
number
required

Total number of employees returned

message
string
required
I