Join the first BoxWorks Hackathon for Good - customers, partners, and the developer community are welcome to participate in the 48 hour Hack to benefit The Nature Conservancy.

Learn more and register!

Retention policy assignment

The retention policy assignment endpoint provides a way for admins to apply a retention policy on a per-folder basis, or place a blanket policy over the entire enterprise.


The unique identifier for this retention policy assignment


Value is always retention_policy_assignment

string / date-time

When the retention policy assignment object was created

A mini user object representing the user that created the retention policy assignment object

The type and id of the content that is under retention. The type can either be folder enterprise, or metadata_template.


The ID of the folder, enterprise, or metadata template the policy is assigned to.


The type of resource the policy is assigned to.

Value is one of folder,enterprise,metadata_template

object array

An array of field objects. Values are only returned if the assigned_to type is metadata_template. Otherwise, the array is blank.


The metadata attribute key id.


The metadata attribute field id. For value, only enum and multiselect types are supported.

A mini retention policy object representing the retention policy that has been assigned to this content


The date the retention policy assignment begins

Response Example

  "id": 11446498,
  "type": "retention_policy_assignment",
  "assigned_at": "2012-12-12T10:53:43-08:00",
  "assigned_by": {
    "id": 11446498,
    "type": "user",
    "login": "",
    "name": "Aaron Levie"
  "assigned_to": {
    "id": "a983f69f-e85f-4ph4-9f46-4afdf9c1af65",
    "type": "metadata_template"
  "filter_fields": [
      "field": "a0f4ee4e-1dc1-4h90-a8a9-aef55fc681d4",
      "value": "0c27b756-0p87-4fe0-a43a-59fb661ccc4e"
  "retention_policy": {
    "id": 12345,
    "type": "retention_policy",
    "disposition_action": "permanently_delete",
    "policy_name": "Some Policy Name",
    "retention_length": 365
  "start_date_field": "upload_date"