How to Enable Tree Security
You can enable tree security on an object by setting a value for the security_tree_object and tree_assignment_object_name attributes with the Vault API’s Execute MDL Script endpoint. You can also execute MDL commands with Vault Toolbox.
For example, the following code enables tree security on the campaign__c custom object:
ALTER Object campaign__c (
security_tree_object('Object.security_tree__c'),
tree_assignment_object_name('user_tree_assignment')
);