> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rolearn.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Register

> Create a new RoLearn account

<ParamField body="email" type="string" required>
  User's email address
</ParamField>

<ParamField body="password" type="string" required>
  Password (minimum 6 characters)
</ParamField>

<RequestExample>
  ```bash theme={null}
  curl -X POST https://rolearn.dev/api/auth/register \
    -H "Content-Type: application/json" \
    -d '{"email": "dev@example.com", "password": "securepass123"}'
  ```
</RequestExample>

Registration signs the new account in immediately: the response sets the same
auth cookies as [login](/api-reference/auth-login) and returns the access token
in the body for non-browser clients.

<ResponseExample>
  ```json theme={null}
  {
    "access_token": "eyJhbGciOiJIUzI1NiIs...",
    "token_type": "bearer"
  }
  ```
</ResponseExample>

<Note>
  You can also create an account via OAuth (Google / Roblox / Discord / Twitter-X)
  instead of email + password.
</Note>
