Join BoxWorks 2024 to discover what's possible with content and AI!

Register now!

Remove legal hold policy

delete
https://api.box.com/2.0
/legal_hold_policies/:legal_hold_policy_id

Delete an existing legal hold policy.

This is an asynchronous process. The policy will not be fully deleted yet when the response returns.

Request

bearer [ACCESS_TOKEN]
application/json

Path Parameters

Response

none

A blank response is returned if the policy was successfully deleted.

application/jsonClient error

An unexpected client error.

delete
Remove legal hold policy
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

cURL
curl -i -X DELETE "https://api.box.com/2.0/legal_hold_policies/324432" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
TypeScript Gen
await client.legalHoldPolicies.deleteLegalHoldPolicyById(legalHoldPolicy.id);
Python Gen
client.legal_hold_policies.delete_legal_hold_policy_by_id(legal_hold_policy.id)
.NET Gen
await client.LegalHoldPolicies.DeleteLegalHoldPolicyByIdAsync(legalHoldPolicyId: legalHoldPolicy.Id);
Swift Gen (Beta)
try await client.legalHoldPolicies.deleteLegalHoldPolicyById(legalHoldPolicyId: legalHoldPolicy.id)
Java
BoxLegalHoldPolicy policy = new BoxLegalHoldPolicy(api, id);
policy.delete();
Python
client.legal_hold_policy(policy_id='12345').delete()
print('Legal hold policy was deleted!')
.NET
await client.LegalHoldPoliciesManager.DeleteLegalHoldPolicyAsync("11111");
Node
client.legalHoldPolicies.delete('11111')
	.then(() => {
		// deletion started — no value returned	
	});
iOS
client.legalHolds.delete() { result: Result<Void, BoxSDKError>} in
    guard case .success = result else {
        print("Error deleting legal hold policy")
        return
    }
    print("Legal hold policy successfully deleted")
}