Skip to main content
mutation

Requires write_files access scope, write_themes access scope or write_images access scope. Also: Users must have create files permissions.

Creates file assets for a store from external URLs or files that were previously uploaded using the stagedUploadsCreate mutation.

Use the fileCreate mutation to add various types of media and documents to your store. These files are added to the Files page in the Shopify admin and can be referenced by other resources in your store.

The fileCreate mutation supports multiple file types:

  • Images: Product photos, variant images, and general store imagery
  • Videos: Shopify-hosted videos for product demonstrations and marketing
  • External videos: YouTube and Vimeo videos for enhanced product experiences
  • 3D models: Interactive 3D representations of products
  • Generic files: PDFs, documents, and other file types for store resources

The mutation handles duplicate filenames using configurable resolution modes that automatically append UUIDs, replace existing files, or raise errors when conflicts occur.


Note

Files are processed asynchronously. Check the fileStatus field to monitor processing completion. The maximum number of files that can be created in a single batch is 250.


After creating files, you can make subsequent updates using the following mutations:

  • fileUpdate: Update file properties such as alt text or replace file contents while preserving the same URL.
  • fileDelete: Remove files from your store when they are no longer needed.

To list all files in your store, use the files query.

Learn how to manage product media and file assets in your app.

•[FileCreateInput!]!
required

List of new files to be created.


Was this section helpful?

Anchor to FileCreatePayload returnsFileCreatePayload returns

•[File!]

The newly created files.

•[FilesUserError!]!
non-null

The list of errors that occurred from executing the mutation.


Was this section helpful?