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

# Register

> Create a new account with email and password

<ParamField body="email" type="string" required>
  Email address for the new account.
</ParamField>

<ParamField body="password" type="string" required>
  Password — minimum 8 characters.
</ParamField>

<ParamField body="username" type="string">
  Optional display name. Auto-generated from email if omitted.
</ParamField>

## Request

```bash theme={null}
curl -X POST https://elumenta.ru/api/v2/auth/register \
  -H "Content-Type: application/json" \
  -d '{"email": "user@example.com", "password": "secure_pass123", "username": "myname"}'
```

## Response

```json theme={null}
{
  "message": "Registration successful. Check your email to verify your account.",
  "user_id": 12345
}
```

A verification email is sent automatically. The account is functional immediately, but some features require a verified email. See [Verify Email](/en/api-reference/auth/verify-email).

## Errors

| Code  | Meaning                             |
| ----- | ----------------------------------- |
| `409` | Email already registered            |
| `422` | Password too short or invalid email |
