Quick Start

How to start using our API on one of the embedded models on your site.

The Basics

To begin using the API with an embedded model:

  1. Import the API as a module.

  2. Create an API instance and pass the DOM id of the iframe containing the embed (web component coming soon).

  3. Wait for the instance to initialize.

  4. Use the available methods to interact with the model.

A new API instance is required for each embedded model.

Async Methods

All API communication is handled using postMessage events. As a result, all methods return Promises.

Errors

Errors returned by API methods reject the corresponding Promise. Rejection includes a standardized error format for consistent handling.

{
    status: "error",
    error?: string
}

Init

init

isReady

isReady

postViewData

projectInfo

Last updated