Skip to main content
Skip table of contents

Update of a user. VMS Billing API

User update

JSON
{
    "login": "test@mail.com",
    "password": "qweasdzxc",
    "status": "active",
    "billing_info": {
        "billing_id": "123123123",
        "billing_extra": []
    },
    "billing_properties": [
        {
            "type": "phone",
            "value": "+80283289362"
        }
    ],
    "permissions_to_attach": [
        "archives-show",
        "archives-download"
    ],
    "permissions_to_detach": [
        "archives-preview-download"
    ]
}

PATCH /api/v1/billing/user/manage

Parameters

string login – user login


string password – password


string status – user status


array billing_info - Additional information about a user received from billing


string properties, [value] - property value


array permissions_to_attach – List of permissions to attach


array permissions_to_detach – List of permission names to detach

200 OK

Returns the user object

JSON
{
    "id": 1,
    "login": "test@mail.com",
    "name": null,
    "type": "type_value",
    "status": "active",
    "created_at": "2023-05-02T10:18:50.000000Z",
    "updated_at": "2023-05-02T10:18:50.000000Z",
    "deleted_at": null,
    "can_update_password": false,
    "billing_properties": [
        {
            "type": "phone",
            "value": "+80283289362"
        }
    ]
}

422 Unprocessable Entity

Returns a JSON object with an error. See details in the Validation article.

JSON
{
    "message": "There will be no informative message here",
    "errors": {
        "any_key": [
            "The cause of the error will be described here"
        ]
    }
}
cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/v1/billing/user/manage' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "login": "string",
    "password": "string",
    "status": "string",
    "billing_info": [],
    "properties": "string",
    "permissions_to_attach": [],
    "permissions_to_detach": []
}'
PHP
PHP
$data = array (
  'login' => 'string',
  'password' => 'string',
  'status' => 'string',
  'billing_info' => 
  array (
  ),
  'properties' => 'string',
  'permissions_to_attach' => 
  array (
  ),
  'permissions_to_detach' => 
  array (
  ),
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'PATCH',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/v1/billing/user/manage', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.