Create User API

The Create User API creates users corresponding to the project secret API key provided.

Create User API

POST https://api.roam.ai/v1/api/user/

The Create User API creates user who are using your app corresponding to the project secret API key provided.

Headers

Name
Type
Description

Api-key*

string

Auth-key E.g.- 33223kjhdcscijhb5sdbsdmjsdcbj5f

Request Body

Name
Type
Description

app_type*

number

Either 1 or 2 where 1 is for Android and 2 is for iOS

device_token*

string

Device token (can be dummy value initially), the same will be updated once the user is logged in from an actual device.

description

string

The description of the user.

metadata

array

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

{
   "status":true,
   "msg":"User tracking initiated successfully.",
   "code":201,
   "data":{
      "user_id":"62135419cc5d8960bf735b3f",
      "app_id":"61dfb41b06f8a05d35522133_1",
      "description":null,
      "geofence_events":false,
      "location_events":false,
      "trips_events":false,
      "nearby_events":false,
      "location_listener":false,
      "event_listener":false,
      "metadata":null,
      "sdk_version":"0",
      "project_id":"61dfb41b06f8a05d35522133",
      "account_id":"61dfb4030dc55a46ac091ad0"
   }
}

Sample Request

curl --location --request POST 'https://api.roam.ai/v1/api/user/' \
--header 'Api-Key: <YOUR-API-KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "app_type": 1,
    "device_token": "your-device-token",
    "description": "device description",
    "metadata": { }
}'

Last updated