Users

Retrieve users in the active account and invite new users.
View as Markdown

Users are managed within the active account. You can see who has access to the account, invite a new user, inspect a specific user, or remove a user from the account.

Retrieve users

Retrieve the users available in the active account.

GET
/users
curl https://api.hi.umnai.com/users \
-H "Authorization: Bearer <token>"
Response
{
"data": [
{
"id": "f5f1b8e8a885b8ad01a717783f381411",
"name": "Sample User",
"email": "newsampleuser@email.com",
"roles": [
{
"id": "f1b885dd888ac3d460e0195938e804ea",
"name": "Sample Role"
}
],
"created_at": "2026-03-27T10:01:11.517744Z",
"created_by": {
"id": "eca422469dc3270625bf646df3472a45",
"name": "Sample User"
}
}
],
"pagination": {
"total_items": 1,
"items_per_page": 10,
"current_page": 1,
"total_pages": 1
}
}

Use a returned user id when you need to retrieve or remove a specific user.

Invite a user

Invite a user to the active account.

You need the user’s name, email address, and at least one role ID. Retrieve available roles first if you do not already have the role ID to assign.

POST
/users
curl -X POST https://api.hi.umnai.com/users \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "Sample User",
"email": "newsampleuser@email.com",
"role_ids": [
"f670a2aede034d459fa39fe386e963f5"
]
}'
Response
{
"id": "ee11cbb19052e40b07aac0ca060c23ee",
"name": "Sample User",
"email": "newsampleuser@email.com",
"roles": [
{
"id": "e67fcb747ed5e2929d2711dabf714080",
"name": "Sample Role"
}
],
"created_at": "2026-03-03T09:22:47.858632Z",
"created_by": {
"id": "dad46b2058752ffde5eaf02f1eb6abd5",
"name": "Sample User"
}
}

Retrieve a user

Retrieve a specific user by their id.

GET
/users/:userId
curl https://api.hi.umnai.com/users/userId \
-H "Authorization: Bearer <token>"
Response
{
"id": "ee11cbb19052e40b07aac0ca060c23ee",
"name": "Sample User",
"email": "newsampleuser@email.com",
"roles": [
{
"id": "e67fcb747ed5e2929d2711dabf714080",
"name": "Sample Role"
}
],
"created_at": "2026-03-27T10:01:11.517744Z",
"created_by": {
"id": "dad46b2058752ffde5eaf02f1eb6abd5",
"name": "Sample User"
}
}

Remove a user

Delete a user by their id within the active account.

DELETE
/users/:userId
curl -X DELETE https://api.hi.umnai.com/users/userId \
-H "Authorization: Bearer <token>"

Deleting a user changes account access. Make sure you are using the correct user id before sending the request.