Update User API

This API lets you update the details of a user_id.

put
Update User API

https://api.roam.ai/v1/api/user/
Request
Response
Request
Headers
Api-key
required
string
Auth-key E.g.- 33223kjhdcscijhb5sdbsdmjsdcbj5f
Body Parameters
user_id
required
string
Enable or disable events data for the given user_id. E.g.- 5d9450ace47bae6d70064a9b
description
optional
string
Update user description. E.g.- “test user”
geofence_events
optional
boolean
Enable or disable geofence_events. E.g.- true
trips_events
optional
boolean
Enable or disable trips_events. E.g.- true
location_events
optional
boolean
Enable or disable location_events. E.g.- true
nearby_events
optional
boolean
Enable or disable nearby_events. E.g.- true
event_listener
optional
boolean
Enable or disable event_listener. E.g.- true
location_listener
optional
boolean
Enable or disable location_listener. E.g.- true
Response
200: OK
{
"status": true,
"msg": "Success.",
"code": 200,
"data": {
"id": "60b90dd651efb070950db2e9",
"account_id": "60af304c51efb03cdde65042",
"app_id": "60af306a8ce7db2392eb7a75_1",
"device_token": "d1_nRSCRgMI:APA91bFgVQ8BJqVJsuGF7CbFDfyiMSLgL6c0mW_GHVfeBcjEraRA6lJfreGqKSMzsvNE7ARJn-8V8_mbyL_Bwyy0ScKtjauarg84MyZlgRahszRVPr69-FgdvSx5xi699YGcXz8nfTnb",
"device_uuid": null,
"description": "ROAM111",
"brand": "xiaomi",
"model": "Redmi Note 7",
"group_id": null,
"os_version": "28",
"sdk_version": "3.1.6",
"device_arn": "arn:aws:sns:us-east-1:218937252071:endpoint/GCM/app_60af306a8ce7db2392eb7a75_1_a678d41d-a66f-442b-90e5-1564b6c88c34/5b73758f-cc96-373a-a2dc-400d8c8f5685",
"geofence_events": false,
"motion_events": false,
"location_events": false,
"trips_events": false,
"nearby_events": false,
"location_listener": false,
"event_listener": false,
"metadata": {
"name": "ROAM123"
},
"is_deleted": false,
"created_at": "2021-06-03T17:13:58.830",
"updated_at": "2021-07-02T07:44:38.781"
}
}

Sample Request

curl --location --request PUT 'https://api.roam.ai/v1/api/user/' \
--header 'Content-Type: application/json' \
--header 'APi-Key: 63598c5b3aa84f14914013709402bbc9' \
--data-raw '{
"user_id": "60b90dd651efb070950db2e0",
"description": "ROAM111",
"metadata" :{"name": "ROAM123" },
"geofence_events": false,
"motion_events": false,
"location_events": false,
"trips_events": false,
"nearby_events": false,
"location_listener": false,
"event_listener": false
}'