MUSE-API API Reference

API documentation for Muse Wearables

API Endpoint
https://dev-api.musewearables.com/
Terms of Service: https://musewearables.com/privacy
Contact: admin@conzumex.com
Schemes: https
Version: 1.0.0

Authentication

APIKeyHeader

type
apiKey
in
header
name
api-key

user

user registration, login, logout and session management

Create user

POST /api/register

This can be done by anyone with security credentials

Created user object

Request Example
{
  "name": "string",
  "email": "string",
  "password": "string",
  "timeZone": "string"
}
201 Created

user created

400 Bad Request

invalid credentials

type
object
422 Unprocessable Entity

user already exist

type
object
Response Content-Types: application/json
Response Example (201 Created)
{
  "data": {
    "email": "string",
    "name": "string",
    "birthdate": "string",
    "gender": "string",
    "telephone": "string",
    "fatPercentage": "number",
    "height": "number",
    "weight": "number",
    "strideLengthWalking": "number",
    "strideLengthRunning": "number",
    "firstTimeUser": "boolean",
    "tokens": {
      "jwtToken": "string",
      "refreshToken": "string",
      "expiryDate": "string"
    },
    "userPreferences": {
      "stay_active": {
        "steps_per_day": "string",
        "activeDuration": "string",
        "calories_burned": "string"
      },
      "sleep_tracking": {
        "bedtime": "string",
        "wake_time": "string",
        "sleepDuration": "number"
      },
      "finance_tracking": {
        "currency": "string",
        "daily_spend_limit": "number"
      },
      "weight_management": {
        "goal": "string",
        "amount": "number"
      }
    },
    "sosData": {
      "id": "string",
      "userID": "string",
      "phoneNumbers": [
        "string"
      ],
      "emailIds": [
        "string"
      ],
      "message": "string",
      "isPhoneAlertActive": "boolean",
      "isEmailAlertActive": "boolean"
    }
  }
}
Response Example (400 Bad Request)
{
  "error": "string"
}
Response Example (422 Unprocessable Entity)
{
  "error": "string"
}

Updated user

PUT /api/users

This can only be done by the logged in user.

Updated user object

Request Example
{
  "jwtToken": "string",
  "email": "string",
  "name": "string",
  "birthdate": "string",
  "gender": "string",
  "telephone": "string",
  "password": "string"
}
200 OK

successful operation

400 Bad Request

Invalid user credentials

type
object
404 Not Found

User not found

type
object
Response Content-Types: application/json
Response Example (200 OK)
{
  "data": {
    "email": "string",
    "name": "string",
    "birthdate": "string",
    "gender": "string",
    "telephone": "string",
    "fatPercentage": "number",
    "height": "number",
    "weight": "number",
    "strideLengthWalking": "number",
    "strideLengthRunning": "number",
    "firstTimeUser": "boolean",
    "tokens": {
      "jwtToken": "string",
      "refreshToken": "string",
      "expiryDate": "string"
    },
    "userPreferences": {
      "stay_active": {
        "steps_per_day": "string",
        "activeDuration": "string",
        "calories_burned": "string"
      },
      "sleep_tracking": {
        "bedtime": "string",
        "wake_time": "string",
        "sleepDuration": "number"
      },
      "finance_tracking": {
        "currency": "string",
        "daily_spend_limit": "number"
      },
      "weight_management": {
        "goal": "string",
        "amount": "number"
      }
    },
    "sosData": {
      "id": "string",
      "userID": "string",
      "phoneNumbers": [
        "string"
      ],
      "emailIds": [
        "string"
      ],
      "message": "string",
      "isPhoneAlertActive": "boolean",
      "isEmailAlertActive": "boolean"
    }
  }
}
Response Example (400 Bad Request)
{
  "error": "string"
}
Response Example (404 Not Found)
{
  "error": "string"
}

Delete user

DELETE /api/users

This can only be done by the logged in user.

Created user object

Request Example
{
  "jwtToken": "string"
}
200 OK

successful operation

400 Bad Request

user already deleted

type
object
404 Not Found

user not found

type
object
Response Content-Types: application/json
Response Example (400 Bad Request)
{
  "error": "string"
}
Response Example (404 Not Found)
{
  "error": "string"
}

Get user details

GET /api/users

Please send jwtToken in body like always

jwtToken
in query
string

A valid jwtToken for users. THis should be in body and not in query param

200 OK

successful operation

400 Bad Request

Invalid username supplied

404 Not Found

User not found

Response Content-Types: application/json
Response Example (200 OK)
{
  "data": [
    {
      "userID": "string",
      "email": "string",
      "name": "string",
      "gender": "string",
      "telephone": "string",
      "birthdate": "string"
    }
  ]
}

Logs user into the system

POST /api/login

user credentials

Request Example
{
  "email": "string",
  "password": "string",
  "timeZone": "string"
}
200 OK

successful operation

400 Bad Request

invalid credentials

type
object
404 Not Found

User not found

type
object
Response Content-Types: application/json
Response Example (200 OK)
{
  "data": {
    "email": "string",
    "name": "string",
    "birthdate": "string",
    "gender": "string",
    "telephone": "string",
    "fatPercentage": "number",
    "height": "number",
    "weight": "number",
    "strideLengthWalking": "number",
    "strideLengthRunning": "number",
    "firstTimeUser": "boolean",
    "tokens": {
      "jwtToken": "string",
      "refreshToken": "string",
      "expiryDate": "string"
    },
    "userPreferences": {
      "stay_active": {
        "steps_per_day": "string",
        "activeDuration": "string",
        "calories_burned": "string"
      },
      "sleep_tracking": {
        "bedtime": "string",
        "wake_time": "string",
        "sleepDuration": "number"
      },
      "finance_tracking": {
        "currency": "string",
        "daily_spend_limit": "number"
      },
      "weight_management": {
        "goal": "string",
        "amount": "number"
      }
    },
    "sosData": {
      "id": "string",
      "userID": "string",
      "phoneNumbers": [
        "string"
      ],
      "emailIds": [
        "string"
      ],
      "message": "string",
      "isPhoneAlertActive": "boolean",
      "isEmailAlertActive": "boolean"
    }
  }
}
Response Example (400 Bad Request)
{
  "error": "string"
}
Response Example (404 Not Found)
{
  "error": "string"
}

update user's data

POST /api/users/update

User data

Request Example
{
  "email": "string",
  "name": "string",
  "username": "string",
  "DOB": "string",
  "gender": "string",
  "telephone": "string",
  "fatPercentage": "number",
  "height": "number",
  "weight": "number",
  "strideLengthRunning": "number",
  "strideLengthWalking": "number"
}

successful operation

400 Bad Request

invalid credentials

type
object
404 Not Found

User not found

type
object
Response Content-Types: application/json
Response Example (200 OK)
{
  "email": "string",
  "name": "string",
  "username": "string",
  "DOB": "string",
  "gender": "string",
  "telephone": "string",
  "fatPercentage": "number",
  "height": "number",
  "weight": "number",
  "strideLengthRunning": "number",
  "strideLengthWalking": "number"
}
Response Example (400 Bad Request)
{
  "error": "string"
}
Response Example (404 Not Found)
{
  "error": "string"
}

Add event in the calender

POST /api/users//permission/google/calender

This will add the event in the users google calender

Request Example
200 OK

success

type
object
Response Content-Types: application/json
Response Example (200 OK)
{
  "data": "string"
}

post user details

POST /api/users/details

Created user object

Request Example
{
  "jwtToken": "string",
  "data": {
    "chosen_preferences": [
      "string"
    ],
    "preference_data": {
      "stay_active": {
        "steps_per_day": "string",
        "active_time_in_min": "string",
        "calories_burned": "string"
      },
      "weight_management": {
        "goal": "string",
        "amount": "string",
        "units": "string"
      },
      "sleep_tracking": {
        "sleep_hours": "string",
        "bedtime": "string",
        "wake_time": "string"
      },
      "finance_tracking": {
        "daily_spend_limit": "string",
        "currency": "string"
      }
    }
  }
}
200 OK

successful operation

404 Not Found

User not found

type
object
Response Content-Types: application/json
Response Example (404 Not Found)
{
  "error": "string"
}

Logs out current logged in user session

POST /api/users/logout

User jwt token

Request Example
{
  "jwtToken": "string",
  "deviceSerialNumber": "string"
}
200 OK

success

type
object
default

successful operation

Response Content-Types: application/json
Response Example (200 OK)
{
  "data": "string"
}

Refresh jwt token

POST /api/users/jwt/refresh

User jwt token refresh

Request Example
{
  "jwtToken": "string",
  "refreshToken": "string",
  "timeZone": "string"
}
200 OK

success

type
object
default

successful operation

Response Content-Types: application/json
Response Example (200 OK)
{}

Forgot password

POST /api/users//password/forgot

sent the token to the user email id

Request Example
{
  "email": "string"
}
200 OK

success

type
object
default

successful operation

Response Content-Types: application/json
Response Example (200 OK)
{}

Reseyt password

POST /api/users//password/reset

reset the password by using the token

Request Example
{
  "email": "string",
  "newPassword": "string",
  "token": "string"
}
200 OK

success

type
object
default

successful operation

Response Content-Types: application/json
Response Example (200 OK)
{}

generate presigned url to updaload data

POST /api/users/generate/presignedurl

this api will return you the AWS signature and you can use it for updaloading data directly to the AWS server

generate pre-signed url

Request Example
{
  "contentType": "string",
  "requestType": "string",
  "contentCategory": "string",
  "fileExtension": "string"
}
200 OK

success

type
object
500 Internal Server Error

something went wrong

type
object
Response Content-Types: application/json
Response Example (200 OK)
{
  "data": "string"
}
Response Example (500 Internal Server Error)
{
  "error": "string"
}

update user goals

POST /api/users/goals/update

update user goals

update user goals

Request Example
{
  "userGoals": "string"
}
200 OK

success

type
object
500 Internal Server Error

something went wrong

type
object
Response Content-Types: application/json
Response Example (200 OK)
{
  "data": "string"
}
Response Example (500 Internal Server Error)
{
  "error": "string"
}

set user settings

POST /api/users/settings

set user settings

set user settings

Request Example
{
  "jwtToken": "string",
  "lastSyncTime": "string",
  "appNotification": "object",
  "sosCredentials": "object",
  "notificationSettings": "object",
  "isNotificationActive": "boolean",
  "isPaired": "boolean",
  "watchMode": "string",
  "smartAlarm": "string",
  "secondaryTimezone": "string"
}
200 OK

success

type
object
500 Internal Server Error

something went wrong

type
object
Response Content-Types: application/json
Response Example (200 OK)
{
  "data": "string"
}
Response Example (500 Internal Server Error)
{
  "error": "string"
}

delete user settings

POST /api/users/settings/delete

request body json schema

watchUID: string
jwtToken: string
Request Example
{
  "watchUID": "string",
  "jwtToken": "string"
}
200 OK

Success

Response Content-Types: application/json

add usage report

POST /api/users/report/usage

request body json schema

watchUID: string
jwtToken: string
lastSyncTime: string
batteryReport: object
usageReport: object
syncReport: object
Request Example
{
  "watchUID": "string",
  "jwtToken": "string",
  "lastSyncTime": "string",
  "batteryReport": "object",
  "usageReport": "object",
  "syncReport": "object"
}
200 OK

Success

Response Content-Types: application/json

add user dish

POST /api/users/dish/add

request body json schema

dishId: string
jwtToken: string
dishName: string
mealType: string
dishDetails: string
date: string
dishQuantity: number
logType: string
Request Example
{
  "dishId": "string",
  "jwtToken": "string",
  "dishName": "string",
  "mealType": "string",
  "dishDetails": "string",
  "date": "string",
  "dishQuantity": "number",
  "logType": "string"
}
200 OK

Success

Response Content-Types: application/json

update notification status

POST /api/users/notification/status/updte

request body json schema

notificationId: string
jwtToken: string
notificationState: string
Request Example
{
  "notificationId": "string",
  "jwtToken": "string",
  "notificationState": "string"
}
200 OK

Success

Response Content-Types: application/json

devices

Manage ios and android apps (notifications)

Register a device that can receive notifications through firebase

POST /api/devices/create

Can be done by a logged in user

Object containing the device details to be registered

Request Example
{
  "jwtToken": "string",
  "deviceSerialNumber": "string",
  "FCMToken": "string",
  "deviceType": "string",
  "OSVersion": "string"
}
200 OK

Device successfully updated

401 Unauthorized

invalid credentials

type
object
422 Unprocessable Entity

Device already exists

type
object
Response Content-Types: application/json
Response Example (200 OK)
{
  "id": "string",
  "userID": "string",
  "deviceSerial": "string",
  "deviceToken": "string",
  "deviceType": "string"
}
Response Example (401 Unauthorized)
{
  "error": "string"
}
Response Example (422 Unprocessable Entity)
{
  "error": "string"
}

Update a registered device's deviceToken based on deviceSerial, userID

POST /api/devices/update

Can be done by a logged in user

Object containing deviceSerial, userID and deviceToken

Request Example
{
  "jwtToken": "string",
  "deviceSerialNumber": "string",
  "FCMToken": "string",
  "deviceType": "string",
  "OSVersion": "string"
}
200 OK

Device successfully updated

401 Unauthorized

There are missing fields in the request body

Response Content-Types: application/json
Response Example (200 OK)
{
  "id": "string",
  "userID": "string",
  "deviceSerial": "string",
  "deviceToken": "string",
  "deviceType": "string"
}

api_keys

Admin routes - API Key management

Create a new API Key for the Muse APIs

POST /admin/apikey/create

Request Body JSON details

Request Example
{
  "clientName": "string"
}
200 OK

API Key successfully created

401 Unauthorized

There are missing fields in the request body

Response Content-Types: application/json
Response Example (200 OK)
{
  "id": "string",
  "apiKey": "string",
  "expiryDate": "string",
  "name": "string"
}

Delete an existing API Key

POST /admin/apikey/delete

Request Body JSON details

Request Example
{
  "apiKey": "string"
}
200 OK

API Key successfully delete

401 Unauthorized

There are missing fields in the request body

Response Content-Types: application/json
Response Example (200 OK)
{
  "message": "string"
}

watches

Watch registration API routes

Create a new Watch entry linked to a registered User

POST /api/watches/create

Request Body JSON details

Request Example
{
  "jwtToken": "string",
  "watchUID": "string",
  "hwVersion": "string",
  "firmwareVersion": "string"
}
200 OK

Watch created and linked successfully

Response Content-Types: application/json
Response Example (200 OK)
{
  "id": "string",
  "watchUID": "string",
  "hwVersion": "string",
  "firmwareVersion": "string",
  "userID": "string"
}

Update a Watch entry linked to a registered User

POST /api/watches/update

Request Body JSON details

Request Example
{
  "jwtToken": "string",
  "watchUID": "string",
  "hwVersion": "string",
  "firmwareVersion": "string"
}
200 OK

Watch created and linked successfully

Response Content-Types: application/json
Response Example (200 OK)
{
  "id": "string",
  "watchUID": "string",
  "hwVersion": "string",
  "firmwareVersion": "string",
  "userID": "string"
}

Delete a watch and unlink it from the user

POST /api/watches/delete

Request Body JSON details

Request Example
{
  "jwtToken": "string",
  "watchUID": "string"
}
204 No Content

Watch unlinked from user successfully

Response Content-Types: application/json

bots

Find all bot channels

Fetch all available bot IDs

GET /api/bots/
200 OK

Success

Response Content-Types: application/json
Response Example (200 OK)
[
  {
    "id": "string",
    "name": "string"
  }
]

logging

Log Water levels, heart rate and sleep logs

Send a water log entry to the backend

POST /api/record/water

Request Body JSON details

Request Example
{
  "jwtToken": "string",
  "quantity": "string",
  "units": "string",
  "entryTime": "string"
}
204 No Content

Water log successfully added

Response Content-Types: application/json

Send a heart rate entry to the backend

POST /api/record/heart

Request Body JSON details

Request Example
{
  "jwtToken": "string",
  "rate": "number",
  "entryTime": "string"
}
204 No Content

Water log successfully added

Response Content-Types: application/json

Record sleep data for the night

POST /api/record/sleep

Request Body JSON schema

Request Example
{
  "jwtToken": "string",
  "bedTime": "string",
  "wakeTime": "string",
  "quality": "string",
  "sleepData": [
    {
      "startTime": "string",
      "endTime": "string",
      "sleepType": "string"
    }
  ]
}
204 No Content

Sleep log succesfully added

Response Content-Types: application/json

To log and handle daily checkin of the user

POST /api/record/dailyCheckin

Handles all daily checkins assigned for the users. Add user daily checkins log activity and /Home route will give you the list of current day's all the daily checkins activity log status.

Record daily checkin

Request Example
{
  "dailyCheckInId": "string",
  "day": "string",
  "isCompleted": "boolean"
}
201 Created

recorded

500 Internal Server Error

Something went wrong

Response Content-Types: application/json
Response Example (201 Created)
{
  "data": "string"
}
Response Example (500 Internal Server Error)
{
  "error": "string"
}

training

Explore training plans, customise and modify training plans

Fetch a list of training plans to show

POST /api/tplans/explore

request body json schema

Request Example
{
  "jwtToken": "string"
}
200 OK

Success

Response Content-Types: application/json
Response Example (200 OK)
[
  {
    "id": "string",
    "activity": "string",
    "plan": {
      "schedule": "string"
    }
  }
]

Enroll a user into a training plan

POST /api/tplans/enroll

data required for enrollment

Request Example
{
  "planID": "string",
  "startDate": "string"
}
204 No Content

User has been enrolled into the specified training plan

Response Content-Types: application/json

Show status of enrolled training plan

POST /api/tplans/status

request body json schema

planID: string
jwtToken: string
Request Example
{
  "planID": "string",
  "jwtToken": "string"
}
200 OK

Success

Response Content-Types: application/json
Response Example (200 OK)
{
  "data": [
    "object"
  ]
}

update status of enrolled training plan

POST /api/tplans/update

request body json schema

planID: string
jwtToken: string
userActivityData: object
Request Example
{
  "planID": "string",
  "jwtToken": "string",
  "userActivityData": "object"
}
200 OK

Success

Response Content-Types: application/json
Response Example (200 OK)
{
  "data": [
    "object"
  ]
}

update status of enrolled training plan

POST /api/tplans/reschedule

request body json schema

planID: string
jwtToken: string
targetDate: string
rescheduleDate: string
Request Example
{
  "planID": "string",
  "jwtToken": "string",
  "targetDate": "string",
  "rescheduleDate": "string"
}
200 OK

Success

Response Content-Types: application/json
Response Example (200 OK)
{
  "data": [
    "object"
  ]
}

start enrolled training plan

POST /api/tplans/start

request body json schema

planID: string
jwtToken: string
Request Example
{
  "planID": "string",
  "jwtToken": "string"
}
200 OK

Success

Response Content-Types: application/json
Response Example (200 OK)
{
  "data": [
    "object"
  ]
}

stop enrolled training plan

POST /api/tplans/stop

request body json schema

planID: string
jwtToken: string
Request Example
{
  "planID": "string",
  "jwtToken": "string"
}
200 OK

Success

Response Content-Types: application/json
Response Example (200 OK)
{
  "data": [
    "object"
  ]
}

cancel session of perticular date of enrolled training plan

POST /api/tplans/session/canceled

request body json schema

planID: string
jwtToken: string
targetDate: string
Request Example
{
  "planID": "string",
  "jwtToken": "string",
  "targetDate": "string"
}
200 OK

Success

Response Content-Types: application/json
Response Example (200 OK)
{
  "data": [
    "object"
  ]
}

cancel session of perticular date of enrolled training plan

POST /api/tplans/current/status

request body json schema

planID: string
jwtToken: string
Request Example
{
  "planID": "string",
  "jwtToken": "string"
}
200 OK

Success

Response Content-Types: application/json
Response Example (200 OK)
{
  "data": [
    "object"
  ]
}

calcel enrolled training plan

POST /api/tplans/cancel

request body json schema

planID: string
jwtToken: string
Request Example
{
  "planID": "string",
  "jwtToken": "string"
}
200 OK

Success

Response Content-Types: application/json
Response Example (200 OK)
{
  "data": [
    "object"
  ]
}

show all user's enrolled training plan

POST /api/tplans/all

request body json schema

jwtToken: string
Request Example
{
  "jwtToken": "string"
}
200 OK

Success

Response Content-Types: application/json
Response Example (200 OK)
{
  "data": [
    "object"
  ]
}

recommendations

Recommendations for articles and tips

goals

Set and change various goal types

activity

Activity Logging, Get all Activity Types

Record manually logged information from the user

POST /api/activity/manual

Request Body JSON Schema

Request Example
{
  "data": "object"
}

Manual Log successfully created

Response Content-Types: application/json
Response Example (200 OK)
{
  "data": "object"
}

Record automatically collected information from watch via app

POST /api/activity/auto

Request Body JSON Schema

Request Example
{
  "data": "object"
}

Manual Log successfully created

Response Content-Types: application/json
Response Example (200 OK)
{
  "data": "object"
}

Data to be used to render the Home Screen in the app

POST /api/activity/home

Request Body JSON Schema

Request Example
{
  "jwtToken": "string"
}
200 OK

JSON with goal information and card data

Response Content-Types: application/json
Response Example (200 OK)
{
  "data": {
    "goals": {
      "finance": {
        "balance": "number",
        "dailySpend": "number",
        "limit": "number"
      },
      "nutrition": {
        "calories": "string",
        "carbs": "string",
        "fat": "string",
        "protein": "string"
      },
      "sleep": {
        "bedTime": "string",
        "duration": "string",
        "wakeTime": "string"
      },
      "steps": {
        "activeTime": "number",
        "calories": "number",
        "daily": "number"
      }
    },
    "cards": [
      "object"
    ]
  }
}

Data to be used to render the Home Screen in the app

POST /api/activity/query/daterange

specify daterange for activity summary

Request Example
{
  "dateRange": "string",
  "type": "string"
}

JSON with goal information and card data

Response Content-Types: application/json
Response Example (200 OK)
{
  "data": {
    "activityType": "string",
    "entry_time": "string",
    "expandedData": "object",
    "quantity": "number"
  }
}

Get a list of all supported activity types

GET /api/activity

request body json schema

Request Example
{
  "jwtToken": "string"
}
200 OK

Success

Response Content-Types: application/json
Response Example (200 OK)
[
  {
    "name": "string",
    "dataFields": [
      "string"
    ],
    "calculatedFields": [
      "string"
    ]
  }
]

SOS

SOS

Add SOS user settings

POST api/alert/sos/add

create and update sos settings. Note: add phone number with country code like +918877499276

Add settings for SOS

Request Example
{
  "phoneNumbers": {},
  "emailIds": {},
  "message": "string",
  "isPhoneAlertActive": "boolean",
  "isEmailAlertActive": "boolean",
  "location": {
    "lat": "string",
    "long": "string"
  }
}
201 Created

Added SOS settings

type
500 Internal Server Error

Something went wrong

Response Content-Types: application/json
Response Example (201 Created)
{
  "phoneNumbers": {},
  "emailIds": {},
  "message": "string",
  "isPhoneAlertActive": "boolean",
  "isEmailAlertActive": "boolean",
  "location": {
    "lat": "string",
    "long": "string"
  }
}
Response Example (500 Internal Server Error)
{
  "error": "string"
}
SOS

Trigger SOS

POST api/alert/sos/trigger

This url Triggers notifications to all the specified user's email-ids, devices (as a Push Notification) and phone number. If email alert active then it will trigger email and push notification. iIf phone alert active then it will trigger SMS

Trigger SOS

Request Example
{
  "location": {
    "lat": "string",
    "long": "string"
  }
}
201 Created

SOS status

500 Internal Server Error

Something went wrong

Response Content-Types: application/json
Response Example (201 Created)
{
  "data": {
    "email": "string",
    "notification": "string",
    "phone": "string"
  }
}
Response Example (500 Internal Server Error)
{
  "error": "string"
}

Firmware

Firmware CRUD

POST admin/firmware/create

For admin access No jwt required only api key required

Create New Firmware

Request Example
{
  "data": {
    "version": "string",
    "buildNumber": "string",
    "description": "string",
    "changelogs": "string",
    "fixes": "string",
    "deviceType": "string",
    "releaseDate": "string",
    "size": "string",
    "s3Link": "string",
    "isInReleaseMode": "boolean"
  }
}
201 Created

SOS status

500 Internal Server Error

Something went wrong

Response Content-Types: application/json
Response Example (201 Created)
{
  "data": {
    "version": "string",
    "buildNumber": "string",
    "description": "string",
    "changelogs": "string",
    "fixes": "string",
    "deviceType": "string",
    "releaseDate": "string",
    "size": "string",
    "s3Link": "string",
    "isInReleaseMode": "boolean"
  }
}
Response Example (500 Internal Server Error)
{
  "error": "string"
}

Firmware Update

POST admin/firmware/update

For admin access No jwt required only api key required

Update Firmware

Request Example
{
  "data": {
    "version": "string",
    "buildNumber": "string",
    "description": "string",
    "changelogs": "string",
    "fixes": "string",
    "deviceType": "string",
    "releaseDate": "string",
    "size": "string",
    "s3Link": "string",
    "isInReleaseMode": "boolean"
  }
}
201 Created

SOS status

500 Internal Server Error

Something went wrong

Response Content-Types: application/json
Response Example (201 Created)
{
  "data": {
    "version": "string",
    "buildNumber": "string",
    "description": "string",
    "changelogs": "string",
    "fixes": "string",
    "deviceType": "string",
    "releaseDate": "string",
    "size": "string",
    "s3Link": "string",
    "isInReleaseMode": "boolean"
  }
}
Response Example (500 Internal Server Error)
{
  "error": "string"
}

Firmware Delete

POST admin/firmware/delete

For admin access No jwt required only api key required

Delete Firmware

Request Example
{
  "version": "string",
  "buildNumber": "string",
  "deviceType": "string"
}
201 Created

SOS status

500 Internal Server Error

Something went wrong

Response Content-Types: application/json
Response Example (201 Created)
{
  "data": "string"
}
Response Example (500 Internal Server Error)
{
  "error": "string"
}

Firmware version check

POST api/watches/firmware/check

jwt required

Firmware version check

Request Example
{
  "deviceType": "string"
}
201 Created

SOS status

500 Internal Server Error

Something went wrong

Response Content-Types: application/json
Response Example (201 Created)
{
  "data": {
    "version": "string",
    "buildNumber": "string",
    "description": "string",
    "changelogs": "string",
    "fixes": "string",
    "deviceType": "string",
    "releaseDate": "string",
    "size": "string",
    "s3Link": "string",
    "isInReleaseMode": "boolean"
  }
}
Response Example (500 Internal Server Error)
{
  "error": "string"
}

Firmware download latest

POST api/watches/firmware/download/latest

jwt required. In response you will get pre-signed url of AWS

Firmware download latest

Request Example
{
  "deviceType": "string"
}
201 Created

SOS status

type
500 Internal Server Error

Something went wrong

Response Content-Types: application/json
Response Example (201 Created)
{
  "data": "string"
}
Response Example (500 Internal Server Error)
{
  "error": "string"
}

Download specific firmware

POST api/watches/firmware/download

jwt required. In response you will get pre-signed url of AWS

Firmware download latest

Request Example
{
  "version": "string",
  "buildNumber": "string",
  "deviceType": "string"
}
201 Created

will get pre-signed url

type
500 Internal Server Error

Something went wrong

Response Content-Types: application/json
Response Example (201 Created)
{
  "data": "string"
}
Response Example (500 Internal Server Error)
{
  "error": "string"
}

UV Alert

Record UV alert

POST /api/record/uv

jwt required. To record the UV alert. it won't fail if the uv index api (internal api which calls openUV server to get uv index) get failed. it saves user's real time data in user_uv_log table and openUV data in server_uv_data table

logs UV data

Request Example
{
  "UVA": "number",
  "UVB": "number",
  "UVComp1": "number",
  "UVComp2": "number",
  "angle": "number",
  "lat": "number",
  "long": "number"
}
201 Created

status

500 Internal Server Error

Something went wrong

Response Content-Types: application/json
Response Example (201 Created)
{
  "data": "string"
}
Response Example (500 Internal Server Error)
{
  "error": "string"
}

Notification

Create Custom Notification through config files

POST /api/notification/user/custom

jwt not required. Creation of notification setting dependent on config file based. Each config must have queryId, QueryCondition and templateName

Refer Notification docs resides in muse/wiki github for more details

Request Example
{
  "category": "string",
  "frequency": "string",
  "type": "string",
  "priority": "string",
  "days": {},
  "date": "string",
  "timeToLeave": "string",
  "queryId": "string",
  "queryCondition": {
    "gender": "string",
    "DOB": {
      "gte": "string",
      "lt": "string"
    }
  },
  "templateName": "string",
  "time": "string"
}

status

500 Internal Server Error

Something went wrong

Response Content-Types: application/json
Response Example (201 Created)
{
  "data": {
    "totalUsers": "number",
    "allResponses": {
      "[userID]": {
        "totalDeviceFound": "number",
        "status": "string",
        "totalSuccess": "number",
        "totalFailed": "number",
        "allSuccessMessageIDs": {
          "token": "string",
          "response": "string"
        }
      }
    }
  }
}
Response Example (500 Internal Server Error)
{
  "error": "string"
}

Delete the notification from the database and send the user related data to the user

POST /api/notification/user/delete

jwt not required. Delete the notification from the database and send the user related data to the user

Refer Notification docs resides in muse/wiki github for more details

Request Example
{
  "userID": "string",
  "notificationId": "string",
  "templateName": "string"
}

status

500 Internal Server Error

Something went wrong

Response Content-Types: application/json
Response Example (201 Created)
{
  "data": {
    "totalUsers": "number",
    "allResponses": {
      "[userID]": {
        "totalDeviceFound": "number",
        "status": "string",
        "totalSuccess": "number",
        "totalFailed": "number",
        "allSuccessMessageIDs": {
          "token": "string",
          "response": "string"
        }
      }
    }
  }
}
Response Example (500 Internal Server Error)
{
  "error": "string"
}

update the notification state of the user

POST /api/users/notification/status/update

jwt required

Refer Notification docs resides in muse/wiki github for more details

Request Example
{
  "jwtToken": "string",
  "notificationId": "string",
  "notificationState": "string"
}
201 Created

status

500 Internal Server Error

Something went wrong

Response Content-Types: application/json
Response Example (201 Created)
{
  "data": "string"
}
Response Example (500 Internal Server Error)
{
  "error": "string"
}

ErrorReport

generate error report

POST /api/report

generate error report

generate error report

Request Example
{
  "jwtToken": "string",
  "deviceId": "string",
  "watchId": "string",
  "lastSyncTime": "string",
  "firmwareVersion": "string",
  "deviceType": "string",
  "OSVersion": "string",
  "lastActivityTriggred": "string",
  "errorCode": "string",
  "errorCategory": "string",
  "errorInfo": "string",
  "stackTrace": "string"
}
201 Created

status

500 Internal Server Error

Something went wrong

Response Content-Types: application/json
Response Example (201 Created)
{
  "data": "string"
}
Response Example (500 Internal Server Error)
{
  "error": "string"
}

Schema Definitions

HomeData: object

data: object
goals: object
finance: object
balance: number
dailySpend: number
limit: number
nutrition: object
calories: string
carbs: string
fat: string
protein: string
sleep: object
bedTime: string
duration: string
wakeTime: string
steps: object
activeTime: number
calories: number
daily: number
cards: object[]

Follows the card json spec as defined in wiki

object
Example
{
  "data": {
    "goals": {
      "finance": {
        "balance": "number",
        "dailySpend": "number",
        "limit": "number"
      },
      "nutrition": {
        "calories": "string",
        "carbs": "string",
        "fat": "string",
        "protein": "string"
      },
      "sleep": {
        "bedTime": "string",
        "duration": "string",
        "wakeTime": "string"
      },
      "steps": {
        "activeTime": "number",
        "calories": "number",
        "daily": "number"
      }
    },
    "cards": [
      "object"
    ]
  }
}

TPStatus: object

data: object[]
object
Example
{
  "data": [
    "object"
  ]
}

TPEnroll: object

planID: string
startDate: string
Example
{
  "planID": "string",
  "startDate": "string"
}

JwtToken: object

jwtToken: string
Example
{
  "jwtToken": "string"
}

TPFilter: object

jwtToken: string
Example
{
  "jwtToken": "string"
}

ActivityType: object

name: string
dataFields: string[]
string
calculatedFields: string[]
string
Example
{
  "name": "string",
  "dataFields": [
    "string"
  ],
  "calculatedFields": [
    "string"
  ]
}

ActivityList: array

Example
[
  {
    "name": "string",
    "dataFields": [
      "string"
    ],
    "calculatedFields": [
      "string"
    ]
  }
]

RecordActivity: object

data: object

Contents dependent upon activity

Example
{
  "data": "object"
}

RecordedActivity: object

data: object

Contents dependent upon activity

Example
{
  "data": "object"
}

UserRegister: object

name: string
email: string
password: string
timeZone: string
Example
{
  "name": "string",
  "email": "string",
  "password": "string",
  "timeZone": "string"
}

UserLogin: object

email: string
password: string
timeZone: string
Example
{
  "email": "string",
  "password": "string",
  "timeZone": "string"
}

UserCreated: object

data: object
email: string
name: string
birthdate: string
gender: string
telephone: string
fatPercentage: number
height: number
weight: number
strideLengthWalking: number
strideLengthRunning: number
firstTimeUser: boolean
tokens: object
jwtToken: string
refreshToken: string
expiryDate: string
userPreferences: object
stay_active: object
steps_per_day: string
activeDuration: string
calories_burned: string
sleep_tracking: object
bedtime: string
wake_time: string
sleepDuration: number
finance_tracking: object
currency: string
daily_spend_limit: number
weight_management: object
goal: string
amount: number
sosData: object
id: string
userID: string
phoneNumbers: string[]
string
emailIds: string[]
string
message: string
isPhoneAlertActive: boolean
isEmailAlertActive: boolean
Example
{
  "data": {
    "email": "string",
    "name": "string",
    "birthdate": "string",
    "gender": "string",
    "telephone": "string",
    "fatPercentage": "number",
    "height": "number",
    "weight": "number",
    "strideLengthWalking": "number",
    "strideLengthRunning": "number",
    "firstTimeUser": "boolean",
    "tokens": {
      "jwtToken": "string",
      "refreshToken": "string",
      "expiryDate": "string"
    },
    "userPreferences": {
      "stay_active": {
        "steps_per_day": "string",
        "activeDuration": "string",
        "calories_burned": "string"
      },
      "sleep_tracking": {
        "bedtime": "string",
        "wake_time": "string",
        "sleepDuration": "number"
      },
      "finance_tracking": {
        "currency": "string",
        "daily_spend_limit": "number"
      },
      "weight_management": {
        "goal": "string",
        "amount": "number"
      }
    },
    "sosData": {
      "id": "string",
      "userID": "string",
      "phoneNumbers": [
        "string"
      ],
      "emailIds": [
        "string"
      ],
      "message": "string",
      "isPhoneAlertActive": "boolean",
      "isEmailAlertActive": "boolean"
    }
  }
}

UserData: object

jwtToken: string
email: string
name: string
birthdate: string
gender: string
telephone: string
password: string
Example
{
  "jwtToken": "string",
  "email": "string",
  "name": "string",
  "birthdate": "string",
  "gender": "string",
  "telephone": "string",
  "password": "string"
}

UserToken: object

jwtToken: string
Example
{
  "jwtToken": "string"
}

OtherUserData: object

data: object[]
object
userID: string
email: string
name: string
gender: string
telephone: string
birthdate: string
Example
{
  "data": [
    {
      "userID": "string",
      "email": "string",
      "name": "string",
      "gender": "string",
      "telephone": "string",
      "birthdate": "string"
    }
  ]
}

UserDetails: object

jwtToken: string
data: object
chosen_preferences: string[]
string
preference_data: object
stay_active: object
steps_per_day: string
active_time_in_min: string
calories_burned: string
weight_management: object
goal: string
amount: string
units: string
sleep_tracking: object
sleep_hours: string
bedtime: string
wake_time: string
finance_tracking: object
daily_spend_limit: string
currency: string
Example
{
  "jwtToken": "string",
  "data": {
    "chosen_preferences": [
      "string"
    ],
    "preference_data": {
      "stay_active": {
        "steps_per_day": "string",
        "active_time_in_min": "string",
        "calories_burned": "string"
      },
      "weight_management": {
        "goal": "string",
        "amount": "string",
        "units": "string"
      },
      "sleep_tracking": {
        "sleep_hours": "string",
        "bedtime": "string",
        "wake_time": "string"
      },
      "finance_tracking": {
        "daily_spend_limit": "string",
        "currency": "string"
      }
    }
  }
}

Device: object

jwtToken: string
deviceSerialNumber: string
FCMToken: string
deviceType: string
OSVersion: string
Example
{
  "jwtToken": "string",
  "deviceSerialNumber": "string",
  "FCMToken": "string",
  "deviceType": "string",
  "OSVersion": "string"
}

DeviceUpdate: object

jwtToken: string
deviceSerialNumber: string
FCMToken: string
deviceType: string
OSVersion: string
Example
{
  "jwtToken": "string",
  "deviceSerialNumber": "string",
  "FCMToken": "string",
  "deviceType": "string",
  "OSVersion": "string"
}

DeviceUpdated: object

id: string
userID: string
deviceSerial: string
deviceToken: string
deviceType: string
Example
{
  "id": "string",
  "userID": "string",
  "deviceSerial": "string",
  "deviceToken": "string",
  "deviceType": "string"
}

CreateAPIKey: object

clientName: string
Example
{
  "clientName": "string"
}

APIKey: object

id: string
apiKey: string
expiryDate: string
name: string
Example
{
  "id": "string",
  "apiKey": "string",
  "expiryDate": "string",
  "name": "string"
}

DeleteAPIKey: object

apiKey: string
Example
{
  "apiKey": "string"
}

APIKeyDeleted: object

message: string
Example
{
  "message": "string"
}

CreateWatch: object

jwtToken: string
watchUID: string
hwVersion: string
firmwareVersion: string
Example
{
  "jwtToken": "string",
  "watchUID": "string",
  "hwVersion": "string",
  "firmwareVersion": "string"
}

WatchCreated: object

id: string
watchUID: string
hwVersion: string
firmwareVersion: string
userID: string
Example
{
  "id": "string",
  "watchUID": "string",
  "hwVersion": "string",
  "firmwareVersion": "string",
  "userID": "string"
}

DeleteWatch: object

jwtToken: string
watchUID: string
Example
{
  "jwtToken": "string",
  "watchUID": "string"
}

RecordWater: object

jwtToken: string
quantity: string
units: string
entryTime: string
Example
{
  "jwtToken": "string",
  "quantity": "string",
  "units": "string",
  "entryTime": "string"
}

RecordHeart: object

jwtToken: string
rate: number
entryTime: string
Example
{
  "jwtToken": "string",
  "rate": "number",
  "entryTime": "string"
}

SleepData: object

startTime: string
endTime: string
sleepType: string light, deep, awake
Example
{
  "startTime": "string",
  "endTime": "string",
  "sleepType": "string"
}

RecordSleep: object

jwtToken: string
bedTime: string
wakeTime: string
quality: string
sleepData: SleepData
SleepData
Example
{
  "jwtToken": "string",
  "bedTime": "string",
  "wakeTime": "string",
  "quality": "string",
  "sleepData": [
    {
      "startTime": "string",
      "endTime": "string",
      "sleepType": "string"
    }
  ]
}

Bot: object

id: string
name: string
Example
{
  "id": "string",
  "name": "string"
}

BotList: array

Bot
Example
[
  {
    "id": "string",
    "name": "string"
  }
]

TrainingPlan: object

id: string
activity: string
plan: object
schedule: string
Example
{
  "id": "string",
  "activity": "string",
  "plan": {
    "schedule": "string"
  }
}

TPList: array

Example
[
  {
    "id": "string",
    "activity": "string",
    "plan": {
      "schedule": "string"
    }
  }
]

RecordDailyCheckIns: object

dailyCheckInId: string
day: string
isCompleted: boolean
Example
{
  "dailyCheckInId": "string",
  "day": "string",
  "isCompleted": "boolean"
}

SuccessResponse: object

data: string
Example
{
  "data": "string"
}

ErrorResponse: object

error: string
Example
{
  "error": "string"
}

AddSOS: object

phoneNumbers: array
emailIds: array
message: string
isPhoneAlertActive: boolean
isEmailAlertActive: boolean
location: object
lat: string
long: string
Example
{
  "phoneNumbers": {},
  "emailIds": {},
  "message": "string",
  "isPhoneAlertActive": "boolean",
  "isEmailAlertActive": "boolean",
  "location": {
    "lat": "string",
    "long": "string"
  }
}

TriggerSOS: object

location: object
lat: string
long: string
Example
{
  "location": {
    "lat": "string",
    "long": "string"
  }
}

TriggerSOSResponse: object

data: object
email: string
notification: string
phone: string
Example
{
  "data": {
    "email": "string",
    "notification": "string",
    "phone": "string"
  }
}

AddFirmware: object

data: object
version: string
buildNumber: string
description: string
changelogs: string
fixes: string
deviceType: string
releaseDate: string
size: string
s3Link: string
isInReleaseMode: boolean
Example
{
  "data": {
    "version": "string",
    "buildNumber": "string",
    "description": "string",
    "changelogs": "string",
    "fixes": "string",
    "deviceType": "string",
    "releaseDate": "string",
    "size": "string",
    "s3Link": "string",
    "isInReleaseMode": "boolean"
  }
}

DeleteFirmware: object

version: string
buildNumber: string
deviceType: string
Example
{
  "version": "string",
  "buildNumber": "string",
  "deviceType": "string"
}

FirmwareVersionCheck: object

deviceType: string
Example
{
  "deviceType": "string"
}

DataString: object

data: string
Example
{
  "data": "string"
}

FirmwareSpecificVersionCheck: object

version: string
buildNumber: string
deviceType: string
Example
{
  "version": "string",
  "buildNumber": "string",
  "deviceType": "string"
}

LogUVAlert: object

UVA: number
UVB: number
UVComp1: number
UVComp2: number
angle: number
lat: number
long: number
Example
{
  "UVA": "number",
  "UVB": "number",
  "UVComp1": "number",
  "UVComp2": "number",
  "angle": "number",
  "lat": "number",
  "long": "number"
}

NotificationTrigger: object

category: string
frequency: string
type: string
priority: string
days: array
date: string
timeToLeave: string
queryId: string
queryCondition: object
gender: string
DOB: object
gte: string
lt: string
templateName: string
time: string
Example
{
  "category": "string",
  "frequency": "string",
  "type": "string",
  "priority": "string",
  "days": {},
  "date": "string",
  "timeToLeave": "string",
  "queryId": "string",
  "queryCondition": {
    "gender": "string",
    "DOB": {
      "gte": "string",
      "lt": "string"
    }
  },
  "templateName": "string",
  "time": "string"
}

NotificationTriggerResponse: object

data: object
totalUsers: number
allResponses: object
[userID]: object
totalDeviceFound: number
status: string
totalSuccess: number
totalFailed: number
allSuccessMessageIDs: object
token: string
response: string
Example
{
  "data": {
    "totalUsers": "number",
    "allResponses": {
      "[userID]": {
        "totalDeviceFound": "number",
        "status": "string",
        "totalSuccess": "number",
        "totalFailed": "number",
        "allSuccessMessageIDs": {
          "token": "string",
          "response": "string"
        }
      }
    }
  }
}

NotificationDelete: object

userID: string
notificationId: string
templateName: string
Example
{
  "userID": "string",
  "notificationId": "string",
  "templateName": "string"
}

NotificationStatusUpdate: object

jwtToken: string
notificationId: string
notificationState: string
Example
{
  "jwtToken": "string",
  "notificationId": "string",
  "notificationState": "string"
}

UserLogout: object

jwtToken: string
deviceSerialNumber: string
Example
{
  "jwtToken": "string",
  "deviceSerialNumber": "string"
}

PreSignedUrl: object

contentType: string
requestType: string
contentCategory: string
fileExtension: string
Example
{
  "contentType": "string",
  "requestType": "string",
  "contentCategory": "string",
  "fileExtension": "string"
}

ActivityDaterange: object

dateRange: string
type: string
Example
{
  "dateRange": "string",
  "type": "string"
}

ActivityDaterangeResponse: object

data: object
activityType: string
entry_time: string
expandedData: object
quantity: number
Example
{
  "data": {
    "activityType": "string",
    "entry_time": "string",
    "expandedData": "object",
    "quantity": "number"
  }
}

RefreshJWT: object

jwtToken: string
refreshToken: string
timeZone: string
Example
{
  "jwtToken": "string",
  "refreshToken": "string",
  "timeZone": "string"
}

ResetPassword: object

email: string
newPassword: string
token: string
Example
{
  "email": "string",
  "newPassword": "string",
  "token": "string"
}

ForgotPassword: object

email: string
Example
{
  "email": "string"
}

ErrorReport: object

jwtToken: string
deviceId: string
watchId: string
lastSyncTime: string
firmwareVersion: string
deviceType: string
OSVersion: string
lastActivityTriggred: string
errorCode: string
errorCategory: string
errorInfo: string
stackTrace: string
Example
{
  "jwtToken": "string",
  "deviceId": "string",
  "watchId": "string",
  "lastSyncTime": "string",
  "firmwareVersion": "string",
  "deviceType": "string",
  "OSVersion": "string",
  "lastActivityTriggred": "string",
  "errorCode": "string",
  "errorCategory": "string",
  "errorInfo": "string",
  "stackTrace": "string"
}

DailyCheckinStatus: object

dailyCheckInId: string
day: string
isCompleted: boolean
Example
{
  "dailyCheckInId": "string",
  "day": "string",
  "isCompleted": "boolean"
}

UpdateUserData: object

email: string
name: string
username: string
DOB: string
gender: string
telephone: string
fatPercentage: number
height: number
weight: number
strideLengthRunning: number
strideLengthWalking: number
Example
{
  "email": "string",
  "name": "string",
  "username": "string",
  "DOB": "string",
  "gender": "string",
  "telephone": "string",
  "fatPercentage": "number",
  "height": "number",
  "weight": "number",
  "strideLengthRunning": "number",
  "strideLengthWalking": "number"
}

GoogleOAuth: object

Example
{}

UpdateUserGoal: object

userGoals: string
Example
{
  "userGoals": "string"
}

UsrSettings: object

jwtToken: string
lastSyncTime: string
appNotification: object
sosCredentials: object
notificationSettings: object
isNotificationActive: boolean
isPaired: boolean
watchMode: string
smartAlarm: string
secondaryTimezone: string
Example
{
  "jwtToken": "string",
  "lastSyncTime": "string",
  "appNotification": "object",
  "sosCredentials": "object",
  "notificationSettings": "object",
  "isNotificationActive": "boolean",
  "isPaired": "boolean",
  "watchMode": "string",
  "smartAlarm": "string",
  "secondaryTimezone": "string"
}