Runtime API
The runtime exposes a small JavaScript API on window.onbixo. Use it to identify
users, track events, and drive flows from your own code.
Setup
The install snippet loads the runtime asynchronously. Call every API
method through onbixo.push([...]) - it works the same before and after the runtime
loads (calls made early are queued and run in order once it does):
onbixo.push(["init", { account: "YOUR_ACCOUNT_ID", token: "YOUR_API_KEY", apiBase: "https://app.onbixo..." }]);
onbixo.push(["identify", "user-123", { plan: "pro" }]);
onbixo.push(["track", "signed_up"]);
Each method below is documented by its name and arguments. To call one, pass the
method name first, then its arguments, to onbixo.push. For example the method
identify(userId, traits, company) is called as
onbixo.push(["identify", userId, traits, company]).
identify(userId, traits, company)
Tell Onbixo who the current user is. Unlocks trait-based targeting and lets flows remember progress across devices.
onbixo.push(["identify", userId, traits, company]);
| Argument | Type | Description |
|---|---|---|
userId | string | Your stable ID for the user. Required. |
traits | object | Optional. Any user attributes you want to target on - plan, role, and so on. signupDate is reserved; see below. |
company | object | Optional. Company attributes (companyId, size...) for account-level targeting. |
Example
onbixo.push(["identify", "user-123", { plan: "pro" }, { companyId: "acme", size: 40 }]);
signupDate: the one reserved trait
Every other trait is yours to name. signupDate is read by name to power
days-since-signup targeting, so the spelling matters - it is
camelCase, and it goes in traits, not in company.
| Accepted | Example |
|---|---|
Any string Date.parse understands - ISO 8601 is safest | "2026-01-04" or "2026-01-04T09:30:00Z" |
| A timestamp in milliseconds | 1767513600000 |
A value we cannot parse is ignored, silently. Days-since-signup then falls back
to first-seen (below), so flows keep running but match against the wrong date rather than
erroring. The two formats worth double-checking: a Unix timestamp in seconds resolves to
1970, and an ambiguous "04/01/2026" is read as month-first by most browsers.
If you never send signupDate, days-since-signup falls back to first seen -
the first time this browser loaded a flow. That is a reasonable stand-in for a brand-new signup,
but it is per-browser: the same person on a second device looks new again, and someone who
signed up months before you installed Onbixo looks new on their next visit.
Send the real date if the distinction matters to your flow.
track(eventName, properties)
Record a behavioral event you can then target on.
onbixo.push(["track", eventName, properties]);
| Argument | Type | Description |
|---|---|---|
eventName | string | The event to record, e.g. "created_project". Required. |
properties | object | Optional. Extra data about the event. |
Example
onbixo.push(["track", "created_project", { plan: "pro" }]);
show(flowId)
Manually open a flow whose trigger is set to "manual." Returns whether it was shown.
onbixo.push(["show", flowId]);
| Argument | Type | Description |
|---|---|---|
flowId | number | The ID of the flow to open (from the dashboard). Required. |
Example
onbixo.push(["show", 42]);
relaunch(flowId)
Replay a loaded flow on demand (this powers the resource center's relaunch rows). Tears down the current flow and starts the target, bypassing the "already dismissed" rule.
onbixo.push(["relaunch", flowId]);
| Argument | Type | Description |
|---|---|---|
flowId | number | The ID of the flow to replay. Required. |
Example
onbixo.push(["relaunch", 42]);
completeItem(flowId, itemId)
Mark a checklist item done from your app - use this for verified, not self-reported, completion.
onbixo.push(["completeItem", flowId, itemId]);
| Argument | Type | Description |
|---|---|---|
flowId | string | The checklist flow's key. Required. |
itemId | string | The item to mark complete. Required. |
Example
onbixo.push(["completeItem", "flow-key", "item_1"]);
Flow controls
| Method | What it does |
|---|---|
next() | Advance a step-based flow to the next step (for manual-advance steps). |
prev() | Go back a step. |
dismiss() | Dismiss the active flow. |
reset(flowId) | Clear a flow's local state (seen / dismissed / progress) - handy for demos and testing. |
loadFlows() | Fetch and evaluate the account's published flows (called automatically on load). |
All methods are safe to call - they no-op gracefully if the runtime is still loading or a flow is not available. Nothing you call from your app can break your page.
Call identify as soon as you know who the user is, and track when they do something
meaningful - those two calls unlock most of the targeting power.
Last updated: Sep 14, 2026