Skip to main content

Manifest

Learn how to configure your Shop Mini using the manifest.json file. The manifest defines critical properties like description, permissions, scopes, and trusted domains.


Every Shop Mini requires a manifest.json file in the src folder of the project. This file defines the configuration and capabilities of your Mini, including what permissions it needs, what user data it can access, and which external domains it can communicate with.

The manifest is validated during the submission process and must be properly configured for your Mini to function correctly.


The name, description, privacy_policy_url, and terms_url fields are required. Both URLs must use HTTPS. Here's an example of a manifest.json file:

manifest.json

{
"name": "My Mini",
"description": "A brief description of your mini that explains its purpose and functionality",
"handle": "my-mini-handle",
"permissions": ["CAMERA", "MICROPHONE", "MOTION"],
"scopes": ["profile", "orders"],
"trusted_domains": [
"api.my-mini.app/v1/",
"storage.googleapis.com/my-mini-bucket/",
"cdn.my-mini.app/assets/"
],
"privacy_policy_url": "https://my-mini.app/privacy",
"terms_url": "https://my-mini.app/terms"
}

The permissions field is an array that specifies which native device capabilities your Mini requires. These permissions are requested from the user when your Mini attempts to use them.

Anchor to Available PermissionsAvailable Permissions

  • CAMERA - Access to the device camera for taking photos or videos
  • MICROPHONE - Access to the device microphone for audio recording
  • MOTION - Access to device motion sensors (accelerometer, gyroscope)

{
"permissions": ["CAMERA", "MICROPHONE"]
}
Caution

Only request permissions that are essential to your Mini's core functionality. Requesting unnecessary permissions may delay approval during the review process.


The scopes field is an array that defines what user data your Mini can access through the Shop Minis SDK. Some hooks in the SDK require specific scopes to be declared in the manifest before they can be used. To learn how users grant or reject those scopes, refer to Scopes consent.

  • orders - Access to the user's order history and details. Required by useOrders.

The hooks that read recently viewed or recommended products and shops, followed shops, saved products, or product lists don't require a scope.

{
"scopes": ["profile", "orders"]
}
Note

Always follow the principle of least privilege - only request scopes that are necessary for your Mini's functionality. The verify-build and submit commands fail with Unused scope: <scope> when your manifest declares a scope that no SDK hook or component in your Mini's imports requires or optionally uses. Review the Guidelines for more information on data privacy requirements.


The trusted_domains field is an array of domains that your Mini is allowed to communicate with. This is a critical security feature that restricts network requests to approved domains only.

Trusted domains are required for:

  • Network requests - Any fetch() calls to external APIs
  • Image sources - Loading images from external URLs
  • Video sources - Loading videos from external URLs
  • Other external resources - Any content loaded from outside your Mini's bundle

  • Don't include the protocol (for example, https://).
  • You can include a path to be more specific. The path must end with a trailing slash (for example, cdn.shopify.com/static/).
  • A hostname entry doesn't cover its subdomains. List each subdomain separately or use a *. wildcard. For example, *.shopify.com matches any subdomain of shopify.com.
  • The Shop Minis CLI rejects wildcards on shared hosting domains and their subdomains. For these domains, list the exact subdomain instead: googleapis.com, googleusercontent.com, storage.googleapis.com, storage.cloud.google.com, amazonaws.com, s3.amazonaws.com, cloudfront.net, supabase.co, firebaseio.com, firebaseapp.com, firebasestorage.googleapis.com, cloudinary.com, imgix.net, akamaized.net, azureedge.net, digitaloceanspaces.com, blob.core.windows.net, and azure.com.
  • Be as specific as possible - For example, if you're using Google Cloud Storage, then include the path to your bucket. The Shop Minis CLI rejects a bare storage.googleapis.com entry as too broad.

When you include a path in your trusted domain, the path must end with a trailing slash (/). A path entry such as storage.googleapis.com/my-bucket/images/ matches any URL under that path.

To load an image from https://cdn.shopify.com/static/sample-images/teapot.jpg, any of these trusted_domains would work:

{
"trusted_domains": [
"cdn.shopify.com",
"cdn.shopify.com/static/",
"cdn.shopify.com/static/sample-images/"
]
}

However, these entries fail manifest validation because their paths don't end with a trailing slash:

{
"trusted_domains": [
"cdn.shopify.com/static",
"cdn.shopify.com/static/sample-images"
]
}
Caution

Your Mini won't be able to make requests to any domain not listed in this array. Make sure to include all domains you need before submitting your Mini for review.

Tip

Be as specific as possible with your trusted domains. The Shop Minis CLI rejects an entire domain like storage.googleapis.com as too broad. Use storage.googleapis.com/my-bucket/ instead to limit access to your bucket.


The handle field is a unique identifier for your Mini. This value is automatically assigned when you create your Mini through the Shop Minis platform.

  • Automatically generated during Mini creation
  • Must be unique across all Shop Minis
  • Used internally by Shop to identify your Mini
  • Cannot be changed after initial assignment
  • Used to deeplink into your Mini (shop.com/mini/my-mini-handle)

{
"handle": "my-awesome-mini"
}
Note

You typically don't need to manually set this field. The setup command adds uuid and handle to your manifest when it creates or connects your Mini. Your manifest needs a uuid or a handle to pass validation.


The description field provides a brief summary of your Mini's purpose and functionality. This description is displayed to users in various places within the Shop app to help them understand what your Mini offers.

  • Should be concise and informative (recommended 30-50 characters)
  • Helps users discover and understand your Mini's value proposition
  • Used in search results and Mini details

{
"description": "Track your outfits every day"
}

  • Be specific: Clearly state what unique value your Mini provides
  • Keep it concise: Aim for 30-50 characters maximum
  • Use action words: Start with verbs like "Discover," "Shop," "Track," or "Explore"
  • Highlight key features: Mention the main benefit or differentiator of your Mini

Anchor to Minimize Permissions and ScopesMinimize Permissions and Scopes

Only request the permissions and scopes that are absolutely necessary for your Mini's core functionality. This improves user trust and speeds up the review process.

Anchor to Keep Trusted Domains UpdatedKeep Trusted Domains Updated

As your Mini evolves, make sure to update the trusted_domains list if you add new external services or APIs. Missing domains will cause runtime errors.

Test your manifest configuration thoroughly during development to catch any issues before submission. The Shop Minis CLI validates your manifest. The verify-build command reports any manifest errors, and the submit command stops before it uploads your Mini when validation fails.


Was this page helpful?