Skip to main content
Skip table of contents

Update current user

Updates the user and returns the modified object.

PUT /api/v1/users/self

Headers

Accept

application/json

Body

json

JSON
{
    "password": "new_password",
    "password_confirmation": "new_password",
    "current_password": "old_password",
    "language": "ru"
}

passwordrequired

string

new user password

password_confirmationrequired

string

re-enter the new password

current_passwordrequired

string

current user password

languagerequired

string

user language

Response

200

Successful response

JSON
{
    "id": 13,
    "login": "170500",
    "name": "170500",
    "parent_id": null,
    "permissions": [
        {
            "id": 223,
            "name": "any-permission"
        },
        {
            "id": 221,
            "name": "any-permission"
        },
        {
            "id": 222,
            "name": "any-permission"
        },
        {
            "id": 220,
            "name": "any-permission"
        }
    ],
    "created_at": "",
    "updated_at": "2022-04-21 16:37:46",
    "access_token_id": "c862e3c5a5a87d8b2756e4ad44a43f0a71cbf9cf3063cae019802d0b032ee17f32f69364e7aadb23",
    "can_update_password": true,
    "analytic_license": [
        {
            "type": "analytic_l1",
            "type_pretty": "LIC-XXXX-VA-L1",
            "all": 100,
            "free": 98,
            "used": 2
        },
        {
            "type": "analytic_l2",
            "type_pretty": "LIC-XXXX-VA-L2",
            "all": 100,
            "free": 100,
            "used": 0
        },
        {
            "type": "analytic_l3",
            "type_pretty": "LIC-XXXX-VA-L3",
            "all": 100,
            "free": 99,
            "used": 1
        }
    ]
}
401

Authorization token not sent or not valid

422

Returns a JSON object with an error. Validation

JSON
{
    "message": "There will be no informative message here",
    "errors": {
        "any_key": [
            "The cause of the error will be described here"
        ]
    }
}

Example

JSON
curl -k --request POST \
	--url 'https://your-domain/api/v1/users/self' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "password": "string",
    "password_confirmation": "string",
    "current_password": "string",
    "language": "string"
}'

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.