Skip to main content
GET
/
v1
/
dashboard
/
employee-recent-activity
Fetch Employee Recent Activity
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.trackpilots.com/v1/dashboard/employee-recent-activity', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "success": true,
  "statusCode": 200,
  "statusMessage": "Fetched employee recent activity successfully",
  "error": null,
  "data": {
    "meta": {
      "totalUsers": 1,
      "workModeUsers": 0,
      "privacyModeUsers": 0
    },
    "users": [
      {
        "userId": "ab7c4f30-1024-471a-a767-739df0dc53fd",
        "userName": "Sakthivel Govinthan",
        "profilePicUrl": "https://trackpilots.s3.amazonaws.com/profile-pic/xyz.png",
        "presence": {
          "currentMode": "workMode",
          "modeSinceUtc": "2026-02-11T14:21:41.052Z"
        },
        "connectedAt": "2026-02-11T12:01:26.450Z"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

Fetched employee recent activity successfully.

success
boolean
Example:

true

statusCode
integer
Example:

200

statusMessage
string
Example:

"Fetched employee recent activity successfully"

error
object
Example:

null

data
object