Skip to content
SoulFire LogoSoulFire

Create user

POST
/v1/users

Creates a new user account in the system.

Authorization

headerAuthorizationBearer <JWT>

Preferred API authentication. Use a JWT with the api audience.

Request Body

application/json
  1. body

Request message for creating a new user account in the SoulFire system. The created user will have no password; authentication is done via JWT tokens.

username*string

The username for the new user. Must be lowercase, between 3 and 32 characters. Must begin with an alphanumeric character, followed by alphanumeric characters or dashes, and end with an alphanumeric character. Must be unique across all users.

role*string

The role to assign to the user. Determines what permissions the user has. ADMIN users have all permissions, while USER role has limited permissions controlled by server settings.

Value in"ADMIN""USER"
email*string

The email address for the user. Must be a valid email format and unique across all users. Maximum length is 255 characters.

Formatemail

Response Body

Response message returned after successfully creating a new user.

application/json
  1. response

Response message returned after successfully creating a new user.

id*string

The unique identifier (UUID) assigned to the newly created user. This ID should be used for all subsequent operations on this user.

Formatuuid
Example Request
curl -X POST 'http://127.0.0.1:38765/v1/users' \
  -H 'Content-Type: application/json' \
  -d '{
  "username": "",
  "role": "ADMIN",
  "email": ""
}'
Example Response
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}

Was this page helpful?