# Metadata

All Stelace objects have a metadata property you can use to store any additional information you don’t need in Search.

Metadata is not used by Stelace and can include any valid JSON key-value pairs. You can use metadata to store structured information about your Assets such as image file URLs or internal reference for staff.

You should not use metadata to store sensitive information such as personally identifiable information.

Including metadata in a new Asset just requires an additional parameter:

await stelace.assets.create({
  name: 'Asset with arbitrary metadata',
  description: 'Searchable built-in description.',
  assetTypeId: 'typ_T3ZfQps1I3a1gJYz2I3a',
  metadata: {
    staffComment: 'Requires inspection.'
  }
})

# Metadata and custom attributes

Custom Attributes are indexed for Search.

Metadata is a more flexible way to serve non-searchable additional content related to an Asset or any other Stelace object through API.

# platformData

Most API objects also have a platformData property requiring specific platformData:edit:all permission API for edition.

This way you can prevent normal Users from tampering with specific data set by your platform Workflows or staff, such as profile validation info. For instance, you don't expect your Users to be able to change some phoneVerified boolean you only want to set to true using a Workflow once they have verified their phone number.