Metadata instances (Files)
Create metadata instance on file
Applies an instance of a metadata template to a file.
In most cases only values that are present in the metadata template will be accepted, except for the global.properties template which accepts any key-value pair.
post/files/{file_id}/metadata/{scope}/{template_key}
Path parameters
file_idstring required
The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL https://*.app.box.com/files/123 the file_id is 123.
scope'global' | 'enterprise' required
The scope of the metadata template.
template_keystring required
The name of the metadata template.
Request body
object required
Example request
{
"name": "Aaron Levie"
}Response
Returns the instance of the template that was applied to the file, including the data that was applied to the template.
Example response
{
"$parent": "folder_59449484661,",
"$template": "marketingCollateral",
"$scope": "enterprise_27335",
"$version": 1,
"$canEdit": true,
"$id": "01234500-12f1-1234-aa12-b1d234cb567e",
"$type": "properties-6bcba49f-ca6d-4d2a-a758-57fe6edf44d0",
"$typeVersion": 2
}