Skip to main content
POST
/
v1
/
my-team
Fetch My Team
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    timeZone: 'Asia/Kolkata',
    userId: ['ab7c4f30-1024-471a-a767-739df0dc53fd'],
    teamId: []
  })
};

fetch('https://api.trackpilots.com/v1/my-team', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "success": true,
  "statusCode": 200,
  "statusMessage": "Fetched user work summary successfully",
  "error": null,
  "data": [
    {
      "user": {
        "userId": "ab7c4f30-1024-471a-a767-739df0dc53fd",
        "name": "Sakthivel Govinthan",
        "profilePicUrl": "https://trackpilots.s3.amazonaws.com/profile-pic/sample.png"
      },
      "timeSummary": {
        "totalWorkedTimeInSeconds": 1660,
        "activeWorkedTimeInSeconds": 1660,
        "idleWorkedTimeInSeconds": 0,
        "productiveWorkedTimeInSeconds": 1485,
        "unproductiveWorkedTimeInSeconds": 0,
        "neutralWorkedTimeInSeconds": 175
      },
      "session": {
        "inTime": "2026-02-12T04:32:01.676Z",
        "outTime": null,
        "isWorking": true
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Either userId or teamId must be provided. Both cannot be empty.

timeZone
string
required

IANA timezone of the requester

Example:

"Asia/Kolkata"

userId
string<uuid>[]
required

List of user UUIDs to fetch screenshots for

teamId
string<uuid>[]

List of team UUIDs to fetch screenshots for

Example:
[]

Response

Fetched my team details successfully.

success
boolean
Example:

true

statusCode
integer
Example:

200

statusMessage
string
Example:

"Fetched user work summary successfully"

error
string | null
Example:

null

data
object[]