You can delete a department with the removeDepartment method.
Permissions to run the request: Account Owner, Administrators, Department Administrators.
Department Administrator can delete only the department they manage and its daughter departments.
You can't delete a department if:
- it contains users,
- it is managed by Department Administrator or Author,
- it is the root one.
|credentials (required)||credentials||Read the description of the Credentials object.|
|departmentId (required)||string||The ID of the department that you want to remove.|
|success||bool||'True' if the specified department has been removed.|
|Permission denied||You have no permissions to delete departments.|
|Wrong parameters||The department with the specified ID was not found or it is the root one.|