Box

Box Classifications on Folders API

Classification labels are used for folders that are sensitive or under security restrictions.

Operations 4

GET /folders/{folder_id}/metadata/enterprise/securityClassification-6VMVochwUWo Get classification on folder #
POST /folders/{folder_id}/metadata/enterprise/securityClassification-6VMVochwUWo Add classification to folder #
PUT /folders/{folder_id}/metadata/enterprise/securityClassification-6VMVochwUWo Update classification on folder #
DELETE /folders/{folder_id}/metadata/enterprise/securityClassification-6VMVochwUWo Remove classification from folder #

Documentation

📖
Documentation
https://developer.box.com/reference/get-authorize
📖
Documentation
https://developer.box.com/reference/post-oauth2-token
📖
Documentation
https://developer.box.com/reference/post-files-id-copy
📖
Documentation
https://developer.box.com/reference/post-file-requests-id-copy
📖
Documentation
https://developer.box.com/reference/post-folders-id-copy
📖
Documentation
https://developer.box.com/reference/post-folder-locks
📖
Documentation
https://developer.box.com/reference/post-metadata-templates-schema
📖
Documentation
https://developer.box.com/reference/post-metadata-cascade-policies
📖
Documentation
https://developer.box.com/reference/post-metadata-queries-execute-read
📖
Documentation
https://developer.box.com/reference/post-comments
📖
Documentation
https://developer.box.com/reference/post-collaborations
📖
Documentation
https://developer.box.com/reference/post-tasks
📖
Documentation
https://developer.box.com/reference/post-task-assignments
📖
Documentation
https://developer.box.com/reference/put-files-id--add-shared-link
📖
Documentation
https://developer.box.com/reference/put-folders-id--add-shared-link
📖
Documentation
https://developer.box.com/reference/post-web-links
📖
Documentation
https://developer.box.com/reference/put-web-links-id--add-shared-link
📖
Documentation
https://developer.box.com/reference/post-users
📖
Documentation
https://developer.box.com/reference/post-invites
📖
Documentation
https://developer.box.com/reference/post-groups
📖
Documentation
https://developer.box.com/reference/post-group-memberships
📖
Documentation
https://developer.box.com/reference/post-webhooks
📖
Documentation
https://developer.box.com/reference/post-files-id-metadata-global-boxSkillsCards
📖
Documentation
https://developer.box.com/reference/options-events
📖
Documentation
https://developer.box.com/reference/get-collections-id
📖
Documentation
https://developer.box.com/reference/get-recent-items
📖
Documentation
https://developer.box.com/reference/post-retention-policies
📖
Documentation
https://developer.box.com/reference/post-retention-policy-assignments
📖
Documentation
https://developer.box.com/reference/post-legal-hold-policies
📖
Documentation
https://developer.box.com/reference/post-legal-hold-policy-assignments
📖
Documentation
https://developer.box.com/reference/get-file-version-retentions-id
📖
Documentation
https://developer.box.com/reference/get-file-version-legal-holds-id
📖
Documentation
https://developer.box.com/reference/post-shield-information-barriers-change-status
📖
Documentation
https://developer.box.com/reference/post-shield-information-barrier-reports
📖
Documentation
https://developer.box.com/reference/post-shield-information-barrier-segments
📖
Documentation
https://developer.box.com/reference/post-shield-information-barrier-segment-members
📖
Documentation
https://developer.box.com/reference/post-shield-information-barrier-segment-restrictions
📖
Documentation
https://developer.box.com/reference/get-device-pinners-id
📖
Documentation
https://developer.box.com/reference/post-terms-of-services
📖
Documentation
https://developer.box.com/reference/post-terms-of-service-user-statuses
📖
Documentation
https://developer.box.com/reference/post-collaboration-whitelist-entries
📖
Documentation
https://developer.box.com/

Specifications

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/box:box-classifications-on-folders-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

box-classifications-on-folders-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Box Platform Classifications on folders API
  description: Box Platform provides functionality to provide access to content stored within Box. It provides endpoints for basic manipulation of files and folders, management of users within an enterprise, as well as more complex topics such as legal holds and retention policies.
  termsOfService: https://cloud.app.box.com/s/rmwxu64h1ipr41u49w3bbuvbsa29wku9
  contact:
    name: Box, Inc
    url: https://developer.box.com
    email: devrel@box.com
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: '2024.0'
  x-box-commit-hash: 53bdced3cd
servers:
- url: https://api.box.com/2.0
  description: Box Platform API server.
security:
- OAuth2Security: []
tags:
- name: Classifications on folders
  description: Classification labels are used for folders that are sensitive or under security restrictions.
  x-box-tag: folder_classifications
paths:
  /folders/{folder_id}/metadata/enterprise/securityClassification-6VMVochwUWo:
    get:
      operationId: get_folders_id_metadata_enterprise_securityClassification-6VMVochwUWo
      summary: Get classification on folder
      description: 'Retrieves the classification metadata instance that has been applied to a folder.


        This API can also be called by including the enterprise ID in the URL explicitly, for example `/folders/:id/enterprise_12345/securityClassification-6VMVochwUWo`.'
      parameters:
      - name: folder_id
        in: path
        description: 'The unique identifier that represent a folder.


          The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/folder/123` the `folder_id` is `123`.


          The root folder of a Box account is always represented by the ID `0`.'
        required: true
        schema:
          type: string
        example: '12345'
      responses:
        '200':
          description: Returns an instance of the `securityClassification` metadata template, which contains a `Box__Security__Classification__Key` field that lists all the classifications available to this enterprise.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Classification'
        '403':
          description: Returned when the request parameters are not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientError'
        '404':
          description: 'Returned if the metadata template specified was not applied to this folder or the user does not have access to the folder.


            - `instance_not_found` - The metadata template was not applied to the folder.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientError'
        '405':
          description: Returned when the method was not allowed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientError'
        default:
          description: An unexpected client error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientError'
      x-box-tag: folder_classifications
      tags:
      - Classifications on folders
      x-box-unsupported-on-free-developer: true
      x-codeSamples:
      - lang: curl
        label: Get classification on folder
        source: "curl -i -X GET \"https://api.box.com/2.0/folders/12345/metadata/enterprise/securityClassification-6VMVochwUWo\" \\\n     -H \"authorization: Bearer <ACCESS_TOKEN>\""
      - lang: dotnet
        label: Get classification on folder
        source: 'await client.FolderClassifications.GetClassificationOnFolderAsync(folderId: folder.Id);'
      - lang: swift
        label: Get classification on folder
        source: 'try await client.folderClassifications.getClassificationOnFolder(folderId: folder.id)'
      - lang: java
        label: Get classification on folder
        source: client.getFolderClassifications().getClassificationOnFolder(folder.getId())
      - lang: node
        label: Get classification on folder
        source: await client.folderClassifications.getClassificationOnFolder(folder.id);
      - lang: python
        label: Get classification on folder
        source: client.folder_classifications.get_classification_on_folder(folder.id)
    post:
      operationId: post_folders_id_metadata_enterprise_securityClassification-6VMVochwUWo
      summary: Add classification to folder
      description: 'Adds a classification to a folder by specifying the label of the classification to add.


        This API can also be called by including the enterprise ID in the URL explicitly, for example `/folders/:id/enterprise_12345/securityClassification-6VMVochwUWo`.'
      parameters:
      - name: folder_id
        in: path
        description: 'The unique identifier that represent a folder.


          The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/folder/123` the `folder_id` is `123`.


          The root folder of a Box account is always represented by the ID `0`.'
        required: true
        schema:
          type: string
        example: '12345'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                Box__Security__Classification__Key:
                  description: 'The name of the classification to apply to this folder.


                    To list the available classifications in an enterprise, use the classification API to retrieve the [classification template](/reference/get-metadata-templates-enterprise-securityClassification-6VMVochwUWo-schema) which lists all available classification keys.'
                  type: string
                  example: Sensitive
      responses:
        '201':
          description: Returns the classification template instance that was applied to the folder.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Classification'
        '400':
          description: 'Returns an error when the request body is not valid.


            - `schema_validation_failed` - The request body contains a value for a field that either does not exist, or for which the value or type does not match the expected field type. An example might be an unknown option for an `enum` or `multiSelect` field.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientError'
        '404':
          description: 'Returns an error when the folder or metadata template was not found.


            - `not_found` - The folder could not be found, or the user does not have access to the folder.

            - `instance_tuple_not_found` - The metadata template was not found.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientError'
        '409':
          description: 'Returns an error when an instance of this metadata template is already present on the folder.


            - `tuple_already_exists` - An instance of them metadata template already exists on the folder.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientError'
        default:
          description: An unexpected client error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientError'
      x-box-tag: folder_classifications
      tags:
      - Classifications on folders
      x-box-unsupported-on-free-developer: true
      x-codeSamples:
      - lang: curl
        label: Add classification to folder
        source: "curl -i -X POST \"https://api.box.com/2.0/folders/12345/metadata/enterprise/securityClassification-6VMVochwUWo\" \\\n     -H \"authorization: Bearer <ACCESS_TOKEN>\" \\\n     -H \"content-type: application/json\" \\\n     -d '{\n       \"Box__Security__Classification__Key\": \"Sensitive\"\n     }'"
      - lang: dotnet
        label: Add classification to folder
        source: 'await client.FolderClassifications.AddClassificationToFolderAsync(folderId: folder.Id, requestBody: new AddClassificationToFolderRequestBody() { BoxSecurityClassificationKey = classification.Key });'
      - lang: swift
        label: Add classification to folder
        source: 'try await client.folderClassifications.addClassificationToFolder(folderId: folder.id, requestBody: AddClassificationToFolderRequestBody(boxSecurityClassificationKey: classification.key))'
      - lang: java
        label: Add classification to folder
        source: client.getFolderClassifications().addClassificationToFolder(folder.getId(), new AddClassificationToFolderRequestBody.Builder().boxSecurityClassificationKey(classification.getKey()).build())
      - lang: node
        label: Add classification to folder
        source: "await client.folderClassifications.addClassificationToFolder(folder.id, {\n  requestBody: {\n    boxSecurityClassificationKey: classification.key,\n  } satisfies AddClassificationToFolderRequestBody,\n} satisfies AddClassificationToFolderOptionalsInput);"
      - lang: python
        label: Add classification to folder
        source: "client.folder_classifications.add_classification_to_folder(\n    folder.id, box_security_classification_key=classification.key\n)"
    put:
      operationId: put_folders_id_metadata_enterprise_securityClassification-6VMVochwUWo
      summary: Update classification on folder
      description: 'Updates a classification on a folder.


        The classification can only be updated if a classification has already been applied to the folder before. When editing classifications, only values are defined for the enterprise will be accepted.'
      parameters:
      - name: folder_id
        in: path
        description: 'The unique identifier that represent a folder.


          The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/folder/123` the `folder_id` is `123`.


          The root folder of a Box account is always represented by the ID `0`.'
        required: true
        schema:
          type: string
        example: '12345'
      requestBody:
        content:
          application/json-patch+json:
            schema:
              description: A list containing the one change to make, to update the classification label.
              type: array
              items:
                type: object
                description: The operation to perform on the classification metadata template instance. In this case, it use used to replace the value stored for the `Box__Security__Classification__Key` field with a new value.
                required:
                - op
                - path
                - value
                properties:
                  op:
                    description: The value will always be `replace`.
                    type: string
                    example: replace
                    enum:
                    - replace
                  path:
                    description: Defines classifications available in the enterprise.
                    type: string
                    example: /Box__Security__Classification__Key
                    enum:
                    - /Box__Security__Classification__Key
                  value:
                    description: 'The name of the classification to apply to this folder.


                      To list the available classifications in an enterprise, use the classification API to retrieve the [classification template](/reference/get-metadata-templates-enterprise-securityClassification-6VMVochwUWo-schema) which lists all available classification keys.'
                    type: string
                    example: Sensitive
              required:
              - items
      responses:
        '200':
          description: Returns the updated classification metadata template instance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Classification'
        '400':
          description: 'Returns an error when the request body is not valid.


            - `bad_request` - The request body format is not an array of valid JSON Patch operations.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientError'
        '500':
          description: Returns an error in some edge cases when the request body is not a valid array of JSON Patch items.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientError'
        default:
          description: An unexpected client error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientError'
      x-box-tag: folder_classifications
      tags:
      - Classifications on folders
      x-box-unsupported-on-free-developer: true
      x-codeSamples:
      - lang: curl
        label: Update classification on folder
        source: "curl -i -X PUT \"https://api.box.com/2.0/folders/12345/metadata/enterprise/securityClassification-6VMVochwUWo\" \\\n     -H \"authorization: Bearer <ACCESS_TOKEN>\" \\\n     -H \"content-type: application/json-patch+json\" \\\n     -d '[{\n       \"op\": \"replace\",\n       \"path\": \"/Box__Security__Classification__Key\",\n       \"value\": \"Internal\"\n     }]'"
      - lang: dotnet
        label: Update classification on folder
        source: 'await client.FolderClassifications.UpdateClassificationOnFolderAsync(folderId: folder.Id, requestBody: Array.AsReadOnly(new [] {new UpdateClassificationOnFolderRequestBody(value: secondClassification.Key)}));'
      - lang: swift
        label: Update classification on folder
        source: 'try await client.folderClassifications.updateClassificationOnFolder(folderId: folder.id, requestBody: [UpdateClassificationOnFolderRequestBody(value: secondClassification.key)])'
      - lang: java
        label: Update classification on folder
        source: client.getFolderClassifications().updateClassificationOnFolder(folder.getId(), Arrays.asList(new UpdateClassificationOnFolderRequestBody(secondClassification.getKey())))
      - lang: node
        label: Update classification on folder
        source: "await client.folderClassifications.updateClassificationOnFolder(folder.id, [\n  new UpdateClassificationOnFolderRequestBody({\n    value: secondClassification.key,\n  }),\n]);"
      - lang: python
        label: Update classification on folder
        source: "client.folder_classifications.update_classification_on_folder(\n    folder.id,\n    [UpdateClassificationOnFolderRequestBody(value=second_classification.key)],\n)"
    delete:
      operationId: delete_folders_id_metadata_enterprise_securityClassification-6VMVochwUWo
      summary: Remove classification from folder
      description: 'Removes any classifications from a folder.


        This API can also be called by including the enterprise ID in the URL explicitly, for example `/folders/:id/enterprise_12345/securityClassification-6VMVochwUWo`.'
      parameters:
      - name: folder_id
        in: path
        description: 'The unique identifier that represent a folder.


          The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/folder/123` the `folder_id` is `123`.


          The root folder of a Box account is always represented by the ID `0`.'
        required: true
        schema:
          type: string
        example: '12345'
      responses:
        '204':
          description: Returns an empty response when the classification is successfully deleted.
        '400':
          description: Returned when the request parameters are not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientError'
        '404':
          description: 'Returns an error when the folder does not have any classification applied to it, or when the user does not have access to the folder.


            - `instance_not_found` - An instance of the classification metadata template with the was not found on this folder.

            - `not_found` - The folder was not found, or the user does not have access to the folder.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientError'
        '405':
          description: Returned when the method was not allowed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientError'
        default:
          description: An unexpected client error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientError'
      x-box-tag: folder_classifications
      tags:
      - Classifications on folders
      x-box-unsupported-on-free-developer: true
      x-codeSamples:
      - lang: curl
        label: Remove classification from folder
        source: "curl -i -X DELETE \"https://api.box.com/2.0/folders/12345/metadata/enterprise/securityClassification-6VMVochwUWo\" \\\n     -H \"authorization: Bearer <ACCESS_TOKEN>\""
      - lang: dotnet
        label: Remove classification from folder
        source: 'await client.FolderClassifications.DeleteClassificationFromFolderAsync(folderId: folder.Id);'
      - lang: swift
        label: Remove classification from folder
        source: 'try await client.folderClassifications.deleteClassificationFromFolder(folderId: folder.id)'
      - lang: java
        label: Remove classification from folder
        source: client.getFolderClassifications().deleteClassificationFromFolder(folder.getId())
      - lang: node
        label: Remove classification from folder
        source: await client.folderClassifications.deleteClassificationFromFolder(folder.id);
      - lang: python
        label: Remove classification from folder
        source: client.folder_classifications.delete_classification_from_folder(folder.id)
components:
  schemas:
    ClientError:
      description: A generic error.
      type: object
      properties:
        type:
          description: The value will always be `error`.
          type: string
          example: error
          enum:
          - error
        status:
          description: The HTTP status of the response.
          type: integer
          format: int32
          example: 400
        code:
          description: A Box-specific error code.
          type: string
          example: item_name_invalid
          enum:
          - created
          - accepted
          - no_content
          - redirect
          - not_modified
          - bad_request
          - unauthorized
          - forbidden
          - not_found
          - method_not_allowed
          - conflict
          - precondition_failed
          - unprocessable_entity
          - too_many_requests
          - internal_server_error
          - unavailable
          - item_name_invalid
          - insufficient_scope
        message:
          description: A short message describing the error.
          type: string
          example: Method Not Allowed
        context_info:
          description: A free-form object that contains additional context about the error. The possible fields are defined on a per-endpoint basis. `message` is only one example.
          type:
          - object
          - 'null'
          example:
            message: Something went wrong
          additionalProperties: {}
        help_url:
          description: A URL that links to more information about why this error occurred.
          type: string
          example: https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/
        request_id:
          description: A unique identifier for this response, which can be used when contacting Box support.
          type: string
          example: abcdef123456
      title: Client error
      x-box-resource-id: client_error
    Classification:
      description: 'An instance of the classification metadata template, containing the classification applied to the file or folder.


        To get more details about the classification applied to an item, request the classification metadata template.'
      type: object
      properties:
        Box__Security__Classification__Key:
          description: The name of the classification applied to the item.
          type: string
          example: Sensitive
        $parent:
          description: The identifier of the item that this metadata instance has been attached to. This combines the `type` and the `id` of the parent in the form `{type}_{id}`.
          type: string
          example: folder_59449484661,
        $template:
          description: The value will always be `securityClassification-6VMVochwUWo`.
          type: string
          example: securityClassification-6VMVochwUWo
          enum:
          - securityClassification-6VMVochwUWo
        $scope:
          description: 'The scope of the enterprise that this classification has been applied for.


            This will be in the format `enterprise_{enterprise_id}`.'
          type: string
          example: enterprise_27335
        $version:
          description: The version of the metadata instance. This version starts at 0 and increases every time a classification is updated.
          type: integer
          example: 1
        $type:
          description: The unique ID of this classification instance. This will be include the name of the classification template and a unique ID.
          type: string
          example: securityClassification-6VMVochwUWo-fd31537a-0f95-4d86-9f2b-5974a29978f8
        $typeVersion:
          description: The version of the metadata template. This version starts at 0 and increases every time the template is updated. This is mostly for internal use.
          type: number
          example: 5
        $canEdit:
          description: Whether an end user can change the classification.
          type: boolean
          example: true
      title: Classification
      x-box-resource-id: classification
      x-box-tag: classifications
  securitySchemes:
    OAuth2Security:
      type: oauth2
      description: The access token received from the authorization server in the OAuth 2.0 flow.
      flows:
        authorizationCode:
          authorizationUrl: https://account.box.com/api/oauth2/authorize
          tokenUrl: https://api.box.com/oauth2/token
          scopes:
            root_readonly: Read all files and folders stored in Box
            root_readwrite: Read and write all files and folders stored in Box
            manage_app_users: Provision and manage app users
            manage_managed_users: Provision and manage managed users
            manage_groups: Manage an enterprise's groups
            manage_webhook: Create webhooks programmatically through the API
            manage_enterprise_properties: Manage enterprise properties
            manage_data_retention: Manage data retention polices
            manage_legal_hold: Manage Legal Holds
externalDocs:
  description: Box Developer Documentation.
  url: https://developer.box.com
x-mint:
  mcp:
    enabled: true
x-provenance:
  method: harvested
  publisher: Box
  source: https://developer.box.com/box-openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)