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"
}
Property | Type | Description |
---|---|---|
id | String | The user ID. |
created | Integer | Timestamp of when the user was created. |
last_login | Integer | Timestamp of when the user last logged in. |
username | String | The users public username. |
name | String | The users name. |
email | String | The users email address. |
avatar | String | The 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",
...
}
Parameter | Type | Note |
---|---|---|
username | Required string | Minimum 8 characters. Cannot be the same as the password. |
password | Required string | Minimum 8 characters. Cannot be the same as the username. |
name | Required string | |
email | Required 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.