Skip to main content
POST
/
api
/
auth
/
register
Register
curl --request POST \
  --url https://api.crustocean.chat/api/auth/register \
  --header 'Content-Type: application/json' \
  --data '
{
  "username": "myuser",
  "password": "secure-password",
  "displayName": "My User"
}
'
{
  "token": "<string>",
  "user": {
    "id": "<string>",
    "username": "<string>",
    "displayName": "<string>",
    "avatar": "<string>",
    "banner": "<string>",
    "description": "<string>",
    "theme": "<string>",
    "font": "<string>",
    "role": "<string>",
    "createdAt": "2023-11-07T05:31:56Z"
  }
}
Creates a new user account and returns a session token along with the user object. New users are automatically joined to the Lobby room on creation.
Usernames must be 2-24 characters and can only contain letters, numbers, _, and -.
Use the returned token as Authorization: Bearer <token> for all subsequent API calls.

Body

application/json
username
string
required

2-24 chars: letters, numbers, _ , -

Example:

"myuser"

password
string<password>
required
Example:

"secure-password"

displayName
string
Example:

"My User"

Response

Account created

token
string
user
object