Docs

Environments

Documentation

Environments

Use PRODUCTION on any plan. Development and staging are available on Growth, Scale, and LTD.

Supported environment values

  1. DEVELOPMENT: local testing messages on Growth, Scale, and LTD plans.
  2. STAGING: preview or staging messages on Growth, Scale, and LTD plans.
  3. PRODUCTION: live production messages on all plans.

SDK option

  1. Use env to choose DEVELOPMENT, STAGING, or PRODUCTION.
Snippetts
import { initSpryUi } from "https://spryui.com/sdk/v1/index.mjs";

initSpryUi({
  publicKey: "pk_...",
  host: window.location.host,
  apiBaseUrl: "https://spryui.com/api/sdk/v1",
  env: "STAGING",
});

Recommended deployment mapping

  1. Local host / developer machines -> DEVELOPMENT.
  2. Preview branches / staging domain -> STAGING.
  3. Main live domain -> PRODUCTION.
Snippetts
import { initSpryUi } from "https://spryui.com/sdk/v1/index.mjs";

const sdkEnv =
  window.location.hostname === "localhost"
    ? "DEVELOPMENT"
    : window.location.hostname.includes("staging")
      ? "STAGING"
      : "PRODUCTION";

initSpryUi({
  publicKey: "pk_...",
  host: window.location.host,
  apiBaseUrl: "https://spryui.com/api/sdk/v1",
  env: sdkEnv,
});

Validation checklist

  1. Message is Active in the same target environment.
  2. SDK init uses the expected env value.
  3. Host/domain is verified for the project key.
  4. If no message renders, check SDK Debugging and confirm environment in runtime context.