POST /token/update
Description
The method allows you to change the expiration date of a user's permanent access token by its identifier. A token is required, see Authorization.
Request format
- HTTP method:
POST - URL:
/token/update - 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.
Request Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| token | string | — | Permanent API token (UUID), if the token header is not sent |
| token_id | string | ✅ | Token identifier (UUID) |
| expires | string | ✅ | New token expiration date (ISO 8601 string) |
Example Request (cURL)
curl -X POST "https://api.neuro-vision.ru/v1/token/update" -H "Content-Type: application/json" -H "token: <jwt-token>" -d '{"token_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "expires": "2025-12-31T23:59:59.000Z"}' Example Answers
Success (200 OK)
{
"status": "ok",
"token": {
"expires": "2025-12-31T23:59:59.000Z",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
} In the response, token.expires is the expiration date in ISO 8601, or the string "never" if the token has no expiration.
Error (400 Bad Request)
{
"message": "invalid schema",
"status": "error"
} Error (401 Unauthorized)
{
"message": "access denied",
"status": "error"
}