Screen Builder Build and above
The Screen Builder is an authoring surface for one standalone screen or quiz section: Editor and Preview only. There is no course map, publish, share, translations, or narration chrome.
Two ways to create a screen with a layout: omit screenId so the embed opens on our layout picker (default), or list layouts and create the screen yourself, then embed with the returned id. Agent tools are off unless you set options.ai. Theme comes from themeId.
API Endpoint
/v1/headless/embed/screenBody parameters
| Field | Type | Example | Description | Demo Value |
|---|---|---|---|---|
action | string | edit | — | — |
type | string | | When set with no screenId and no layoutId, mints an empty screen of that type (for example blocks or blocksQuiz) instead of opening the picker. Omit both to use the picker. | |
layoutId | string | | Catalog layout id from GET /layouts. When set with no screenId, the embed skips the picker and mints immediately with English placeholder copy. | |
identifier | string | your-user-id | — | — |
clientIdentifier | string | your-tenant-id | — | — |
themeId | number | | Custom theme ID to apply to the embeddable. | |
options.back | eventhiddennative | event | Back button behaviour. Use event so cancel on the layout picker posts { type: 'back' } to the host. | |
options.ai | boolean | false | Enable the in-builder agent. Off by default for this embeddable. When on, tools are limited to screen-level block edits. |
Create a screen with a layout
After a layout is applied, open or keep the builder on that screen. On either path, listen on the Screen Player for learner start / complete / failed (and score) once the screen is in play.
| Our picker (default) | Your own picker | |
|---|---|---|
| How | POST /v1/headless/embed/screen with action: edit and no screenId. The embed opens on the layout picker; the user chooses; the screen is created and the editor opens. | GET /v1/headless/layouts to list, then POST /v1/headless/screen with a layoutId. Open the builder with POST /v1/headless/embed/screen, action: edit, and the returned id. |
| You get | Our picker UI, layout previews, placeholder content localised to the viewer, and new layouts appearing automatically as we ship them. | Full control of the picker's look and placement. |
| You handle | screen / created to attach the screen to your course, and back if the user cancels. |
|
Passing layoutId (or type) on POST /embed/screen skips the picker and mints immediately — layoutId seeds the same English catalog copy as POST /screen. See the Screens API.
{
"action": "edit",
"identifier": "your-user-id",
"clientIdentifier": "your-tenant-id"
}[
{
"id": "content-title-text",
"name": "Title Text",
"category": "content",
"screenType": "blocks"
}
]{
"layoutId": "content-title-text",
"identifier": "your-user-id"
}Emitted Events
How to listen to events| Type | Event | Description | Notes |
|---|---|---|---|
session | ready | Fires when the screen builder is mounted and ready. | |
screen | created | Fires when the user chooses a layout and the screen is created. | Same host postMessage channel as the player. data.id is the new screen id — attach it to your course. |
back | — | Fires when the user cancels the layout picker or clicks Back. | Payload is { type: 'back' } with no event field. |
{
"type": "screen",
"event": "created",
"data": { "id": 123 }
}{
"type": "back"
}