Skip to main content
POST
/
api
/
admin
/
user
Create a new user in the admin system. Users get 15 credits when created. When plan set to 'sdk' with a valid institution (your digital twin _id), user is automatically enrolled into the instance
curl --request POST \
  --url http://localhost:3000/api/admin/user \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "jsmith@example.com",
  "fname": "<string>",
  "lname": "<string>",
  "status": "active",
  "plan": "free",
  "credits": 123,
  "accountType": "user",
  "picture": "<string>",
  "password": "<string>",
  "institution": "<string>",
  "remember_history_count": 123,
  "mustChangePassword": true
}'
{
  "success": true,
  "id": "<string>",
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

JWT token passed in x-access-token header

Body

application/json
email
string<email>
required
fname
string
required
lname
string
required
status
enum<string>
required
Available options:
active,
inactive
plan
enum<string>
required
Available options:
free,
sdk
accountType
enum<string>
required
Available options:
user,
admin
password
string
required
institution
string
required
credits
integer
picture
string<uri>
remember_history_count
integer
mustChangePassword
boolean

Response

201 - application/json

User created successfully

success
boolean
id
string
message
string