Docs › API Reference › Identity Service › POST /auth/register
POST /auth/register
Create an account using username, email, phone number, and password, supporting three membership joining methods: open registration, invitation registration, and approval. Automatically sends a welcome notification upon successful creation. References: OWASP ASVS V2.2.
Authentication None application/json
Request Body
Schema: dto.RegisterRequest
Field Type Required Example Constraints Description
password
string
Yes
length: 8–256
Password or hash/ciphertext
birth_date
string
No
Birth date (format: "2006-01-02")
client_nonce
string
No
Hash mode: client random nonce
email
string
No
Email
invitation_code
string
No
Invitation code (required in invitation_only mode)
password_transmission
string
No
plain|hash|symmetric|asymmetric
phone
string
No
Phone
tenant_id
string
No
Align with LoginRequest — if filled, overrides header-derived value
username
string
No
length: 3–32
Username
Referenced Schemas
dto.RegisterResponse
User registration result
Field Type Required Example Constraints Description
membership_status
string
No
pending
Member status (pending in approval mode)
message
string
No
registration successful
Message
status
string
No
active
Status
user_id
string
No
usr_abc123
User ID
gitee_com_linmes_authms_base_dto.SimpleResponse
Field Type Required Example Constraints Description
code
integer
No
message
string
No
timestamp
string
No