Skip to main content
PATCH
/
v1
/
settings
/
idle-alert
Update Idle Alert Settings
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    userId: 'f0ad9ad9-d421-48dc-868d-9760e33e5089',
    idleAlertSettings: {minimumIdleTimeMinutes: 19, enableIdleTimeAlert: true}
  })
};

fetch('https://api.trackpilots.com/v1/settings/idle-alert', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "success": true,
  "statusCode": 200,
  "statusMessage": "Idle alert settings updated successfully",
  "error": null,
  "data": {
    "userID": "8126cc3e-ca66-4c02-83f5-06273452120d",
    "idleAlertSettings": {
      "minimumIdleTimeMinutes": 5,
      "enableIdleTimeAlert": true
    }
  }
}

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:

"f0ad9ad9-d421-48dc-868d-9760e33e5089"

idleAlertSettings
object
required

Response

Idle alert settings updated successfully

success
boolean
Example:

true

statusCode
integer
Example:

200

statusMessage
string
Example:

"Idle alert settings updated successfully"

error
object
Example:

null

data
object