Skip to main content

Scopes and Permissions

Scopes are only needed for an API integration. A storefront app that does not call the API declares no scopes, and merchants install it with one click from the Marketplace.

To protect merchant data, SitePack uses a scope-based permission system. Apps must declare which scopes they require in their app.json manifest. These scopes are then authorized by the merchant during the app installation process.

How Scopes Work​

When your app interacts with the SitePack API, it does so within the context of the granted scopes. If your app attempts to access a resource or perform an action that isn't covered by its authorized scopes, the API will return a 403 Forbidden error.

Principle of Least Privilege​

You should only request the minimum set of scopes required for your app to function. Requesting unnecessary scopes can decrease merchant trust and may lead to your app being rejected during the review process.

Available Scopes​

Scopes are structured as resource:action. write implies its matching read, so an app that holds products:write does not also have to request products:read.

Content​

ScopeDescription
content:readRead pages, their elements and revisions.
content:writeCreate, change, publish and delete pages.
blogs:readRead blog posts and blog categories.
blogs:writeCreate, change, publish and delete blog posts.
translations:readRead content translations and site locales.
translations:writeCreate and change content translations.
elements:readRead homepage, footer and sidebar elements.
elements:writeChange homepage, footer and sidebar elements.
navigation:readRead navigations and their items.
navigation:writeChange navigations and their items.
redirects:readRead URL redirects.
redirects:writeCreate, change and delete URL redirects.
usp:readRead the site USPs (unique selling points).
usp:writeCreate, change, reorder and delete USPs.
comments:readRead comments.
comments:writeModerate and delete comments.
posts:readRead the post types installed apps add to the site, and their entries.
posts:writeCreate, change and delete entries of the post types installed apps add, and change the SEO of their overview page.

Media​

ScopeDescription
media:readRead the media library.
media:writeUpload, change and delete media.

E-commerce​

ScopeDescription
products:readRead products, variants, images and bundles.
products:writeCreate, change and delete products and their variants.
inventory:readRead stock levels and stock locations.
inventory:writeAdjust stock and manage stock locations.
categories:readRead content and product categories.
categories:writeCreate, change and delete categories.
collections:readRead collections and their rules.
collections:writeCreate, change and delete collections.
tags:readRead tags.
tags:writeCreate, change and delete tags.
orders:readRead webshop orders, their items and payments.
orders:writeCreate orders and change their status.
customers:readRead customers and their addresses.
customers:writeCreate and change customers.
discounts:readRead discount codes.
discounts:writeCreate, change and delete discount codes.
shipping:readRead shipping labels and their track and trace codes.

An orders:read token may read an order but not the customer behind it; reading customer records needs customers:read as well. There is no separate payments scope: an order's payments are read through the order, under orders:read (GET /api/public/v1/orders/{uuid}/payments).

Leads​

ScopeDescription
leads:readRead form submissions and their notes.
leads:writeCreate, change and delete form submissions.

Site & design​

ScopeDescription
sites:readRead the site settings, notices and brand book.
sites:writeChange the site settings, notices and brand book.
modules:readRead the site modules and their settings.
modules:writeChange module settings.
themes:readRead the active theme, its layouts and its design settings.
themes:writeChange the theme design settings (colours, fonts) on the staging preview.

Domains & mail​

ScopeDescription
domains:readRead domains, DNS records and domain holders.
domains:writeChange DNS records and domain holders.
domains:orderOrder domains, which may be charged to the merchant.
mail:readRead mailboxes and mailbox slots.
mail:writeCreate, change and delete mailboxes within the free slots.
mail:orderCreate mailboxes beyond the free slots, which is charged monthly.

domains:order and mail:order can cost the merchant money, so the consent screen calls them out separately.

Account & billing​

ScopeDescription
billing:readRead the subscription, plan and invoices.
statistics:readRead site statistics and conversions.

Your app​

ScopeDescription
app:settings:readRead this app's own settings on the site, including what the merchant saved on your settings page.
app:settings:writeChange this app's own settings on the site.
webhooks:readRead this app's webhook subscriptions and the available topics.

The API Reference names the required scope on every endpoint.

Declaring Scopes​

Scopes are defined in the auth section of your app.json:

{
"uuid": "my-app",
"auth": {
"scopes": [
"content:read",
"media:read",
"leads:write"
]
}
}

Scoped Security​

SitePack enforces these scopes at several levels:

  1. OAuth2 Authorization: During install the merchant is shown the requested scopes on the consent screen, grouped by area and described in plain language. Scopes that can spend money (domains:order, mail:order) are called out separately, and only scopes your app declared in its app.json can be granted; a link that asks for more is trimmed to what the manifest allows.
  2. API Gateway: Every REST API request is validated against the app's granted scopes.
  3. Webhook Delivery: Apps only receive webhooks for resources they have at least read access to.

Next Steps​