Skip to main content

SwiftPage API overview

This page documents SwiftPage’s externally reachable app and storefront endpoints. Operational maintenance interfaces are outside this public reference.

Authentication

Authenticated endpoints require a Shopify App Bridge session token (JWT) in the Authorization header:
SwiftPage validates that the token was issued for the app and that its destination identifies a Shopify shop. That verified destination scopes the authenticated request to the current shop.

Read-only request

The health route needs no authentication, so it is the simplest request to try. Set APP_ORIGIN to your deployed app’s HTTPS origin, without a trailing slash.

Public endpoints

Shop and templates

Pages

Sending X-SwiftPage-One-Click: 1 on publish uses the Growth one-click publish shortcut; without the entitlement it is rejected with 403 plan_limit. Publishing returns 403 when the plan page limit is reached or when the metaobject scopes are missing (reauthorize prompt). CSS dimension fields (width, height, padding, margin, maxWidth) in section settings and mobile overrides are sanitized on update.

Shopify proxy

When the Growth image-compression setting is enabled, the editor resizes eligible JPEG/PNG/WebP selections before requesting the staged target. GIF and SVG uploads are preserved unchanged.

Billing

Paid requests require a 16–128 character idempotencyKey; the client reuses the same key when offering a retry. Selecting free cancels the active subscription. Paid entitlements are not granted until Shopify reports an active subscription. Requires the admin collaborator role.

Feature endpoints

Premium capabilities live under /api/features/*. Each route enforces a server-side entitlement for the authenticated shop; calls below the required tier return 403 plan_limit.

App Proxy

Maintenance

Operational repair interfaces are not part of SwiftPage’s public API contract and are intentionally omitted from this reference.

Rate limiting

Authenticated /api/pages routes use a per-shop fixed-window limit of 60 requests per 60 seconds, keyed by shop domain. Responses include X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset. Exceeded windows return 429 rate_limited with a Retry-After header.

Errors

All errors use:
Common codes include bad_request, validation_error, unauthorized, forbidden, rate_limited, plan_limit, not_found, publish_error, billing_error, billing_request_in_progress, billing_request_expired, idempotency_conflict, billing_sync_error, duplicate_handle, delete_error, and server_error. Pcnaid Documentation › Shopify Ecosystem › SwiftPage › Developer