Skip to main content

Embed chart partner integration

Headlight embeds the household chart in your app via a cross-origin iframe on embed.withheadlight.com. Your browser sends chart data directly into the iframe with postMessage. Headlight servers never receive names, trusts, or relationship data.

Quickstart

  1. Provision an API key with the embed:chart permission.
  2. Mint a short-lived token from your server:
  1. Mount the iframe from the pinned embed version and post the render message after ready:
Pin an immutable version prefix (/chart/v0.1.0/index.html). Do not load /chart/latest.

Sandbox attribute

Use exactly sandbox="allow-scripts allow-same-origin". Do not add allow-top-navigation or allow-popups.

Token role

The token is for metering and licensing. Framing is enforced by the embed CSP frame-ancestors directive, not by the token.

Next steps