Skip to main content
mutation

Creates staged upload targets for file uploads such as images, videos, and 3D models.

Use the stagedUploadsCreate mutation instead of direct file creation mutations when:

  • Uploading large files: Files over a few MB benefit from staged uploads for better reliability
  • Uploading media files: Videos, 3D models, and high-resolution images
  • Bulk importing: CSV files, product catalogs, or other bulk data
  • Using external file sources: When files are stored remotely and need to be transferred to Shopify

For small files or simple use cases, you can use fileCreate directly by providing the file content inline.

The stagedUploadsCreate mutation is the first step in Shopify's secure two-step upload process:

Step 1: Create staged upload targets (this mutation)

  • Generate secure, temporary upload URLs for your files.
  • Receive authentication parameters for the upload.

Step 2: Upload files and create assets

  • Upload your files directly to the provided URLs using the authentication parameters.
  • Use the returned resourceUrl as the originalSource in subsequent mutations like fileCreate.

This approach provides better performance for large files, handles network interruptions gracefully, and ensures secure file transfers to Shopify's storage infrastructure.


Note

File size is required when uploading VIDEO or MODEL_3D resources.


After creating staged upload targets, complete the process by:

  1. Uploading files: Send your files to the returned url using the provided parameters for authentication
  2. Creating file assets: Use the resourceUrl as the originalSource in mutations such as:
    • fileCreate: Creates file assets from staged uploads
    • productUpdate: Updates products with new media from staged uploads

Learn more about uploading media to Shopify.

•[StagedUploadInput!]!
required

The information required to generate staged upload targets.


Was this section helpful?

Anchor to StagedUploadsCreatePayload returnsStagedUploadsCreatePayload returns

•[StagedMediaUploadTarget!]

The staged upload targets that were generated.

•[UserError!]!
non-null

The list of errors that occurred from executing the mutation.


Was this section helpful?