Skip to main content
PATCH
/
v1
/
employees
Update Employee
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    userId: '271e6693-2130-4ea9-b02d-e6d57516186d',
    userName: 'Jagatheesan M',
    roleId: '271e6693-2130-4ea9-b02d-e6d57516186d',
    teamId: ['5f6fe61c-15c6-47b7-899d-dba99da2464c'],
    workMode: 'remote'
  })
};

fetch('https://api.trackpilots.com/v1/employees', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{ "success": true, "statusCode": 200, "statusMessage": "User details updated successfully", "error": null, "response": { "userName": "Jagatheesan E", "userId": "1269dd50-946d-4ce6-8428-dc258710e9af" } }

Documentation Index

Fetch the complete documentation index at: https://developer.trackpilots.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

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

Body

application/json
userId
string<uuid>
required
Example:

"271e6693-2130-4ea9-b02d-e6d57516186d"

userName
string
required
Required string length: 2 - 100
Example:

"Jagatheesan M"

roleId
string<uuid>
required
Example:

"271e6693-2130-4ea9-b02d-e6d57516186d"

teamId
string<uuid>[]
required
Minimum array length: 1
Example:
["5f6fe61c-15c6-47b7-899d-dba99da2464c"]
workMode
enum<string>
required
Available options:
remote,
office,
hybrid
Example:

"remote"

Response

User details updated successfully

success
boolean
Example:

true

statusCode
integer<int32>
Example:

200

statusMessage
string
Example:

"User details updated successfully"

error
unknown
response
object