docs(api): precised return code info

This commit is contained in:
antifallobst 2023-08-16 13:23:01 +02:00
parent d1b1532f43
commit e84ec87ea0
Signed by: antifallobst
GPG Key ID: 2B4F402172791BAF
1 changed files with 10 additions and 10 deletions

20
API.md
View File

@ -24,11 +24,11 @@ This verification link will time out after 10 minutes.
#### Responses
##### 200 - Success
The verification request was sent.
##### 400 - Error
##### 400 - Error: Bad Request
The request was malformed.
##### 403 - Error
##### 403 - Error: Forbidden
The password is not matching the requirements.
##### 409 - Error
##### 409 - Error: Conflict
The requested username or email is already taken.
__Content - JSON:__
@ -36,7 +36,7 @@ __Content - JSON:__
|----------|----------------------------------------------------------------------|
| conflict | Can be `username` or `email`, depending on what caused the conflict. |
##### 422 - Error
##### 422 - Error: Unprocessable Entity
Malformed email address.
### `/account/verify` - POST
@ -55,9 +55,9 @@ Verifies a requested account.
#### Responses
##### 200 - Success
The account was verified. You can login now.
##### 400 - Error
##### 400 - Error: Bad Request
The request was malformed.
##### 403 - Error
##### 403 - Error: Forbidden
The provided token is unknown.
### `/account/authenticate` - POST
@ -83,11 +83,11 @@ __Content - JSON:__
|-------|------------------------|
| token | A unique access token. |
##### 400 - Error
##### 400 - Error: Bad Request
The request was malformed.
##### 403 - Error
##### 403 - Error: Forbidden
The provided password was wrong.
##### 404 - Error
##### 404 - Error: Not Found
The provided username was not found.
### `/account/delete` - DELETE
@ -101,5 +101,5 @@ Deletes the account.
#### Responses
##### 200 - Success
The account was deleted.
##### 403 - Errorpassword was wrong
##### 403 - Error: Forbidden
The provided token doesn't allow you to perform this operation.