StackFill API

Self-serve embeds and API setup

Teams create their own embed applications, API keys, product mappings, and copy-paste snippets from the workspace dashboard.

Open Integrations

Onboarding flow

  1. Create an embed app in Dashboard - Integrations and add the exact storefront origin, such as https://shop.example.com.
  2. Copy the reveal-once publishable key. StackFill only shows full key values at creation time.
  3. Create a product mapping that connects your storefront product ID, variant, or SKU to a live StackFill template.
  4. Paste the widget snippet on the allowed storefront, or create sessions from your backend with a secret key.

Browser widget

Use a publishable key only on browser pages. The key is origin-restricted by the embed app settings.

<script src="https://cdn.stackfill.com/widget/v1.js" async></script>

<button
  type="button"
  data-stackfill-open
  data-stackfill-key="stackfill_live_pk_REVEAL_ONCE"
  data-stackfill-product="demo-card">
  Personalize
</button>

Server-created sessions

Use a secret or restricted key when your cart or backend controls customer, order, or metadata values.

curl https://api.stackfill.com/v1/embed/sessions \
  -H "Authorization: Bearer stackfill_live_sk_REVEAL_ONCE" \
  -H "Content-Type: application/json" \
  -d '{
    "external_product_id": "demo-card",
    "customer": {
      "email": "customer@example.com",
      "name": "Customer Name"
    }
  }'

Core endpoints

MethodPathUse
POST/v1/embed/sessions/guestCreate a widget session with a publishable key.
POST/v1/embed/sessionsCreate a server-controlled session with a secret or restricted key.
POST/v1/product_mappings/resolveResolve an external product or SKU to a template.
GET/v1/templatesList team templates for API integrations.