Partners
Mint a builder session for a browser
POST/v1/embed-sessions
Requires an API key with the workspaces:manage scope. About keys and scopes
Partner keys only, from your server, with Kirora-Workspace naming the tenant. Returns a token the embedded segment and email builders send as Authorization: Bearer es_… for 15 minutes; the SDK asks your server for a new one before it expires. The key must have allowedOrigins, and a session is refused with 403 EMBED_ORIGIN_NOT_ALLOWED from any other origin. A session reads what its components need, renders previews, counts audiences and uploads images; it never creates, edits, deletes, publishes or sends, since your server saves what the builders return. It sees masked attributes as a member does, and attribute values and event property samples only with includeAttributeValues. Revoking the key ends every session it minted.
Request body
componentsstring[]requiredThe builders the browser may load; each opens only the routes it needs.
at least 1 item
includeAttributeValuesbooleanoptionalLets the session read attribute values and event property samples, for value suggestions. Off by default: they are the workspace's customer data.
default
false
Returns
Returns 201 Created with a EmbedSession in data. Otherwise returns an error; Errors lists every code and which to retry.
tokenstringrequiredFor Kirora's hosted builder, which sends it as
Authorization: Bearer <token>; it works only inside a page whose origin the partner key allows.expiresAtstringrequiredWhen the token stops working (15 minutes).
date-time
apiUrlstringrequiredThe API's base URL, for
KiroraProvider'sapiUrl.uri
builderUrlstringrequiredThe hosted builders' base address;
@kirora/reactopens each builder under it.uri