v1

latestOpenAPI 3.0.2Apache-2.02026-07-142963051.0 MB
Classifications

Add initial classifications

When an enterprise does not yet have any classifications, this API call initializes the classification template with an initial set of classifications.

If an enterprise already has a classification, the template will already exist and instead an API call should be made to add additional classifications.

post/metadata_templates/schema#classifications

Request body

scope'enterprise' required

The scope in which to create the classifications. This should be enterprise or enterprise_{id} where id is the unique ID of the enterprise.

templateKey'securityClassification-6VMVochwUWo' required

Defines the list of metadata templates.

displayName'Classification' required

The name of the template as shown in web and mobile interfaces.

hiddenboolean

Determines if the classification template is hidden or available on web and mobile devices.

copyInstanceOnItemCopyboolean

Determines if classifications are copied along when the file or folder is copied.

Example request

{
  "scope": "enterprise",
  "templateKey": "securityClassification-6VMVochwUWo",
  "displayName": "Classification",
  "fields": [
    {
      "type": "enum",
      "key": "Box__Security__Classification__Key",
      "displayName": "Classification",
      "options": [
        {
          "key": "Sensitive",
          "staticConfig": {
            "classification": {
              "classificationDefinition": "Sensitive information",
              "colorID": 4
            }
          }
        }
      ]
    }
  ]
}

Response

Returns a new securityClassification metadata template, which contains a Box__Security__Classification__Key field that lists all the classifications available to this enterprise.

idstring required

The ID of the classification template.

type'metadata_template' required

The value will always be metadata_template.

scopestring required

The scope of the classification template. This is in the format enterprise_{id} where the id is the enterprise ID.

templateKey'securityClassification-6VMVochwUWo' required

The value will always be securityClassification-6VMVochwUWo.

displayName'Classification' required

The name of this template as shown in web and mobile interfaces.

hiddenboolean

Determines if the template is always available in web and mobile interfaces.

copyInstanceOnItemCopyboolean

Determines if classifications are copied along when the file or folder is copied.

Example response

{
  "id": "58063d82-4128-7b43-bba9-92f706befcdf",
  "type": "metadata_template",
  "scope": "enterprise_123456",
  "templateKey": "securityClassification-6VMVochwUWo",
  "displayName": "Classification",
  "copyInstanceOnItemCopy": true,
  "fields": [
    {
      "id": "822227e0-47a5-921b-88a8-494760b2e6d2",
      "type": "enum",
      "key": "Box__Security__Classification__Key",
      "displayName": "Classification",
      "options": [
        {
          "id": "46aea176-3483-4431-856c-6b5b13d1cc50",
          "key": "Sensitive",
          "staticConfig": {
            "classification": {
              "classificationDefinition": "Sensitive information",
              "colorID": 4
            }
          }
        }
      ]
    }
  ]
}