To get started you must first install the Employee Core Data API from the Automate Hub.
Base URL
https://api.automate.sensewp.com/package/http/endpoint/{your-endpoint-id}The full URL, including your unique endpoint ID, is provided to you when your access is set up. Treat it as sensitive.
Authentication
Every request must include an Authorization header whose value is your API key exactly as issued.
Authorization: your-api-key-here
Two important points:
The value is the API key on its own — there is no
Bearerprefix.The header name is case-insensitive (
Authorizationandauthorizationboth work).
Requests with a missing or incorrect key are rejected.
IP allow‑listing (optional)
Your account may optionally be restricted to one or more approved source IP addresses. If this is enabled for you, requests must originate from a registered public IP or they will be rejected. If it is not enabled, requests are accepted from any IP (subject to a valid API key).
To register or change your approved IP addresses, contact your Sense HR representative.
Making a request
|
|
Methods |
|
Content-Type |
|
Body | Optional. Used to filter the results — see below. |
POST is recommended because the request options are supplied in a JSON body.
Request body parameters
Both parameters are optional. Send an empty body (or no body) to get all active employees.
Parameter | Type | Default when omitted | Description |
| string |
| Which employees to include. One of |
| string or array of strings | (all employees) | Restrict the results to one or more specific employees, identified by their |
listType behaviour
Accepts
ACTIVE,LEAVERS, orACTIVE_AND_LEAVERS.Case-insensitive —
activeis treated the same asACTIVE.If omitted, empty, or set to an unrecognised value, it defaults to
ACTIVE.
senseHrId behaviour
If omitted, all employees matching the
listTypeare returned.If supplied, only the employees with those IDs are returned. Accepts either a single ID string or an array of ID strings.
IDs that are not in a valid format are ignored. If none of the supplied IDs are valid, the filter is treated as empty and all employees are returned.
Example requests
All active employees (empty body):
bash
curl -X POST "https://api.automate.sensewp.com/package/http/endpoint/{your-endpoint-id}" \ -H "Authorization: your-api-key-here" \ -H "Content-Type: application/json" \ -d '{}'Leavers only:
bash
curl -X POST "https://api.automate.sensewp.com/package/http/endpoint/{your-endpoint-id}" \ -H "Authorization: your-api-key-here" \ -H "Content-Type: application/json" \ -d '{ "listType": "LEAVERS" }'Active and leavers together:
bash
curl -X POST "https://api.automate.sensewp.com/package/http/endpoint/{your-endpoint-id}" \ -H "Authorization: your-api-key-here" \ -H "Content-Type: application/json" \ -d '{ "listType": "ACTIVE_AND_LEAVERS" }'Specific employees by ID:
bash
curl -X POST "https://api.automate.sensewp.com/package/http/endpoint/{your-endpoint-id}" \ -H "Authorization: your-api-key-here" \ -H "Content-Type: application/json" \ -d '{ "senseHrId": [ "111e3eb6-e8c9-47d7-9626-043439d7e293", "6e6d2b45-5701-47e3-b64d-525b307dd8f1" ] }'Response
A successful request returns HTTP 200 with Content-Type: application/json. The body is an object with a single data property containing an array of employee records:
json
{ "data": [ { "senseHrId": "…", "firstName": "…", "...": "…" } ] }Employee fields
Field | Type | Description |
| string | Unique, stable Sense HR identifier for the employee. Use this to reference or match a record. |
| string | Employee's first name. |
| string | Employee's last name. |
| string | Employee's email address. |
| string | null | Date of birth, ISO 8601 (UTC), e.g. |
| string | null | Gender label, e.g. |
| null | EmployeeId entered into the Employment details screen |
| string | null | Employment start date, ISO 8601 (UTC). |
| string[] | One or more job titles. An employee may hold several. |
| string[] | One or more work locations. |
| string[] | One or more departments. |
| string[] | One or more (sub)companies. May be an empty array. |
| string | null | Leaver date, ISO 8601 (UTC). |
| object[] | The employee's line manager(s). May be an empty array. See below. |
| string | Employment status: |
lineManagers object
Field | Type | Description |
| string | The manager's unique Sense HR identifier. |
| string | The manager's full name. |
| string | The manager's email address. |
Example response
json
{ "data": [ { "senseHrId": "111e3eb6-e8c9-47d7-9626-043439d7e293", "firstName": "Tia", "lastName": "Perry", "emailAddress": "[email protected]", "dateOfBirth": "1972-08-08T00:00:00.000Z", "gender": "Female", "employeeId": null, "startDate": "2012-12-10T00:00:00.000Z", "jobTitles": ["Customer Services Advisor", "Developer"], "locations": ["Manchester", "Edinburgh"], "departments": ["Customer Services", "Engineering"], "companies": ["Welsh co"], "lastDayOfEmployment": null, "lineManagers": [ { "senseHrId": "6e6d2b45-5701-47e3-b64d-525b307dd8f1", "name": "Aida Welsh", "emailAddress": "[email protected]" }, { "senseHrId": "5b571355-b2f8-437e-9d86-782e5a43e95f", "name": "Ben Greg", "emailAddress": "[email protected]" } ], "status": "Active" }, { "senseHrId": "b5ef79e6-1170-428d-80ce-0734d0c09269", "firstName": "Owen", "lastName": "Redmond", "emailAddress": "[email protected]", "dateOfBirth": "1990-01-24T00:00:00.000Z", "gender": "Male", "employeeId": null, "startDate": "2011-05-09T00:00:00.000Z", "jobTitles": ["HR Assistant"], "locations": ["Doncaster"], "departments": ["HR"], "companies": [], "lastDayOfEmployment": null, "lineManagers": [], "status": "Active" } ] }Notes and conventions
Identifier.
senseHrIdis the stable key for an employee. Use it (not list position) to reference, cache, or reconcile records.Dates. All dates are ISO 8601 in UTC with a zero time component (
T00:00:00.000Z); treat them as calendar dates. A date that isn't held is returned asnull.Multi-value fields.
jobTitles,locations,departments, andcompaniesare always arrays, because an employee can have more than one. They may contain a single value, several values, or (forcompanies) be empty.Line managers.
lineManagersis an array — an employee may have zero, one, or several. Each entry includes the manager's ownsenseHrId, which you can cross-reference against other records.Ordering. The order of records in
datais not guaranteed; do not rely on it.Result size. With no
senseHrIdfilter, the endpoint returns every employee matching thelistType, so expect the full population.
Troubleshooting
Symptom | Likely cause |
Request rejected / unauthorized | Missing or incorrect |
Request rejected despite a correct key | Your source IP may not be on the allow-list (if enabled for your account). Confirm your public egress IP is registered. |
Empty or unexpectedly full result when filtering by | One or more IDs were not in a valid format and were ignored; if all were invalid, all employees are returned. Check the IDs sent. |
Got active employees when you wanted leavers |
|
For access, API keys, IP registration, or any other query, contact your Sense HR representative.