docs(api): updated the verify endpoint
This commit is contained in:
parent
dc907bcb07
commit
2d12303bbc
|
@ -1,43 +1,62 @@
|
|||
# `/account/tokens` - GET
|
||||
|
||||
Lists all active auth tokens for the account.
|
||||
|
||||
## HTTP Headers
|
||||
|
||||
| Header | Content |
|
||||
|---------------|--------------------|
|
||||
|---------------|------------------|
|
||||
| Authorization | `Bearer {token}` |
|
||||
|
||||
## Responses
|
||||
|
||||
### 200 - Success
|
||||
|
||||
__Content - JSON:__
|
||||
|
||||
| Field | Description |
|
||||
|--------|-------------------------------------------------------------------------------------------------|
|
||||
| tokens | A list of (token, expiration date) pairs. The expiration date is given as a UTC UNIX timestamp. |
|
||||
|
||||
### 401 - Error: Unauthorized
|
||||
|
||||
The provided auth token doesn't allow you to perform this operation.
|
||||
|
||||
### 403 - Error: Forbidden
|
||||
|
||||
Blocked for security reasons.
|
||||
|
||||
|
||||
# `/account/tokens` - DELETE
|
||||
|
||||
Deletes a token of the authenticated account.
|
||||
|
||||
## HTTP Headers
|
||||
|
||||
| Header | Content |
|
||||
|---------------|--------------------|
|
||||
| Authorization | `Bearer {token}` |
|
||||
| Content-Type | `application/json` |
|
||||
|
||||
## Content - JSON
|
||||
|
||||
| Field | Description |
|
||||
|-------|-----------------------------------|
|
||||
| token | The token that should be deleted. |
|
||||
|
||||
## Responses
|
||||
|
||||
### 200 - Success
|
||||
|
||||
The token was deleted.
|
||||
|
||||
### 401 - Error: Unauthorized
|
||||
|
||||
The provided auth token doesn't allow you to perform this operation.
|
||||
|
||||
### 403 - Error: Forbidden
|
||||
|
||||
Blocked for security reasons.
|
||||
|
||||
### 404 - Error: Not Found
|
||||
|
||||
The token that should be deleted wasn't found.
|
|
@ -1,22 +1,37 @@
|
|||
# `/account/verify` - POST
|
||||
|
||||
Verifies a requested account.
|
||||
|
||||
## HTTP Headers
|
||||
|
||||
| Header | Content |
|
||||
|--------------|--------------------|
|
||||
| Content-Type | `application/json` |
|
||||
|
||||
## Content - JSON
|
||||
|
||||
| Field | Description |
|
||||
|-------|--------------------------------------------------------------------------------|
|
||||
| token | The verification token you received via an email after requesting the account. |
|
||||
|
||||
## Responses
|
||||
|
||||
### 200 - Success
|
||||
The account was verified. You can login now.
|
||||
|
||||
The account was verified.
|
||||
|
||||
| Field | Description |
|
||||
|-------|--------------------------------------------------|
|
||||
| token | An authorization token for the verified account. |
|
||||
|
||||
### 400 - Error: Bad Request
|
||||
|
||||
The request was malformed.
|
||||
|
||||
### 403 - Error: Forbidden
|
||||
|
||||
Blocked for security reasons.
|
||||
|
||||
### 404 - Error: Forbidden
|
||||
|
||||
The provided token is unknown.
|
Loading…
Reference in New Issue