API Reference

Aura Home SDK API

Public customer-side options, methods, and lifecycle events for embedding Aura Home.

Initialization

AuraHome.init({
  container: "#aura-home",
  baseUrl: "https://your-aura-home-runtime.example/",
  sdkHost: "customer.example",
  allowedOrigin: "https://your-aura-home-runtime.example",
  dimensions: {
    width: "100%",
    height: "720px",
    minHeight: "640px"
  }
});
OptionRequiredPurpose
containerYesCSS selector or HTMLElement where the iframe is mounted.
baseUrlYesAura Home runtime URL to open.
sdkHostNoHuman-readable host label for telemetry.
allowedOriginNoExplicit runtime origin for browser messaging.
sectionsNoControls visible Aura Home areas.
themeNoNamed theme request, mode, CSS variables, and optional stylesheet customization.
authNoToken callback for enterprise authentication.
dimensionsNoIframe sizing.
Use baseUrl for tenant and environment selection. Do not use tenantId as an isolation, routing, authorization, billing, or data residency boundary.

Sections

sections: {
  chat: true,
  profile: true,
  exploreTools: false,
  navbar: false,
  footer: false,
  onboarding: false,
  pricing: false,
  legalPages: false
}

Theming

theme: {
  id: "cadisa",
  mode: "dark",
  cssVariables: {
    "--color-brand-primary": "#2F6FED",
    "--color-brand-primary-hover": "#1F56C6",
    "--color-brand-accent": "#8AB4F8",
    "--aura-chat-header-background": "#0b1f4d",
    "--aura-chat-message-font-size": "15px",
    "--aura-chat-button-font-weight": "700",
    "--aura-card-accent": "#2F6FED",
    "--aura-card-action-background": "#2F6FED",
    "--aura-card-focus-ring": "#8AB4F8"
  },
  stylesheetUrl: "https://customer.example/aura-home-theme.css"
}

The runtime applies theme.id only when the theme is allowed for that runtime. Operators can also publish themes, result-card tokens, and revisioned appearance metadata through the dashboard Appearance Editor. See Appearance and Theming.

Enterprise Authentication

auth: {
  mode: "oidc",
  getToken: async () => {
    return await customerIdentity.getIdToken();
  }
}

Tokens are sent only after the embedded runtime requests one. Do not put tokens in query strings, CSS, local HTML attributes, or logs.

Instance Methods

instance.updateConfig({ sections: { profile: false } });
instance.openChat();
instance.openProfile();
instance.getResolvedAppearance();
instance.hide();
instance.show();
instance.destroy();

Resolved Appearance

The SDK exposes the resolved, non-secret appearance contract after the runtime applies tenant defaults, requested theme values, and dashboard-published settings.

const appearance = instance.getResolvedAppearance();

instance.on("appearanceResolved", (event) => {
  console.log(event.payload?.resolvedThemeId);
  console.log(event.payload?.features?.resultCardsEnabled);
  console.log(event.payload?.themeRevision);
});
FieldPurpose
resolvedThemeIdThe visual profile actually applied by the runtime.
features.resultCardsEnabledWhether enriched result-card rendering is active for the current runtime.
rendererCatalogPublic renderer metadata the host can use for support and diagnostics.
cardTokensResolved card accent, action, surface, and focus-ring tokens.
themeRevisionPublished appearance revision information for audit and support.

Lifecycle Events

EventMeaning
loadedThe iframe load event fired.
readyThe embedded runtime announced readiness.
appearanceResolvedThe runtime resolved non-secret appearance metadata such as result-card feature state, renderer catalog, card tokens, and active theme revision.
configAckThe runtime accepted SDK configuration.
tokenProvidedThe SDK sent an auth token to the runtime.
profileOpenedopenProfile() was called.
chatOpenedopenChat() was called.
errorThe runtime reported an error.
destroyedThe SDK instance was destroyed.