POST /user/balance
Description
The method returns the current balance of the account (the group the user belongs to). A token is required, see Authorization.
Request format
- HTTP method:
POST - URL:
/user/balance - Content Type:
application/json
Authorization
Pass the token in one of two ways:
- the
token: <jwt-token>header — a temporary JWT token obtained withuser/login; - the
tokenfield in the request body — a permanent API token (UUID) from your account.
Without a token the request returns 401 access denied.
Example Request (cURL)
curl -X POST "https://api.neuro-vision.ru/v1/user/balance" -H "Content-Type: application/json" -H "token: <jwt-token>" Example Answers
Success (200 OK)
{
"status": "ok",
"message": "balance",
"balance": 1250.5
} | Field | Type | Description |
|---|---|---|
| balance | number | Current account balance; 0 when there are no funds |
Error (400 Bad Request)
{
"message": "invalid schema",
"status": "error"
} Error (400 Bad Request) — the user is not in a group
{
"message": "Access denied",
"status": "error"
} Error (401 Unauthorized)
{
"message": "access denied",
"status": "error"
}