Skip to main content

Users and roles

Operations​

OperationScopeDescription
GET /rolesread:rolesA paged list of the roles available in the tenant.
GET /usersread:usersA paged, filterable list of users.
GET /users/{username}read:usersA single user.
POST /userswrite:usersCreate a user.
PATCH /users/{username}write:usersUpdate a user.

Creating a user​

POST /identity-management/acme/users
Content-Type: application/json

{
"username": "dlopez",
"password": "<initial password>",
"email": "dana.lopez@example.com",
"agentCode": "A1051",
"roles": ["Agent"],
"status": "Approved"
}
FieldNotes
usernameRequired. Must be unique in the tenant.
passwordThe initial password. Must meet the password policy.
emailMust not belong to another user.
agentCodeLinks the user to an agent in the Agency Management API.
rolesRole names from GET /roles.
statusPending or Approved. If left out, the tenant's default is used.
caution

Send passwords only over HTTPS, never log them, and let users choose their own password on first sign-in where you can.

Updating a user​

PATCH /users/{username} accepts password, email, agentCode, roles and status, following the partial update rules. When you send roles, it replaces the user's whole set of roles.

Finding users​

GET /users filters:

ParameterDescription
emailFilter by email.
agentCodeFilter by linked agent.
statusPending or Approved.
roleUsers with this role.
minCreatedAt, maxCreatedAtA creation time range (UTC).
sortfield:direction. Fields: username, email, agentCode, createdAt.
pageIndex, pageSizeSee Pagination.

User statuses​

StatusMeaning
PendingCreated but waiting for approval. The user can't sign in yet.
ApprovedActive and able to sign in.