Skip to main content
Question

Metadata and copied files

  • May 22, 2025
  • 3 replies
  • 54 views

Forum|alt.badge.img

According to the FAQ, I can enable metadata copying via an API call:

What happens when I copy my files or folders? Is the metadata copied with it?
This is configurable via the API on a template-by-template basis. By default, the metadata is not copied with your files, but it can be configured to be true. Currently, metadata instances without a parent template cannot be copied.

What API call do I use and what value do I need to set to "true" to make this happen? We already have a template set up and are using it. Thanks!

3 replies

Forum|alt.badge.img

Hi

There is flag you can set when you create the metadata template. https://box.dev/reference/resources/metadata-template/#param-copyInstanceOnItemCopy

'copyInstanceOnItemCopy': Whether or not to copy any metadata attached to a file or folder when it is copied. By default, metadata is not copied along with a file or folder when it is copied.

I don't think the API allows you to change the value once the template is created so you will probably have to re-create the template with the value set

Best regards,

Peter Christensen, Platform Solutions Engineer, Box

 

Forum|alt.badge.img

Thanks, Peter, that helps a lot!


Forum|alt.badge.img

By default the value is set to false. You can change this value to true within the API - Update Metadata Template

You will need to define your template scope and key, but this is the fix.

[{"op": "editTemplate", "data": {"copyInstanceOnItemCopy": true}}]