Box Developer Documentation
Latest version

Delete retention policy

delete
https://api.box.com/2.0
/retention_policies/:retention_policy_id

This endpoint is in the version 2024.0. No changes are required to continue using it. For more details, see Box API versioning.

Permanently deletes a retention policy.

Request

bearer [ACCESS_TOKEN]
application/json

Path Parameters

stringin pathrequired
982312

The ID of the retention policy.

Response

none

Returns an empty response when the policy has been deleted.

application/jsonClient error

Returns an error if the policy is non-modifiable or the user does not have the required access to perform the action.

application/jsonClient error

Returns an error if the policy is not found.

application/jsonClient error

An unexpected client error.

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

Request Example

Learn more about Box SDK versionig strategy.


Node/TypeScript v10
await client.retentionPolicies.deleteRetentionPolicyById(retentionPolicy.id);
Python v10
client.retention_policies.delete_retention_policy_by_id(retention_policy.id)
.NET v10
await client.RetentionPolicies.DeleteRetentionPolicyByIdAsync(retentionPolicyId: retentionPolicy.Id);
Swift v10
try await client.retentionPolicies.deleteRetentionPolicyById(retentionPolicyId: retentionPolicy.id)
Java v10
client.getRetentionPolicies().deleteRetentionPolicyById(retentionPolicy.getId())