---
schema_version: "1"
id: a9113481186fa94cbc746d4f7ff7f48a68087415f50bf0f4db845e6a299de1b0
title: ContentAsset
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_contentasset.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_contentasset.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 0c3c0a1a8009a5851847c7e475a19a533ccc21a924aee557b9e81606e888d28e
description: Represents the metadata for creating an asset file. Asset files enable a Salesforce file to be used for org setup and configuration purposes. This type extends the MetadataWithContent metadata type and inherits its content and fullName fields.
---
# ContentAsset

Represents the metadata for creating an asset file. Asset files enable a Salesforce file to be used for org setup and configuration purposes. This type extends the MetadataWithContent metadata type and inherits its content and fullName fields.

![Important](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png)

#### Important

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

## File Suffix and Directory Location

ContentAsset components have the suffix .asset and are stored in the contentassets folder.

## Version

ContentAsset components are available in API version 38.0 and later.

## Special Access Rules

The system prevents metadata retrieval if the total size of the asset’s file content exceeds 30 MB. All pre-existing limits for packaging apply to asset files.

## Fields

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d270256e102">Field Name</th>

              <th class="featureTableHeader  " id="d270256e105">Field Type</th>

              <th class="featureTableHeader  " id="d270256e108">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d270256e102" data-title="Field Name"><span class="keyword parmname">format</span></td>

              <td class="entry" headers="d270256e105" data-title="Field Type">ContentAssetFormat
                (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type string)</td>

              <td class="entry" headers="d270256e108" data-title="Description">Describes the format of the asset file. Valid values are:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">Original</samp>—A single asset file
                    version.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">ZippedVersions</samp>—Contains multiple versions
                    of the asset file.
                  </li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d270256e102" data-title="Field Name"><span class="keyword parmname">isVisibleByExternalUsers</span></td>

              <td class="entry" headers="d270256e105" data-title="Field Type">boolean</td>

              <td class="entry" headers="d270256e108" data-title="Description">Indicates whether unauthenticated users can see the asset file (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>). If not specified, the default value is <samp class="codeph nolang">false</samp>. This field is available in API version 44.0
                and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d270256e102" data-title="Field Name"><span class="keyword parmname">language</span></td>

              <td class="entry" headers="d270256e105" data-title="Field Type">string</td>

              <td class="entry" headers="d270256e108" data-title="Description">Required. The language of the asset file label.</td>

            </tr>

            <tr>
              <td class="entry" headers="d270256e102" data-title="Field Name"><span class="keyword parmname">masterLabel</span></td>

              <td class="entry" headers="d270256e105" data-title="Field Type">string</td>

              <td class="entry" headers="d270256e108" data-title="Description">Required. The label for the asset file record, which displays in Setup.</td>

            </tr>

            <tr>
              <td class="entry" headers="d270256e102" data-title="Field Name"><span class="keyword parmname">originNetwork</span></td>

              <td class="entry" headers="d270256e105" data-title="Field Type">string</td>

              <td class="entry" headers="d270256e108" data-title="Description">For deploys, the name of the Experience Cloud site the file is assigned upon
                creation. For retrievals, the name of the Experience Cloud site the file is assigned
                to appears in the field value. If <samp class="codeph nolang">null</samp>, the
                file wasn’t assigned to an Experience Cloud site.</td>

            </tr>

            <tr>
              <td class="entry" headers="d270256e102" data-title="Field Name"><span class="keyword parmname">relationships</span></td>

              <td class="entry" headers="d270256e105" data-title="Field Type"><a class="xref" href="#ContentAssetRelationships">ContentAssetRelationships</a></td>

              <td class="entry" headers="d270256e108" data-title="Description">The list of ContentAssetLinks that describe whether the asset file can be
                shared with the org.</td>

            </tr>

            <tr>
              <td class="entry" headers="d270256e102" data-title="Field Name"><span class="keyword parmname">versions</span></td>

              <td class="entry" headers="d270256e105" data-title="Field Type"><a class="xref" href="#ContentAssetVersions">ContentAssetVersions</a></td>

              <td class="entry" headers="d270256e108" data-title="Description">Required. Captures basic information about the file version included the asset
                metadata. Typically the file has only one version.</td>

            </tr>

          </tbody>

        </table>

## ContentAssetRelationships

Represents the relationships between an asset file and the locations it's linked with.

| Field Name | Field Type | Description |
| --- | --- | --- |
| emailTemplate | ContentAsset\[\] | An array of email templates the content asset is related to. This field is available in API version 51.0 and later. |
| insightsApplication | ContentAsset\[\] | An array of the insights applications that use the content asset. This field is available in API version 39.0 and later. |
| network | ContentAsset\[\] | An array of networks that use the content asset. This field is available in API version 39.0 and later. |
| organization | ContentAsset\[\] | Stores information about sharing the asset file with the org. Maps to ContentDocumentLink. This field is available in API version 39.0 and later. |
| workspace | ContentAsset\[\] | An array of workspaces and libraries that own or share the content asset. This field is available in API version 39.0 and later. |

## ContentAssetLink

Represents a relationship link for an asset file, and includes details about the level of access for the link.

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d270256e382">Field Name</th>

              <th class="featureTableHeader  " id="d270256e385">Field Type</th>

              <th class="featureTableHeader  " id="d270256e388">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d270256e382" data-title="Field Name"><span class="keyword parmname">access</span></td>

              <td class="entry" headers="d270256e385" data-title="Field Type">ContentAssetAccess
                (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type string)</td>

              <td class="entry" headers="d270256e388" data-title="Description">Required. The permission granted to the user of the shared file, determined by
                the permission the user already has. Valid values are:<ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">VIEWER</samp></li>

                  <li class="li"><samp class="codeph nolang">COLLABORATOR</samp></li>

                  <li class="li"><samp class="codeph nolang">INFERRED</samp></li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d270256e382" data-title="Field Name"><span class="keyword parmname">isManagingWorkspace</span></td>

              <td class="entry" headers="d270256e385" data-title="Field Type">boolean</td>

              <td class="entry" headers="d270256e388" data-title="Description">Indicates whether the content asset resides in the workspace or not. When
                <samp class="codeph nolang">true</samp>, the content asset resides in the
                workspace. If not specified, the default value is <samp class="codeph nolang">false</samp>. This field is available in API version 39.0 and later.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d270256e382" data-title="Field Name"><span class="keyword parmname">name</span></td>

              <td class="entry" headers="d270256e385" data-title="Field Type">string</td>

              <td class="entry" headers="d270256e388" data-title="Description">Reserved for future use.</td>

            </tr>

          </tbody>

        </table>

## ContentAssetVersions

Represents information about all file versions included in the asset metadata.

| Field Name | Field Type | Description |
| --- | --- | --- |
| version | [ContentAssetVersion\[\]](#ContentAssetVersion) | A list of file versions for the asset. |

## ContentAssetVersion

Represents information about one file version included in the asset metadata.

| Field Name | Field Type | Description |
| --- | --- | --- |
| number | string | Required. The version number. This field is based on, or sets, the ContentVersion. |
| pathOnClient | string | Required. Describes the original filename of the file. This field maps to ContentVersion.PathOnClient. It provides the data for the ContentVersion Title field. |
| zipEntry | string | If the asset file has more than one version, format is ZippedVersions. In this case, zipEntry is the name of the file within the zip. If the asset file has only one version, this field is empty. |

## Declarative Metadata Sample Definition

The following is an example of a ContentAsset component.

<?xml version="1.0" encoding="UTF-8"?>
<ContentAsset xmlns="http://soap.sforce.com/2006/04/metadata">
    <masterLabel\>some asset</masterLabel\>
    <relationships\>
        <organization\>
            <access\>VIEWER</access\>
        </organization\>
    </relationships\>
    <versions\>
        <version\>
            <number\>1</number\>
            <pathOnClient\>some asset.txt</pathOnClient\>
        </version\>
    </versions\>
</ContentAsset\>

For assets that include just one version, the format field can be omitted or specified with the value as Original. File assets with more than one version have versions wrapped in a zip file.

The following is an example package.xml that references the previous definition.

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types\>
        <members\>MyAsset</members\>
        <name\>ContentAsset</name\>
    </types\>
    <version\>68.0</version\>
</Package\>

## Wildcard Support in the Manifest File

This metadata type supports the wildcard character \* (asterisk) in the package.xml manifest file. For information about using the manifest file, see [Deploying and Retrieving Metadata with the Zip File](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/file_based_zip_file.htm).