Skip to main content
POST
/
v2
/
UserCreate
Create a new user
curl --request POST \
  --url http://localhost:3000/v2/UserCreate \
  --header 'Content-Type: application/json' \
  --header 'X-Bunker-Token: <api-key>' \
  --data '
{
  "profile": {},
  "groupname": "<string>",
  "groupid": 123,
  "rolename": "<string>",
  "roleid": 123,
  "slidingtime": "<string>",
  "finaltime": "<string>",
  "request_metadata": {}
}
'
{
  "status": "ok",
  "token": "<string>"
}

Authorizations

X-Bunker-Token
string
header
required

API token for authentication

Body

application/json
profile
object
required

User profile information

groupname
string

Name of the group to assign the user to

groupid
integer

ID of the group to assign the user to

rolename
string

Name of the role to assign the user to

roleid
integer

ID of the role to assign the user to

slidingtime
string

Sliding time period for user record retention (e.g., '30d', '1y')

finaltime
string

Absolute expiration time for user record

request_metadata
object

Additional metadata for the request

Response

200 - application/json

User created successfully

status
string
Example:

"ok"

token
string

User's unique token