fbpx
POSThttps://api.spotinst.io/setup/user/

Create a new user and link it to the creator’s organization (the organization ID from the personal token attached to the API call).
If the role is a viewer, the user is also linked to the default account for the organization.

Parameter Type Description
generateToken Boolean

if True, then the Response will include”personalAccessToken” string

Body Attributes


Attribute Type Description
firstName * String

First Name of the user

Example: test
lastName * String

Last Name of the user

Example: test
email * String

Email of the user

Example: test@gmail.com
password * String

Password of the user

role * String

Role to be associated with the user

Example: admin/viewer
Request

Headers
{
    "Authorization": "Bearer ${token}",
    "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{ 
    "firstName": "Test", 
    "lastName": "Test", 
    "email": "test@gmail.com", 
    "password": "password1234!", 
    "role": "viewer"
}
Response - 200

Headers
{
    "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
    "request": {
        "id": "47330a6f-f826-49ef-867c-1a7d7b38391e",
        "url": "/setup/user/",
        "method": "POST",
        "timestamp": "2018-07-25T16:53:05.584Z"
    },
    "response": {
        "status": {
            "code": 200,
            "message": "OK"
        },
        "kind": "spotinst:setup:user",
        "items": [
            {
                "id": 9056,
                "firstName": "Test",
                "lastName": "Test",
                "displayName": "Test Test",
                "email": "test@gmail.com",
                "organizationId": 606079860000,
                "personalAccessToken" : ""
            }
        ],
        "count": 1
    }
}