Skip to content

REST API Reference

Basics

  • Base URL: https://virvi.io for hosted Virvi, or your server’s PUBLIC_URL. Paths below are complete: every API route starts with /api/, except the platform hooks (/hook/...).
  • Auth: “Yes” means send Authorization: Bearer <token>, where the token is an access token or an API key. “No” means public.
  • Bodies: JSON (Content-Type: application/json) unless noted.
  • Errors: { "error": "…" }, sometimes with message. Other accounts’ resources usually answer 404.
  • Rate limit: RATE_LIMIT_MAX requests per minute per IP across /api/ (300 by default).
  • Request IDs: every response has an x-request-id header. Quote it when reporting a problem.
  • Versioning: every /api/... route also answers at /api/v1/... (for example GET /api/v1/scenes), with the same checks. v1 is the API as it is today: build on the /api/v1 paths, as the TypeScript SDK does, and they keep working as they do now. Changes that would break callers come under a new version instead.

OpenAPI

Every server publishes its own route list:

URLWhat
<base>/api/docsSwagger UI
<base>/api/docs/jsonOpenAPI 3 document (JSON)
<base>/api/docs/yamlThe same, as YAML

It lists every route the server has, with its method and path, and bearer-token security. Most routes don’t declare request or response schemas, so use this page for bodies and the OpenAPI document for the complete list.

This page covers the routes most integrations need. Admin and internal routes are left out.

Health and instance

MethodPathAuthDescription
GET/api/healthNo200 with { status, mode, version, timestamp, checks, uptime }; 503 when Postgres doesn’t answer
GET/api/statusNoThe status page’s data: { state, components, incidents, since, generatedAt }, cached 30 s
GET/api/instanceNo{ mode, version, ... } plus branding on self-hosted installs

Scenes, presets and elements

A scene has presets; the live preset’s elements (images, video screens, models, sounds, widgets, ad spaces) have instances (placed copies).

MethodPathAuthDescription
GET/api/scenesYes{ scenes }: scenes you own or have a role in
POST/api/scenesYesCreate a scene: { name, description? }
GET/api/scenes/:sceneIdYes{ scene } with its presets, elements and instances
PUT/api/scenes/:sceneIdYesUpdate the scene
DELETE/api/scenes/:sceneIdYesDelete the scene (restorable for 30 days: POST /api/scenes/:sceneId/restore; GET /api/scenes/deleted lists them)
PUT/api/scenes/:sceneId/thumbnailYesSet the scene’s thumbnail: { fileData } (base64). A 16:9 PNG, JPEG or WebP (checked by its bytes), at most 2 MB and at least 960 × 540 px; larger images are scaled to 1920 × 1080 and WebP is stored as JPEG (PNG with transparency). Counts towards the scene owner’s storage; replacing deletes the old file. Needs edit access (host, co-host or editor). The scene’s thumbnailSource becomes upload (an imported scene’s own is import, and isn’t deployed by Virvi). Returns { scene }. Errors: 400 wrong_shape / too_small / missing_file, 413 too_large, 415 unsupported_type, 403 storage_limit_reached, 403, 404
DELETE/api/scenes/:sceneId/thumbnailYesRemove the scene’s thumbnail and its file. Returns { scene }
POST/api/scenes/:sceneId/presetsYesCreate a preset: { name, fromPresetId? } (blank, or a copy)
PATCH/api/presets/:presetIdYesRename a preset: { name }
DELETE/api/presets/:presetIdYesDelete a preset (409 if it’s live, the only one, a venue default, or used by a booking or schedule)
POST/api/presets/:presetId/activateYesMake a preset live for everyone in the scene. Returns { activePresetId }. Hosts, co-hosts and editors
GET/POST/api/scenes/:sceneId/preset-schedulesYesList or add scheduled presets. Pass eventId (an event linked to the scene) to follow that event’s start and end; the times then move when the event is edited, pause if it loses them, and the schedule goes when the scene is unlinked. The list includes status: why the live preset is live (none, booking, schedule or manual) and the next scheduled switch, plus week: every enabled run starting from a day ago to 8 days ahead
PATCH/DELETE/api/preset-schedules/:scheduleIdYesEdit, pause ({ enabled: false }) or delete a schedule
POST/api/presets/:presetId/elementsYesCreate an element: { type, name, enabled?, customId?, customRendering?, clickEvent?, properties? }
PUT/api/elements/:elementIdYesUpdate an element (same fields). { "enabled": false } hides it
DELETE/api/elements/:elementIdYesDelete an element and its instances
POST/api/elements/:elementId/liveYesVideo screens: { "enabled": true } or false turns the live stream on or off
POST/api/elements/:elementId/instancesYesPlace an instance
PUT/api/instances/:instanceIdYesUpdate an instance (position, rotation, scale, …)
DELETE/api/instances/:instanceIdYesRemove an instance
GET/POST/api/elements/:elementId/showingsYesA video screen’s scheduled showings
GET/api/scenes/:sceneId/backup.zipYesA ready-to-deploy Decentraland project of the scene, without Virvi, as a zip (the live preset only; filename in Content-Disposition). Needs edit access; an imported scene’s own code is included only for its importer and full-access members. Optional ?destination=<id> (one of the scene’s destinations) places a scene built in Virvi there. Errors: 404 (also destination_not_found), 403, 413 backup_too_big (over 500 MB; the message names the largest files), 422 not_decentraland (no import and no Decentraland destination), 429 backup_busy, 504 backup_timeout

| GET | /api/presets/:presetId/rules | Yes | The preset’s rules: { rules, limit }. Hosts, co-hosts and editors | | POST | /api/presets/:presetId/rules | Yes | Add a rule: { name?, trigger: { type: "widget", widgetId, when: "on" \| "off" \| "press" \| "change" } \| { type: "time", widgetId, timezone } \| { type: "click", elementId }, actions: [{ type: "show" \| "hide" \| "toggle", elementId } \| { type: "volume" \| "brightness", elementId } \| { type: "choose", choices: [{ option, elementId }] } \| { type: "preset", presetId }] }. on and off are for Toggle widgets, press for Triggers, time (with an IANA time zone such as Europe/London) for Date and time widgets, and click for an image, video screen or model visitors click in-world. volume (a sound or video screen) and brightness (an image or video screen, drawn in Decentraland) need a Slider trigger and set the value to the slider’s over 100. choose needs a Selector trigger: the chosen option’s items are shown and the others hidden. Up to 10 actions, 50 rules per preset. Errors: 400 bad_trigger / bad_actions / bad_name, 409 too_many_rules | | PATCH/DELETE | /api/rules/:ruleId | Yes | Change (any of name, enabled, trigger, actions) or delete a rule | | GET | /api/scenes/:sceneId/state | Yes | The scene’s state: { state, writes, limits }, where writes is staff or everyone. Anyone with a role in the scene | | PUT | /api/scenes/:sceneId/state/:key | Yes | Set one key: { value } (any JSON, up to 4 KB). Returns { key, value }. Hosts, co-hosts and editors. Errors: 400 bad_key / bad_value / value_too_large, 409 too_many_keys (100 per scene) | | DELETE | /api/scenes/:sceneId/state/:key | Yes | Delete one key (204; 404 if it isn’t set) | | PUT | /api/scenes/:sceneId/state-settings | Yes | Who may change the state from in-world: { writes: "staff" } (editors, the default) or "everyone" (every visitor’s scene code) |

Changes made through these routes reach players in the scene in real time.

Roles and collaborators

MethodPathAuthDescription
GET/api/scenes/:sceneId/rolesYesWallet roles in the scene (host, co-host, editor, viewer)
POST/api/scenes/:sceneId/rolesYesGive a wallet a role
DELETE/api/scenes/:sceneId/roles/:walletYesRemove a wallet’s role
POST/api/scenes/:sceneId/transfer-hostYesHand the host role to a co-host
GET/api/scenes/:sceneId/healthYesTriangles, entities and file size against Decentraland’s limits for each destination, biggest models and suggestions (host, co-hosts, editors)
GET/api/scenes/:sceneId/activityYesWho changed what, newest first (host and co-hosts). { entries, more }; pass ?before=<at>,<id> of the last entry for older ones
GET/POST/api/scenes/:sceneId/collaboratorsYesList or invite account collaborators: { email, role }
PUT/DELETE/api/scenes/:sceneId/collaborators/:userIdYesChange or remove one

Media and 3D models

MethodPathAuthDescription
GET/api/mediaYesYour images and video
POST/api/media/uploadYesUpload an image or video
DELETE/api/media/:assetIdYesDelete one
GET/api/assetsNoBrowse or search 3D models (the asset library)
GET/api/assets/:idNoOne model
GET/api/assets/categoriesNoCategories
POST/api/assetsYesUpload a GLB. Always private until you share it
PUT/api/assets/:idYesUpdate its details (not isPublic or license: use share)
DELETE/api/assets/:idYesDelete it. One that another account’s scene uses stays for that scene
POST/api/assets/:id/shareYesShare your model: { license, rightsConfirmed: true, credit? }
POST/api/assets/:id/unshareYesMake it private again; scenes that have it keep it
POST/api/assets/:id/reportYesReport a shared model: { reason, details? }
GET/api/catalog/packsNoThe free catalog packs
GET/api/scenes/:sceneId/libraryYesThe scene’s shared library
POST/api/scenes/:sceneId/libraryYesAdd one of your files to it
POST/api/scenes/:sceneId/library/uploadYesUpload straight into it
PATCH/DELETE/api/scenes/:sceneId/library/:idYesRename or remove an item (the file isn’t deleted)

GET /api/assets lists public assets, plus your own private ones when you send a token. To narrow it:

  • scope=public lists public assets only, even when you’re signed in.
  • scope=community lists only models people shared, without Virvi’s catalog.
  • mine=all, mine=studio or mine=uploads lists only your own assets: all of them, only Design Studio pieces, or only the rest. A signed-out request gets an empty list.

Each asset has mine (it’s yours). uploadedBy is only included on your own; other people’s carry their credit in author.

license for share is one of cc0-1.0, cc-by-4.0, cc-by-sa-4.0, cc-by-nd-4.0, cc-by-nc-4.0, cc-by-nc-sa-4.0, cc-by-nc-nd-4.0 or virvi-only. A report’s reason is one of copyright, offensive, private_info, broken, spam or other.

Decentraland deploys

MethodPathAuthDescription
GET/api/scenes/:sceneId/dcl/destinationsYesThe scene’s destinations (Worlds and parcels)
POST/api/dcl/destinationsYesConnect a World to a scene
DELETE/api/dcl/destinations/:idYesDisconnect it (nothing changes in Decentraland)
POST/api/dcl/destinations/:id/deployYesDeploy now: Virvi signs if it may, otherwise returns what to sign
POST/api/deploy/:id/signatureYesThe owner’s signature for a prepared deploy
POST/api/dcl/destinations/:id/rebaseYesAccept what is live in Decentraland now
GET/api/deploy/:idYesA deployment’s status
GET/api/deploy/:id/files.zipYesThe files a World deployment put live
GET/api/deploy/scene/:sceneIdYesThe scene’s deployments
POST/api/deploy/:id/cancelYesCancel a pending or building deployment
GET/api/deploy/platformsYesPlatforms this server can deploy to
GET/api/dcl/namesYesYour wallets’ Decentraland names and Worlds

Deploying needs full access to the scene (host or co-host).

Destinations

Where a scene deploys to: a World or a set of Genesis City parcels. Parcel destinations deploy only after you sign, or after Virvi has been made an operator on every parcel.

MethodPathAuthDescription
GET/api/dcl/destinations/:idYesDestination detail: kind (world or parcels), parcels, signers (your wallets that can deploy), pending models and the last deployment
GET/api/dcl/destinations/:id/parcel-grantYesParcels: whether Virvi can be made an operator, whether it already is on-chain (granted) and deploys (active), the wallet to send from (from) and the transactions to send
POST/api/dcl/destinations/:id/parcel-grant/checkYesParcels: read the rights fresh; Virvi deploys once it is an operator
GET/api/dcl/destinations/:id/parcel-grant/revokeYesParcels: the transactions that remove Virvi as operator
POST/api/dcl/destinations/:id/parcel-grant/revoke/checkYesParcels: back to browser signing once Virvi is no longer an operator

Parcel routes need full access to the scene. Aetheria parcels report aetheria: true and return no grant transactions; when Decentraland can’t say, aetheria is null and no transactions are returned. World destinations answer the parcel-grant routes with 409 not_parcels; use their grant and revoke routes instead.

The World permission routes (GET, POST and DELETE /api/dcl/destinations/:id/grant, POST /api/dcl/destinations/:id/revoke) answer parcels destinations with 409 not_a_world. PATCH /api/dcl/destinations/:id with mode: "virvi" on parcels needs the on-chain grant first: 409 not_granted until Virvi is an operator on every parcel, 409 aetheria_managed on Aetheria land. mode: "sign" is always allowed and free.

Scene import

See Scene Import.

MethodPathAuthDescription
POST/api/importsYesUpload a scene zip as the raw request body. Checked, Virvi installed, stored, build started
GET/api/importsYesYour last 10 imports; ?sceneId= for a scene’s
GET/api/imports/:idYesOne import
GET/api/imports/:id/logYesIts build log, as text
POST/api/imports/:id/deployYesDeploy it

Self-hosted servers refuse imports unless SCENE_BUILD_RUNNER is set (see Environment Variables).

Hyperfy

MethodPathAuthDescription
GET/api/hyperfy/app.hypNoThe Virvi app for Hyperfy
GET/api/hyperfy/worldsYesYour connected and hosted worlds; ?sceneId= for one scene’s
POST/api/hyperfy/worldsYesConnect a world (kind: "self") or create a hosted one: { sceneId, name, kind?, endsAt? }. Returns the world key once
POST/api/hyperfy/worlds/:id/rotate-keyYesReplace the world key
DELETE/api/hyperfy/worlds/:idYesDisconnect or destroy
GET/api/hyperfy/feedWorld key as BearerWhat the Hyperfy app reads

Events and giveaways

MethodPathAuthDescription
GET/POST/api/eventsYesList or create events
GET/PUT/DELETE/api/events/:eventIdYesOne event
POST/api/events/:eventId/link-sceneYesLink a scene
DELETE/api/events/:eventId/unlink-scene/:sceneIdYesUnlink it
GET/api/giveaways/availabilityYesWhether automatic giveaways are on, and whether your plan covers gas
GET/POST/api/giveawaysYesList or create giveaways (each gets its own wallet)
GET/api/giveaways/creator-items?chain=YesPublished wearables and emotes your wallets created or may mint
GET/PATCH/DELETE/api/giveaways/:idYesOne giveaway: read, edit or switch on, delete
PUT/api/giveaways/:id/itemsYesSet its items (1 to 10)
PUT/api/giveaways/:id/scenesYesSet the scenes it shows in
GET/api/giveaways/:id/claimsYesIts claims, 50 a page (?cursor=)
POST/api/giveaways/:id/send-backYesSend your POL back to a wallet verified on your account

Command Center

See Command Center.

MethodPathAuthDescription
GET/api/command-center/:eventId/statusYesThe event’s linked scenes with their latest deployment. Event owner or instance admin
POST/api/command-center/:eventId/broadcastYes{ action, targetScenes? }: sends action to the platform hooks of every linked scene you have full access to

Streaming

MethodPathAuthDescription
POST/api/streaming/provisionYesCreate a stream key: { name, sceneId? }. 403 unless streaming is on
GET/api/streamingYesYour stream servers
GET/api/streaming/:idYesOne
DELETE/api/streaming/:idYesDelete it
GET/api/streaming/:id/sessionsYesIts sessions
POST/api/streaming/authorize, /api/streaming/webhook; GET /api/streaming/live-keysKeyFor the media server only, with X-Webhook-Key: <STREAMING_WEBHOOK_KEY>

Companion upload

MethodPathAuthDescription
POST/api/upload-tokensYesCreate an upload code
GET/api/upload/:codeCodeCheck a code
GET/api/upload/:code/qr.pngCodeA QR code for it
POST/api/upload/:code/start, then /api/upload/:code/:assetIdCodeAnnounce a file, then send its bytes. Models go in the scene owner’s 3D Models (private), images and video in Images & Video

API keys

MethodPathAuthDescription
POST/api/keysYes (account, not a key)Create a key; returned once. access: full (default) or read (read-only: every request but GET gets 403 read_only_key). sceneIds: limit the key to those scenes (up to 50, each one you can open); it then works only on routes whose URL names one of them, plus GET /api/scenes (filtered) and /mcp, and gets 403 key_scene_limited everywhere else
GET/api/keysYesList your keys
GET/api/webhooksYesYour webhooks, and the events they can send (Webhooks)
POST/api/webhooksYesAdd one: { url, events }; the signing secret is returned once
DELETE/api/webhooks/:webhookIdYesDelete one
POST/api/webhooks/:webhookId/testYesSend a webhook.test delivery now
GET/api/webhooks/:webhookId/deliveriesYesThe last 50 deliveries
GET/api/keys/:keyId/callsYesYour key’s last 100 MCP tool calls: tool, scene, outcome and time
DELETE/api/keys/:keyIdYesDelete a key
POST/mcpYes (a key)The MCP server (Streamable HTTP, JSON-RPC, stateless). See Use Virvi with your agent

Organizations

MethodPathAuthDescription
GET/POST/api/orgsYesYour organizations; create one
PUT/api/orgs/:orgIdYesUpdate one
GET/api/orgs/:orgId/membersYesMembers
POST/api/orgs/:orgId/invitesYesInvite by email
POST/api/orgs/accept-inviteYesAccept an invite
PUT/api/orgs/:orgId/activeYesMake it your active organization
DELETE/api/orgs/:orgId/members/:userIdYesRemove a member

Billing (hosted Virvi)

Only when billing is on (STRIPE_SECRET_KEY set, or cloud mode).

MethodPathAuthDescription
POST/api/billing/checkoutYesStart a Stripe Checkout session for a plan: { "tier": "creator" | "pro" | "studio" }. 503 plan_unavailable when the plan’s price isn’t set
GET/api/billing/plansYesEach plan’s limits (unlimited is null), price and whether it can be bought
POST/api/billing/portalYesOpen the Stripe customer portal
GET/api/billing/subscriptionYesYour plan and limits
GET/api/billing/usageYesUsage against the limits
POST/api/billing/webhookStripe signatureStripe webhooks

Platform hooks

For platforms that can only make HTTP calls (for example Second Life). No sign-in: a hook names its sceneId.

MethodPathAuthDescription
POST/hook/registerNo{ sceneId, callbackUrl, platform, elementId?, elementType?, mode?, region?, metadata? }. Registers (or refreshes) a callback and returns the current config
GET/hook/config?sceneId=&elementId=&elementType=NoOne element’s compact config
GET/hook/scene?sceneId=NoThe whole scene’s config
GET/api/hooksYesHooks on scenes you fully control
DELETE/api/hooks/:hookIdYesRemove one (full access to its scene)

Virvi POSTs JSON to each callbackUrl when the scene changes, with an action of config_update, preset_change, video_status or cross_world_update (from the Command Center). It waits up to 5 seconds.

  • A callback that hasn’t re-registered for 5 minutes is removed. Call /hook/register again every few minutes.
  • After 3 failed deliveries in a row, a callback is removed.

Hooks return the same scene content a visitor sees in-world. Rules for callbackUrl:

  • It must resolve to a public address. Loopback, private and link-local addresses are refused with 400 callback_url_not_allowed, at registration and again on each callback.
  • A scene can hold at most 20 hooks; one more returns 429 too_many_callbacks.
  • Stream keys are never sent to hooks.

Hooks are listed with GET /api/hooks and removed with DELETE /api/hooks/:hookId by anyone with full access to the scene.