Syntax
bool deactivateAccount ( string api_key, int account_id );
Parameters
api_key
(string)The key required to access the API. See Getting Started for more information.
account_id
(int)The ID of the Account to deactivate.
Return Value
Returns true on success.
Examples
$api = new Api($url, 'YOURAPIKEY');
$account_id = 12345;
$result = $api->invokeMethod('deactivateAccount', $account_id);
$account_id = 12345;
$result = $api->invokeMethod('deactivateAccount', $account_id);
{
"id": 1,
"method": "deactivateAccount",
"params": [
"YOURAPIKEY",
12345
]
}
"id": 1,
"method": "deactivateAccount",
"params": [
"YOURAPIKEY",
12345
]
}
{
"id": 1,
"result": true,
"error": null
}
"id": 1,
"result": true,
"error": null
}
Remarks
When the Account is deactivated, Account Users cannot log in to the system.
Error Codes
This method may return the following error codes in addition to the standard error codes:
Code | Error | Description |
---|---|---|
302 |
Undefined Method Error | Deactivation has failed. Please try again later. |
310 |
Invalid Method Parameters | One or more of the parameters you have passed are invalid. |
321 |
Administrative access denied | You do not have access to deactivate the Account. |