The REST Admin API is a legacy API as of October 1, 2024. Starting April 1, 2025, all new public apps must be built exclusively with the GraphQL Admin API. For details and migration steps, visit our migration guide.
Asset
themes
access scope.Starting with Admin API 2023-04, if an app distributed through the Shopify App Store uses the Asset resource to create, edit or delete a theme's asset, you need to request the required protected access scope. In most cases, you shouldn't use the Asset resource. To learn more about when you can use the Asset resource, and how to migrate, refer to the Asset resource.
Theme assets are the individual files that make up a shop's theme.

A theme's assets include its templates, images, stylesheets, and extra snippets of code. They are arranged among the theme's directories, such as layout, templates, and assets. You can use the Asset resource to add, change, or remove asset files from a shop's theme. For a complete list of theme directories, refer to Theme architecture.
To learn how to create your own theme, see Building themes.
Endpoints
- get/admin/api/latest/themes/{theme_
id}/assets. json Retrieves a list of assets for a theme - get/admin/api/latest/themes/{theme_
id}/assets. json?asset[key]=templates/index. liquid Retrieves a single asset for a theme - put/admin/api/latest/themes/{theme_
id}/assets. json Creates or updates an asset for a theme - del/admin/api/latest/themes/{theme_
id}/assets. json?asset[key]=assets/bg-body. gif Deletes an asset from a theme
The Asset resource
Properties
A base64-encoded image.
The MD5 representation of the content, consisting of a string of 32 hexadecimal digits. May be null if an asset has not been updated recently.
The MIME representation of the content, consisting of the type and subtype of the asset.
The path to the asset within a theme. It consists of the file's directory and filename. For example, the asset assets/bg-body-green.gif
is in the assets directory, so its key is assets/bg-body-green.gif
.
The public-facing URL of the asset.
The asset size in bytes.
The ID for the theme that an asset belongs to.
The text content of the asset, such as the HTML and Liquid markup of a template file.
The Asset resource
Anchor to GET request, Retrieves a list of assets for a themegetRetrieves a list of assets for a theme
Retrieves a list of assets for a theme.
Note: Retrieving a list of assets returns only metadata about each asset. To retrieve an asset's content, you need to retrieve the asset individually.
Specify which fields to show using a comma-separated list of field names.
Retrieve a list of all assets for a theme
Retrieve a list of all assets for a theme
/admin/api/2025-07/themes/828155753/assets. json
Response
Anchor to GET request, Retrieves a single asset for a themegetRetrieves a single asset for a theme
Retrieves a single asset for a theme by its key.
To retrieve a single asset, include asset[key]=#{asset_key}
as a request parameter. For example, to retrieve the asset with a key of templates/index.liquid
, the request might be /admin/themes/828155753/assets.json?asset[key]=templates/index.liquid
.
For more information on the key
property, refer to Asset properties.
Retrieves a single asset for a theme by specifying the asset's key.
Specify which fields to show using a comma-separated list of field names.
Retrieve a Liquid template
Retrieve a Liquid template
Retrieves a single asset for a theme by specifying the asset's key.
/admin/api/2025-07/themes/828155753/assets. json?asset[key]= templates/index.liquid
Response
Anchor to PUT request, Creates or updates an asset for a themeputCreates or updates an asset for a theme
Creates or updates an asset for a theme.
In the PUT request, you can include the src
or source_key
property to create the asset from an existing file.
The path within the theme to an existing asset. Include in the body of the PUT request to create a duplicate asset.
The source URL of an image. Include in the body of the PUT request to upload the image to Shopify.
Change an existing Liquid template's value
Change an existing Liquid template's value
Show asset properties
The path to the asset within a theme. It consists of the file's directory and filename. For example, the asset assets/bg-body-green.gif
is in the assets directory, so its key is assets/bg-body-green.gif
.
The text content of the asset, such as the HTML and Liquid markup of a template file.
Create an image asset by providing a base64-encoded attachment
Create an image asset by providing a base64-encoded attachment
Show asset properties
The path to the asset within a theme. It consists of the file's directory and filename. For example, the asset assets/bg-body-green.gif
is in the assets directory, so its key is assets/bg-body-green.gif
.
A base64-encoded image.
Create an image asset by providing a source URL from which to upload the image
Create an image asset by providing a source URL from which to upload the image
Show asset properties
The path to the asset within a theme. It consists of the file's directory and filename. For example, the asset assets/bg-body-green.gif
is in the assets directory, so its key is assets/bg-body-green.gif
.
Duplicate an existing asset by providing a source key
Duplicate an existing asset by providing a source key
Show asset properties
The path to the asset within a theme. It consists of the file's directory and filename. For example, the asset assets/bg-body-green.gif
is in the assets directory, so its key is assets/bg-body-green.gif
.
/admin/api/2025-07/themes/828155753/assets. json
Response
Anchor to DELETE request, Deletes an asset from a themedelDeletes an asset from a theme
Deletes an asset from a theme.
Deletes a single asset from a theme by specifying the asset's key.
Delete an image from a theme
Delete an image from a theme
Deletes a single asset from a theme by specifying the asset's key.
Deleting an asset required by the theme fails with an error
Deleting an asset required by the theme fails with an error
Deletes a single asset from a theme by specifying the asset's key.