Account Endpoints
/account/users
Accounts can have multiple users with different roles.
List users
GET /account/users
Provides a record list of users for the active account.
{
"success": true,
"message": "",
"payload": {
"list": [
{
"id": "usr_demoCosmoKramer",
"created": 1736473352,
"email": "kramer@unemployment.ny.gov",
"name": "Cosmo Kramer",
"editable": true,
"active": false,
"roles": [
"rol_1234567890",
...
],
"roles_csv": "Supporting, ..."
},
...
],
"total": 7,
"search": null,
"filter": "all",
"sort": "name_asc",
"more": null,
"pagination": {
"pages": [
{
"label": 1,
"query": "?records=20&sort=name_asc&filter=all&search=&page=1",
"current": true
}
],
"previous": null,
"next": null
}
}
}
Filters available:
all
or empty - Defaultactive
- Users that have logged in since their creationinactive
- Users that have not logged in since their creation
Sorts available:
name_asc
(A-Z) - Defaultname_desc
(Z-A)email_asc
(A-Z)email_desc
(Z-A)
Create a user
Adds a new user to the account.
POST /account/users
{
"name": "Cosmo Kramer",
"email": "kramer@unemployment.ny.gov",
"roles": [
"rol_1234567890",
...
]
}
The name
and email
parameters are required. The roles
parameter is an optional array of role IDs.
Sends the user an account activation email and returns an Account User object for the new user.
Read a user
GET /account/users/:id
Returns an Account User
object for the id
provided.
{
"success": true,
"message": "",
"payload": {
"id": "usr_1234567890",
"created": 1736010310,
"name": "Cosmo Kramer",
"email": "kramer@unemployment.ny.gov",
"roles": [
"rol_1234567890",
...
],
"editable": false,
"active": true
}
}
The editable
property indicates whether the user can be updated. The API will not allow a user to update their own account values using this endpoint.
The active
property indicates whether the user has logged in since their creation.
Update a user
POST /account/users/:id
{
"name": "Cosmo Kramer",
"email": "kramer@unemployment.ny.gov",
"roles": [
"rol_1234567890",
...
],
"resend_email": true
}
Returns an updated Account User object for the specified user.
Form parameters:
name
- User's full name (required)email
- User's email address (required)roles
- Array of role IDs (optional)resend_email
- Resend the user's account activation email (optional)
Once activated, the user is responsible for maintaining their name
and email
values, and the API will only handle the roles
parameter.
Delete a user
DELETE /account/users/:id
Returns the user id
and name
properties.
{
"success": true,
"message": "User deleted successfully.",
"payload": {
"id": "usr_1234567890",
"name": "Cosmo Kramer"
}
}
If the user has access to other accounts, deleting them from one account will not remove them from the system.