Sample - Box Platform API
GET/metadata_templates/{template_id}

Get a metadata template by ID

Retrieves a metadata template by its unique identifier. Use template_id to select the template whose definition you need, including its scope, fields, visibility, and copy behavior.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter
template_idstringrequired
The unique identifier of the metadata template to retrieve.

3 status codes
200Returns the metadata template matching `template_id`, including its identifier, scope, display name, fields, visibility, and copy behavior.
idstringrequired
The ID of the metadata template.
typestringrequired
The value will always be `metadata_template`.
Allowed:metadata_template
scopestringoptional
The scope of the metadata template can either be `global` or `enterprise_*`. The `global` scope is used for templates that are available to any Box enterprise. The `enterprise_*` scope represents templates that have been created within a specific enterprise, where `*` will be the ID of that enterprise.
templateKeystringoptional
A unique identifier for the template. This identifier is unique across the `scope` of the enterprise to which the metadata template is being applied, yet is not necessarily unique across different enterprises.
displayNamestringoptional
The display name of the template. This can be seen in the Box web app and mobile apps.
hiddenbooleanoptional
Defines if this template is visible in the Box web app UI, or if it is purely intended for usage through the API.
fieldsarray<object>optional
An ordered list of template fields which are part of the template. Each field can be a regular text field, date field, number field, as well as a single or multi-select list.
copyInstanceOnItemCopybooleanoptional
Whether or not to include the metadata when a file or folder is copied.
400Returned when `template_id` is invalid or the template ID is not recognised.
idstringrequired
The ID of the metadata template.
typestringrequired
The value will always be `metadata_template`.
Allowed:metadata_template
scopestringoptional
The scope of the metadata template can either be `global` or `enterprise_*`. The `global` scope is used for templates that are available to any Box enterprise. The `enterprise_*` scope represents templates that have been created within a specific enterprise, where `*` will be the ID of that enterprise.
templateKeystringoptional
A unique identifier for the template. This identifier is unique across the `scope` of the enterprise to which the metadata template is being applied, yet is not necessarily unique across different enterprises.
displayNamestringoptional
The display name of the template. This can be seen in the Box web app and mobile apps.
hiddenbooleanoptional
Defines if this template is visible in the Box web app UI, or if it is purely intended for usage through the API.
fieldsarray<object>optional
An ordered list of template fields which are part of the template. Each field can be a regular text field, date field, number field, as well as a single or multi-select list.
copyInstanceOnItemCopybooleanoptional
Whether or not to include the metadata when a file or folder is copied.
defaultAn unexpected client error.
typestringoptional
The value will always be `error`.
Allowed:error
statusintegeroptional
The HTTP status of the response.
codestringoptional
A Box-specific error code.
Allowed:createdacceptedno_contentredirectnot_modifiedbad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictprecondition_failed
messagestringoptional
A short message describing the error.
context_infoobjectoptional
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.
help_urlstringoptional
A URL that links to more information about why this error occurred.
request_idstringoptional
A unique identifier for this response, which can be used when contacting Box support.

Error handling

A 400 is returned when template_id is not valid or is not recognised. Supply the identifier of the metadata template you want to retrieve.