Resources

User

The current session user.


The User object

// user object
{
  "id": "usr_1234567890",
  "created": 1670636064,
  "last_login": 1708348174,
  "username": "jamesdoe",
  "name": "James Doe",
  "email": "jamesdoe@acmecorp.com",
  "avatar": "https://cdn.backstack.com/avatars/usr_1234567890.jpg"
}
PropertyTypeDescription
idStringThe user ID.
createdIntegerTimestamp of when the user was created.
last_loginIntegerTimestamp of when the user last logged in.
usernameStringThe users public username.
nameStringThe users name.
emailStringThe users email address.
avatarStringThe URL for the users avatar image.

Create a user

Users are added to accounts with assigned roles. See the account user workflow for more information.


Read a user

Retrieves the current session user information.

Request

GET /v1/auth/user

Response

The User object.


Update a user

Request

POST /v1/auth/user
{
  "name": "Jason Doe",
  ...
}
ParameterTypeNote
usernameRequired stringMinimum 8 characters. Cannot be the same as the password.
passwordRequired stringMinimum 8 characters. Cannot be the same as the username.
nameRequired string
emailRequired string

The API updates only the parameters that are submitted. Submitting an empty value deletes a parameter. If a required value is empty, the existing value is retained.

See the account user workflow for updating user information related to the account relationship (e.g. roles).

Response

The User object.


Delete a user

Deletes the current user and all account user relationships, and terminates the session.

Previous
Timezones