Skip to content

Account

Account Management.

Account APIs operate on the user account utilized when obtaining the login AccessToken. If using a CloudAPI token, which provides the owner role capability, the target account can be provided via the accountId request property to most APIs.

Note: Accounts are created by the User.login API when a new user first logs in.


Create

Create an account

This API will create the account record and the account's first user. Subsequent users can be added via the User.create API. .

Endpoint

1
POST /account/create

Authorized User Role

1
user

Request Body

Field Type Required Notes
email string yes A unique, valid email address to use as the master account email address and the first user's email address.
name string yes Account or company name.

Response

Field Type
account Account
user User

Account

Field Type Notes
closed boolean Set to true when account closed.
cloudId string Owning device cloud ID.
created date Date account created.
email string Account email.
id string Unique account ID.
name string Account or company name.

User

Field Type Notes
accountId string Owning account ID.
cloudId string Device cloud ID.
email string User email address.
first string First name.
id string User ID.
last string Surname.
role string Authorized role.

Close

Close account

Close an account and remove all allocated resources. This will remove all users, devices, dashboards, and the account itself. This operation cannot be reversed.

This API can be invoked by a user closing their device manager account. It can also be invoked to close any user account if caller has the owner role via the CloudAPI token. .

Endpoint

1
POST /account/close

Authorized User Role

1
admin

Request Body

Field Type Role Notes
id string owner Override account to close.

Get

Get account

Get an account that match the supplied properties. If no email or id provided, return the logged in account.

Endpoint

1
POST /account/get

Authorized User Role

1
user

Request Body

Field Type Role Notes
id string owner Query by account ID.
email string owner Query by email.

Query String Options

Field Type Notes
filter string Full text string to filter for.
next object Pagination token for the next page.
prev object Pagination token for the previous page.
limit number Number of items to retrieve.
index string Database index to use.
exists boolean Set to true to require the item exists, otherwise set to null to perform an upsert.

Response

Field Type Notes
closed boolean Set to true when account closed.
cloudId string Owning device cloud ID.
created date Date account created.
email string Account email.
id string Unique account ID.
name string Account or company name.

Find

Find accounts

Find a list of accounts that match the supplied properties. If no email or id provided, return list of accounts (requires "owner" role).

Endpoint

1
POST /account/find

Authorized User Role

1
user

Request Body

Field Type Role Notes
id string owner Query by account ID.
email string owner Query by email address.

Query String Options

Field Type Notes
filter string Full text string to filter for.
next object Pagination token for the next page.
prev object Pagination token for the previous page.
limit number Number of items to retrieve.
index string Database index to use.
exists boolean Set to true to require the item exists, otherwise set to null to perform an upsert.

Response

Paged response.

Field Type Notes
data array Array of items.
next string Paged cursor to use for the next page of items.
prev string Pages cursor to use for the previous page of items.

Account

An array of Account items.

Field Type Notes
closed boolean Set to true when account closed.
cloudId string Owning device cloud ID.
created date Date account created.
email string Account email.
id string Unique account ID.
name string Account or company name.

UpdateIdentity

Update the account name and email address.

Endpoint

1
POST /account/updateIdentity

Authorized User Role

1
admin

Request Body

Field Type Role Notes
id string owner
email string Account email address.
name string Account or company name.

Response

Field Type Notes
closed boolean Set to true when account closed.
cloudId string Owning device cloud ID.
created date Date account created.
email string Account email.
id string Unique account ID.
name string Account or company name.