api/docs/account/register.md

51 lines
1.8 KiB
Markdown
Raw Normal View History

# `/account/register` - POST
Requests a new nerdcult account.
This sends a verification E-Mail which contains a link to the veriication frontend with an verification token as url parameter.
This verification link will time out after 10 minutes.
## HTTP Headers
| Header | Content |
|--------------|--------------------|
| Content-Type | `application/json` |
## Content - JSON
| Field | Description |
|----------|----------------------------------------|
| username | The accounts username / userid. |
| password | The password used for authentication. |
| email | The email address used for validation. |
The username has to alphanumerical.
The password has to meet the following criteria:
- minimum length: 12 characters
- numbers
- special characters
- lowercase letters
- uppercase letters
## Responses
### 200 - Success
The verification request was sent.
### 400 - Error: Bad Request
The request was malformed.
### 403 - Error: Forbidden
Blocked for security reasons.
### 409 - Error: Conflict
The requested username or email is already taken.
__Content - JSON:__
| Field | Description |
|----------|----------------------------------------------------------------------|
| conflict | Can be `username` or `email`, depending on what caused the conflict. |
### 422 - Error: Unprocessable Entity
The email or username is malformed, or the password does not meet the criteria.
__Content - JSON:__
| Field | Description |
|---------|---------------------------------------------------------------------------------|
| problem | Can be `email`, `username` or `password`, depending on what caused the problem. |