Safe API Examples
The public REST API supports credential checks, selected top-level metadata changes, room-data backup/import, asset upload destinations, and build-inventory reads. It does not support hand-authoring native item, trigger, effect, task, or quest payloads from documentation.
Do not upload the legacy raw room-data blocks below. They are historical snapshot examples, not current supported templates. Use Interactive Studio to build gameplay, and use Room Data Format only to preserve a snapshot you downloaded from the exact game you are changing.
For concise supported examples, begin with Authentication, Rooms, and Asset Uploads.
Legacy example 1: Simple room layout
This is a retired snapshot shape, not an upload-ready example. Create the button and its behavior through Interactive Studio instead.
A room with a spawn point, a floor, a red button that shows a notification when clicked, and a light.
Room Data
{
"roomItems": {
"2": {
"prefabName": "SpawnPoint",
"pos": {"x": 0, "y": 0.1, "z": -5},
"rot": {"x": 0, "y": 0, "z": 0, "w": 1},
"scale": {"x": 1, "y": 1, "z": 1},
"modelsize": {"x": 0, "y": 0, "z": 0},
"modelCenter": {"x": 0, "y": 0, "z": 0},
"contentString": "",
"parentItemID": 0,
"placed": true,
"locked": false,
"superLocked": false,
"interactivityType": 0,
"interactivityURL": "",
"hoverTitle": "",
"hoverBodyContent": "",
"ImageInteractivityDetails": {},
"sessionData": "",
"instanceId": "",
"currentEditornetId": 0
},
"3": {
"prefabName": "ResizableCube",
"pos": {"x": 0, "y": -0.05, "z": 0},
"rot": {"x": 0, "y": 0, "z": 0, "w": 1},
"scale": {"x": 20, "y": 0.1, "z": 20},
"modelsize": {"x": 0, "y": 0, "z": 0},
"modelCenter": {"x": 0, "y": 0, "z": 0},
"contentString": "",
"parentItemID": 0,
"placed": true,
"locked": false,
"superLocked": false,
"interactivityType": 0,
"interactivityURL": "",
"hoverTitle": "",
"hoverBodyContent": "",
"ImageInteractivityDetails": {},
"sessionData": "",
"instanceId": "",
"currentEditornetId": 0
},
"4": {
"prefabName": "ResizableCube",
"pos": {"x": 0, "y": 0.5, "z": 0},
"rot": {"x": 0, "y": 0, "z": 0, "w": 1},
"scale": {"x": 1, "y": 1, "z": 1},
"modelsize": {"x": 0, "y": 0, "z": 0},
"modelCenter": {"x": 0, "y": 0, "z": 0},
"contentString": "",
"parentItemID": 0,
"placed": true,
"locked": false,
"superLocked": false,
"interactivityType": 0,
"interactivityURL": "",
"hoverTitle": "Click me!",
"hoverBodyContent": "",
"ImageInteractivityDetails": {},
"sessionData": "",
"instanceId": "",
"currentEditornetId": 0
},
"5": {
"prefabName": "Light",
"pos": {"x": 0, "y": 5, "z": 0},
"rot": {"x": 0, "y": 0, "z": 0, "w": 1},
"scale": {"x": 1, "y": 1, "z": 1},
"modelsize": {"x": 0, "y": 0, "z": 0},
"modelCenter": {"x": 0, "y": 0, "z": 0},
"contentString": "",
"parentItemID": 0,
"placed": true,
"locked": false,
"superLocked": false,
"interactivityType": 0,
"interactivityURL": "",
"hoverTitle": "",
"hoverBodyContent": "",
"ImageInteractivityDetails": {},
"sessionData": "",
"instanceId": "",
"currentEditornetId": 0
}
},
"settings": {
"roomBase": "BlankScene",
"isNight": false,
"tasksRefresh": true,
"roomSettingsExtraData": "{\"showNameTags\":true,\"showEmotes\":true,\"preloadRoom\":false}"
},
"roomTasks": {"Tasks": []},
"quests": {},
"logic": {
"2": "{\"Tasks\":[],\"ViewNodes\":[],\"n\":\"\",\"r\":0}",
"3": "{\"Tasks\":[],\"ViewNodes\":[],\"col\":\"333333\"}",
"4": "{\"Tasks\":[{\"$type\":\"TaskTriggerSubscription\",\"Trigger\":{\"$type\":\"OnClickEvent\"},\"DirectEffector\":{\"Effector\":{\"$type\":\"NotificationPillEvent\",\"nt\":\"Hello! You clicked the button.\",\"c\":\"00FF00\"},\"Id\":\"a1b2c3d4-0001-0001-0001-000000000001\",\"TargetState\":2,\"Name\":\"\"},\"Id\":\"a1b2c3d4-0001-0001-0001-000000000002\",\"TargetState\":2,\"Name\":\"\"}],\"ViewNodes\":[],\"col\":\"FF0000\",\"e\":0.3}",
"5": "{\"Tasks\":[],\"ViewNodes\":[],\"c\":\"FFFFFF\",\"b\":3.0,\"r\":15.0}"
}
}
What This Does
| Item | Description |
|---|---|
"2" |
Spawn point — player appears here |
"3" |
Dark grey floor (20x20) |
"4" |
Red glowing button — shows green notification on click |
"5" |
White overhead light |
Legacy example 2: Collection gameplay
This is a retired snapshot shape, not a recipe. Use the current no-code task and value tools to build collection gameplay, then playtest it in a disposable game.
A room with collectible coins that increment a score variable, a score display, and a trigger zone that congratulates the player.
Room Data
{
"roomItems": {
"2": {
"prefabName": "SpawnPoint",
"pos": {"x": 0, "y": 0.1, "z": -8},
"rot": {"x": 0, "y": 0, "z": 0, "w": 1},
"scale": {"x": 1, "y": 1, "z": 1},
"modelsize": {"x": 0, "y": 0, "z": 0},
"modelCenter": {"x": 0, "y": 0, "z": 0},
"contentString": "",
"parentItemID": 0,
"placed": true,
"locked": false,
"superLocked": false,
"interactivityType": 0,
"interactivityURL": "",
"hoverTitle": "",
"hoverBodyContent": "",
"ImageInteractivityDetails": {},
"sessionData": "",
"instanceId": "",
"currentEditornetId": 0
},
"3": {
"prefabName": "ResizableCube",
"pos": {"x": 0, "y": -0.05, "z": 0},
"rot": {"x": 0, "y": 0, "z": 0, "w": 1},
"scale": {"x": 30, "y": 0.1, "z": 30},
"modelsize": {"x": 0, "y": 0, "z": 0},
"modelCenter": {"x": 0, "y": 0, "z": 0},
"contentString": "",
"parentItemID": 0,
"placed": true,
"locked": false,
"superLocked": false,
"interactivityType": 0,
"interactivityURL": "",
"hoverTitle": "",
"hoverBodyContent": "",
"ImageInteractivityDetails": {},
"sessionData": "",
"instanceId": "",
"currentEditornetId": 0
},
"4": {
"prefabName": "GlbCollectable",
"pos": {"x": -3, "y": 1, "z": 2},
"rot": {"x": 0, "y": 0, "z": 0, "w": 1},
"scale": {"x": 0.5, "y": 0.5, "z": 0.5},
"modelsize": {"x": 0, "y": 0, "z": 0},
"modelCenter": {"x": 0, "y": 0, "z": 0},
"contentString": "<reviewed-model-location>",
"parentItemID": 0,
"placed": true,
"locked": false,
"superLocked": false,
"interactivityType": 0,
"interactivityURL": "",
"hoverTitle": "",
"hoverBodyContent": "",
"ImageInteractivityDetails": {},
"sessionData": "",
"instanceId": "",
"currentEditornetId": 0
},
"5": {
"prefabName": "GlbCollectable",
"pos": {"x": 3, "y": 1, "z": 2},
"rot": {"x": 0, "y": 0, "z": 0, "w": 1},
"scale": {"x": 0.5, "y": 0.5, "z": 0.5},
"modelsize": {"x": 0, "y": 0, "z": 0},
"modelCenter": {"x": 0, "y": 0, "z": 0},
"contentString": "<reviewed-model-location>",
"parentItemID": 0,
"placed": true,
"locked": false,
"superLocked": false,
"interactivityType": 0,
"interactivityURL": "",
"hoverTitle": "",
"hoverBodyContent": "",
"ImageInteractivityDetails": {},
"sessionData": "",
"instanceId": "",
"currentEditornetId": 0
},
"6": {
"prefabName": "GlbCollectable",
"pos": {"x": 0, "y": 1, "z": 5},
"rot": {"x": 0, "y": 0, "z": 0, "w": 1},
"scale": {"x": 0.5, "y": 0.5, "z": 0.5},
"modelsize": {"x": 0, "y": 0, "z": 0},
"modelCenter": {"x": 0, "y": 0, "z": 0},
"contentString": "<reviewed-model-location>",
"parentItemID": 0,
"placed": true,
"locked": false,
"superLocked": false,
"interactivityType": 0,
"interactivityURL": "",
"hoverTitle": "",
"hoverBodyContent": "",
"ImageInteractivityDetails": {},
"sessionData": "",
"instanceId": "",
"currentEditornetId": 0
},
"7": {
"prefabName": "WorldText",
"pos": {"x": 0, "y": 3, "z": 0},
"rot": {"x": 0, "y": 0, "z": 0, "w": 1},
"scale": {"x": 1, "y": 1, "z": 1},
"modelsize": {"x": 0, "y": 0, "z": 0},
"modelCenter": {"x": 0, "y": 0, "z": 0},
"contentString": "",
"parentItemID": 0,
"placed": true,
"locked": false,
"superLocked": false,
"interactivityType": 0,
"interactivityURL": "",
"hoverTitle": "",
"hoverBodyContent": "",
"ImageInteractivityDetails": {},
"sessionData": "",
"instanceId": "",
"currentEditornetId": 0
},
"8": {
"prefabName": "Trigger",
"pos": {"x": 0, "y": 1, "z": 8},
"rot": {"x": 0, "y": 0, "z": 0, "w": 1},
"scale": {"x": 4, "y": 3, "z": 4},
"modelsize": {"x": 0, "y": 0, "z": 0},
"modelCenter": {"x": 0, "y": 0, "z": 0},
"contentString": "",
"parentItemID": 0,
"placed": true,
"locked": false,
"superLocked": false,
"interactivityType": 0,
"interactivityURL": "",
"hoverTitle": "",
"hoverBodyContent": "",
"ImageInteractivityDetails": {},
"sessionData": "",
"instanceId": "",
"currentEditornetId": 0
},
"9": {
"prefabName": "Light",
"pos": {"x": 0, "y": 6, "z": 0},
"rot": {"x": 0, "y": 0, "z": 0, "w": 1},
"scale": {"x": 1, "y": 1, "z": 1},
"modelsize": {"x": 0, "y": 0, "z": 0},
"modelCenter": {"x": 0, "y": 0, "z": 0},
"contentString": "",
"parentItemID": 0,
"placed": true,
"locked": false,
"superLocked": false,
"interactivityType": 0,
"interactivityURL": "",
"hoverTitle": "",
"hoverBodyContent": "",
"ImageInteractivityDetails": {},
"sessionData": "",
"instanceId": "",
"currentEditornetId": 0
}
},
"settings": {
"roomBase": "BlankScene",
"isNight": false,
"tasksRefresh": true,
"roomSettingsExtraData": "{\"numericParameters\":[{\"N\":\"coins\",\"VT\":0,\"M\":false,\"P\":false}],\"showNameTags\":true,\"showQuestLog\":false,\"preloadRoom\":false}"
},
"roomTasks": {"Tasks": []},
"quests": {},
"logic": {
"2": "{\"Tasks\":[],\"ViewNodes\":[],\"n\":\"\",\"r\":0}",
"3": "{\"Tasks\":[],\"ViewNodes\":[],\"col\":\"2D5A27\"}",
"4": "{\"Tasks\":[],\"ViewNodes\":[],\"valueLabel\":\"coins\",\"valueChange\":1,\"displayValue\":true,\"a\":true,\"l\":true,\"minRespawnTime\":5.0,\"maxRespawnTime\":10.0}",
"5": "{\"Tasks\":[],\"ViewNodes\":[],\"valueLabel\":\"coins\",\"valueChange\":1,\"displayValue\":true,\"a\":true,\"l\":true,\"minRespawnTime\":5.0,\"maxRespawnTime\":10.0}",
"6": "{\"Tasks\":[],\"ViewNodes\":[],\"valueLabel\":\"coins\",\"valueChange\":1,\"displayValue\":true,\"a\":true,\"l\":true,\"minRespawnTime\":5.0,\"maxRespawnTime\":10.0}",
"7": "{\"Tasks\":[],\"ViewNodes\":[],\"text\":\"<b><color=#FFD700>Coins: |coins|</color></b>\",\"lookAtCamera\":true}",
"8": "{\"Tasks\":[{\"$type\":\"TaskTriggerSubscription\",\"Trigger\":{\"$type\":\"OnEnterEvent\"},\"DirectEffector\":{\"Effector\":{\"$type\":\"FunctionEffector\",\"V\":\"if($N{coins} >= 3.0, SetVariable('coins', 0.0, 0.0), 0.0)\"},\"Id\":\"b1b2c3d4-0001-0001-0001-000000000001\",\"TargetState\":2,\"Name\":\"\"},\"Id\":\"b1b2c3d4-0001-0001-0001-000000000002\",\"TargetState\":2,\"Name\":\"\"},{\"$type\":\"TaskTriggerSubscription\",\"Trigger\":{\"$type\":\"OnEnterEvent\"},\"DirectEffector\":{\"Effector\":{\"$type\":\"NotificationPillEvent\",\"nt\":\"You collected |coins| coins!\",\"c\":\"FFD700\"},\"Id\":\"b1b2c3d4-0001-0001-0001-000000000003\",\"TargetState\":2,\"Name\":\"\"},\"Id\":\"b1b2c3d4-0001-0001-0001-000000000004\",\"TargetState\":2,\"Name\":\"\"}],\"ViewNodes\":[],\"events\":[],\"opacity\":0.01}",
"9": "{\"Tasks\":[],\"ViewNodes\":[],\"c\":\"FFD700\",\"b\":4.0,\"r\":20.0}"
}
}
What This Does
| Item | Description |
|---|---|
"2" |
Spawn point |
"3" |
Green floor |
"4" – "6" |
Three collectible coins, each adds 1 to coins variable, respawns in 5-10 seconds |
"7" |
Billboard text showing live coin count using |coins| pipe syntax |
"8" |
Trigger zone — when entered, shows notification with coin count. If 3+ coins, resets to 0. |
"9" |
Gold-colored light |
Key Concepts Demonstrated
- Variables:
coinsdefined innumericParametersin settings - Collectibles:
GlbCollectablewithvalueLabelandvalueChange - Live text: WorldText using
|coins|pipe syntax - FunctionEffector: Conditional logic in trigger zone
- Multiple interactions: Two tasks on the same trigger zone
Legacy example 3: State-driven door
This is a retired snapshot shape, not a recipe. Build state-driven behavior in Interactive Studio and preserve a downloaded snapshot only when a separate supported automation workflow requires it.
A room with a button that opens a door when clicked, using the quest system for persistent state.
Room Data
{
"roomItems": {
"2": {
"prefabName": "SpawnPoint",
"pos": {"x": 0, "y": 0.1, "z": -5},
"rot": {"x": 0, "y": 0, "z": 0, "w": 1},
"scale": {"x": 1, "y": 1, "z": 1},
"modelsize": {"x": 0, "y": 0, "z": 0},
"modelCenter": {"x": 0, "y": 0, "z": 0},
"contentString": "",
"parentItemID": 0,
"placed": true,
"locked": false,
"superLocked": false,
"interactivityType": 0,
"interactivityURL": "",
"hoverTitle": "",
"hoverBodyContent": "",
"ImageInteractivityDetails": {},
"sessionData": "",
"instanceId": "",
"currentEditornetId": 0
},
"3": {
"prefabName": "ResizableCube",
"pos": {"x": 0, "y": -0.05, "z": 0},
"rot": {"x": 0, "y": 0, "z": 0, "w": 1},
"scale": {"x": 20, "y": 0.1, "z": 20},
"modelsize": {"x": 0, "y": 0, "z": 0},
"modelCenter": {"x": 0, "y": 0, "z": 0},
"contentString": "",
"parentItemID": 0,
"placed": true,
"locked": false,
"superLocked": false,
"interactivityType": 0,
"interactivityURL": "",
"hoverTitle": "",
"hoverBodyContent": "",
"ImageInteractivityDetails": {},
"sessionData": "",
"instanceId": "",
"currentEditornetId": 0
},
"4": {
"prefabName": "ResizableCube",
"pos": {"x": -2, "y": 0.5, "z": 0},
"rot": {"x": 0, "y": 0, "z": 0, "w": 1},
"scale": {"x": 1, "y": 1, "z": 1},
"modelsize": {"x": 0, "y": 0, "z": 0},
"modelCenter": {"x": 0, "y": 0, "z": 0},
"contentString": "",
"parentItemID": 0,
"placed": true,
"locked": false,
"superLocked": false,
"interactivityType": 0,
"interactivityURL": "",
"hoverTitle": "Open Door",
"hoverBodyContent": "Click to open",
"ImageInteractivityDetails": {},
"sessionData": "",
"instanceId": "",
"currentEditornetId": 0
},
"5": {
"prefabName": "ResizableCube",
"pos": {"x": 3, "y": 1.5, "z": 0},
"rot": {"x": 0, "y": 0, "z": 0, "w": 1},
"scale": {"x": 0.2, "y": 3, "z": 2},
"modelsize": {"x": 0, "y": 0, "z": 0},
"modelCenter": {"x": 0, "y": 0, "z": 0},
"contentString": "",
"parentItemID": 0,
"placed": true,
"locked": false,
"superLocked": false,
"interactivityType": 0,
"interactivityURL": "",
"hoverTitle": "",
"hoverBodyContent": "",
"ImageInteractivityDetails": {},
"sessionData": "",
"instanceId": "",
"currentEditornetId": 0
},
"6": {
"prefabName": "Light",
"pos": {"x": 0, "y": 5, "z": 0},
"rot": {"x": 0, "y": 0, "z": 0, "w": 1},
"scale": {"x": 1, "y": 1, "z": 1},
"modelsize": {"x": 0, "y": 0, "z": 0},
"modelCenter": {"x": 0, "y": 0, "z": 0},
"contentString": "",
"parentItemID": 0,
"placed": true,
"locked": false,
"superLocked": false,
"interactivityType": 0,
"interactivityURL": "",
"hoverTitle": "",
"hoverBodyContent": "",
"ImageInteractivityDetails": {},
"sessionData": "",
"instanceId": "",
"currentEditornetId": 0
}
},
"settings": {
"roomBase": "BlankScene",
"isNight": false,
"tasksRefresh": true,
"roomSettingsExtraData": "{\"preloadRoom\":true}"
},
"roomTasks": {"Tasks": []},
"quests": {
"mlhab7cd3efg12": {
"EntryId": "07b29300-f6df-47e4-8f55-5aa697303896",
"Name": "0_open_door",
"Description": "created in unity",
"Status": "inProgress",
"Group": "",
"DisplayGroup": "",
"Enabled": true,
"RepeatableLimit": 0,
"FinishTime": 0,
"AutoStart": false,
"TriggeredByInventory": false,
"Requirements": [],
"Creator": "YOUR_FIREBASE_UID",
"TemplateName": "",
"Tracked": true,
"Visible": false,
"ExtraText": "",
"id": "mlhab7cd3efg12"
},
"mlhxy9zw2abc34": {
"EntryId": "07b29300-f6df-47e4-8f55-5aa697303896",
"Name": "0_open_door",
"Description": "created in unity",
"Status": "completed",
"Group": "",
"DisplayGroup": "",
"Enabled": true,
"RepeatableLimit": 0,
"FinishTime": 0,
"AutoStart": false,
"TriggeredByInventory": false,
"Requirements": [],
"Rewards": [],
"Creator": "YOUR_FIREBASE_UID",
"TemplateName": "",
"Tracked": true,
"Visible": false,
"ExtraText": "",
"SuccessMsg": "",
"id": "mlhxy9zw2abc34"
}
},
"logic": {
"2": "{\"Tasks\":[],\"ViewNodes\":[],\"n\":\"\",\"r\":0}",
"3": "{\"Tasks\":[],\"ViewNodes\":[],\"col\":\"444444\"}",
"4": "{\"Tasks\":[{\"$type\":\"TaskTriggerSubscription\",\"Trigger\":{\"$type\":\"OnClickEvent\"},\"Id\":\"c1c2c3c4-0001-0001-0001-000000000001\",\"TargetState\":111,\"Name\":\"0_open_door\",\"TaskTriggerId\":\"mlhab7cd3efg12\"},{\"$type\":\"TaskTriggerSubscription\",\"Trigger\":{\"$type\":\"OnClickEvent\"},\"DirectEffector\":{\"Effector\":{\"$type\":\"NotificationPillEvent\",\"nt\":\"Door opened!\",\"c\":\"00FF00\"},\"Id\":\"c1c2c3c4-0001-0001-0001-000000000002\",\"TargetState\":2,\"Name\":\"\"},\"Id\":\"c1c2c3c4-0001-0001-0001-000000000003\",\"TargetState\":2,\"Name\":\"\"}],\"ViewNodes\":[],\"col\":\"00AA00\",\"e\":0.5}",
"5": "{\"Tasks\":[{\"$type\":\"TaskEffectorSubscription\",\"Effector\":{\"$type\":\"MoveToSpot\",\"_transformState\":{\"position\":[3,1.5,0],\"rotation\":[0,0,0,1],\"scale\":[0.2,3,2],\"duration\":0.0}},\"Id\":\"d1d2d3d4-0001-0001-0001-000000000001\",\"Name\":\"0_open_door\",\"TaskTriggerId\":\"mlhab7cd3efg12\"},{\"$type\":\"TaskEffectorSubscription\",\"Effector\":{\"$type\":\"MoveToSpot\",\"_transformState\":{\"position\":[3,5,0],\"rotation\":[0,0,0,1],\"scale\":[0.2,3,2],\"duration\":2.0}},\"Id\":\"d1d2d3d4-0001-0001-0001-000000000002\",\"TargetState\":1,\"Name\":\"0_open_door\",\"TaskTriggerId\":\"mlhab7cd3efg12\"}],\"ViewNodes\":[],\"col\":\"8B4513\"}",
"6": "{\"Tasks\":[],\"ViewNodes\":[],\"c\":\"FFFFFF\",\"b\":3.0,\"r\":15.0}"
}
}
What This Does
| Item | Description |
|---|---|
"2" |
Spawn point |
"3" |
Grey floor |
"4" |
Green glowing button — clicking it advances quest 0_open_door from Not Active to Active (TargetState 111) and shows a notification |
"5" |
Brown door — has two quest states: State 0 (Not Active) keeps it at its starting position; State 1 (Active) animates it upward over 2 seconds |
"6" |
White light |
Key Concepts Demonstrated
- Quest pair: Two entries in
questssharingEntryIdwith differentidvalues - Click-to-advance-quest:
TaskTriggerSubscriptionwithTargetState: 111andTaskTriggerId - Quest-driven animation:
TaskEffectorSubscriptionwithMoveToSpoton the door - 3-state pattern: State 0 has no
TargetStatefield, State 1 has"TargetState": 1 Creatorfield: ReplaceYOUR_FIREBASE_UIDwith your actual Firebase UID from authentication
Supported backup-first workflow
Do not upload any raw snapshot from the examples above. These old blocks are not current authoring templates. For a supported REST workflow:
- Use Authentication from a secure server-side environment to confirm the credential you already control.
- Download the exact game snapshot with Rooms and keep an untouched copy.
- Make one deliberate change in a copied file, preserving data you do not understand.
- Host the reviewed JSON at a location whose
HEADresponse includesContent-Lengthand whose size is 50 MB or smaller. - Import it with Rooms, then join the game and test the affected player path.
If you use the JSON upload route during that workflow, its returned upload destination is short-lived and credential-bearing. Keep it out of browser code, source control, documentation, logs, and screenshots. The returned JSON location can be removed after a successful import, so retain your original backup elsewhere.
Related Pages
- Room Data Format — backup-first snapshot transport behavior
- Build Items — read the creator assets available to a game
- Interactions — safe boundary between snapshots and no-code authoring
- Tasks and Quest State — preserve existing state without hand-authoring raw records
- Settings — metadata updates and safe runtime-settings workflow
- Function Effects — choose the supported in-game tooling
- Rooms — supported room workflows
- Asset Uploads — temporary upload-destination workflow
