Syntax
bool deleteFolder( string api_key, int folder_id );
Parameters
api_key
(string)The key required to access the API. See Getting Started for more information.
folder_id
(int)The ID of the Folder to delete.
Return Value
Returns true on success.
Examples
$folder_id = 1234567;
// API Call
$api = new Api($url, 'YOURAPIKEY');
$api->invokeMethod('deleteFolder', $folder_id);
// API Call
$api = new Api($url, 'YOURAPIKEY');
$api->invokeMethod('deleteFolder', $folder_id);
{
"id": 1,
"method": "deleteFolder",
"params": [
"YOURAPIKEY",
1234567
]
}
"id": 1,
"method": "deleteFolder",
"params": [
"YOURAPIKEY",
1234567
]
}
{
"id": 1,
"result": true,
"error": null
}
"id": 1,
"result": true,
"error": null
}
Error Codes
This method may return the following error codes in addition to the standard error codes:
Code | Error | Description |
---|---|---|
306 |
Unable to Load Folder | folder_id is not a valid folder. |
323 |
Unable to Delete Folder: The folder is not empty | folder_id is not an empty folder. |
323 |
Unable to Delete Folder: You cannot delete the last Folder | The last Folder cannot be deleted. |
302 |
Undefined Error | An internal error occurred. |