On this page6 sections
POST/api/users/create-userUsersPermission: users.create
Create User
Creates a new user account in Supabase Auth and PostgreSQL within the active tenant. Enforces anti-escalation rules so actors cannot assign roles or permissions above their own level.
Authentication: Requires Authorization: Bearer <ACCESS_TOKEN> (Supabase JWT, OAuth2 M2M token, or integration token).
Request
Provide the following fields in the request payload.
emailstring (email)required
email parameter.
usernamestring | nulloptional
username parameter.
namestring | nulloptional
name parameter.
phonestring | nulloptional
phone parameter.
statusenum('pending' | 'approved' | 'rejected')optional
status parameter.
isActivebooleanoptional
is Active parameter.
roleIdstring (uuid)required
role Id parameter.
userGroupIdstring (uuid) | nulloptional
user Group Id parameter.
outletIdsarray<string (uuid)>optional
outlet Ids parameter.
passwordstringrequired
password parameter.
Responses
Select a status code to inspect schema.
Created — User created and provisioned successfully.application/json
successenum('true')
Success (true).
messagestring
Message.
dataobject | null
Response payload or null.
POST/api/users/create-user
curl -X POST "https://api.invoger.com/api/users/create-user" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{ "email": "cashier.senopati@invoger.com", "username": "cashier_seno", "name": "Siti Rahma", "password": "SecurePassword123!", "roleId": "r2b3c4d5-e6f7-8a9b-0c1d-2e3f4a5b6c7d", "status": "approved", "isActive": true }'Interactive playground
Response
application/json
{
"success": true,
"message": "User created successfully",
"data": {
"id": "c7d8e9f0-1234-5678-9abc-def012345678",
"email": "cashier.senopati@invoger.com",
"username": "cashier_seno",
"name": "Siti Rahma",
"status": "approved",
"isActive": true
}
}