StreamTarget
Defined in: protocol.ts:36
Everything needed to address one island stream.
Properties
Section titled “Properties”apiBase
Section titled “apiBase”apiBase:
string
Defined in: protocol.ts:38
Base URL of the embed API, e.g. https://api.sparkletree.io.
campaignId?
Section titled “campaignId?”
optionalcampaignId?:string
Defined in: protocol.ts:40
context?
Section titled “context?”
optionalcontext?:Record<string,unknown>
Defined in: protocol.ts:51
Context snapshot (time, geo, weather, device). Serialised as JSON.
extra?
Section titled “extra?”
optionalextra?:Record<string,string|undefined>
Defined in: protocol.ts:55
Extra params passed through verbatim (preview tokens, etc.).
island
Section titled “island”island:
"cta"|"hero"
Defined in: protocol.ts:42
organizationId
Section titled “organizationId”organizationId:
string
Defined in: protocol.ts:39
sessionId?
Section titled “sessionId?”
optionalsessionId?:string
Defined in: protocol.ts:53
Conversation session id for copy continuity. Individual surfaces only.
surfaceId?
Section titled “surfaceId?”
optionalsurfaceId?:string
Defined in: protocol.ts:41
variantId?
Section titled “variantId?”
optionalvariantId?:string
Defined in: protocol.ts:49
Variant pinning (plan v1.1 §3.3). The provider resolves the variant ONCE per page view and pins it here for every later call. Without it, ε-greedy runs per request and a single page shows a mixed-variant creative — hero from one arm, CTA from another — which is not an experiment, it is noise.