background

API reference

Open the maintained MCP & API documentation
base url
https://portals.to

This entry point keeps a compact endpoint index for integrations. Use the maintained documentation reference for safety guidance and current workflow details. Get your key from the access page. Some endpoints use x-access-key and asset upload endpoints use x-api-key — both accept the same key.

authentication

1
POST/api/v2/mcp/verify-access-key

Validates an access key and returns the associated user ID.

request body

accessKeystringreq

response

{ data: { uid: string } }

rooms

5
POST/api/v2/rooms/create

Creates a new room from a template.

headers

x-access-key: <your-access-key>

request body

templateNamestringreqname of the template to use
customTemplateNamestringoptcustom template name

response

{ code: "SUCCESS", room: { RoomID: string, ... } }
POST/api/v2/rooms/duplicate

Duplicates an existing room and returns the new room ID.

headers

x-access-key: <your-access-key>

request body

roomIdstringreq

response

{ code: "SUCCESS", roomId: string, message: string }
POST/api/v2/room/update-room-settings

Updates the documented allowlist of top-level game metadata. The request body must wrap fields in room.

headers

x-access-key: <your-access-key>

request body

room.RoomIDstringreq
room.Namestringopt
room.Descriptionstringopt
room.Imagestringoptimage URL
room.HideNameOnLoadingScreenbooleanopt
room.ShortDescriptionstringoptrequired when publishing

response

{ data: { RoomID: string, ... } }
GET/api/v2/mcp/download-room-data

Downloads the raw room data as binary (JSON buffer).

headers

x-room-id: <room-id>x-access-key: <your-access-key>

response

Binary data (JSON buffer)
POST/api/v2/mcp/upload-room-data-url

Imports room data from a reviewed JSON location. Its HEAD response must include Content-Length and the file must be 50 MB or smaller.

headers

x-room-id: <room-id>x-access-key: <your-access-key>

request body

jsonUrlstringreqreviewed JSON location

asset uploads

3
*

Asset uploads use a two-step process: request a short-lived upload URL, then PUT the reviewed file data directly to that URL. Keep the returned URL out of logs and source control.

POST/api/v2/utils/generate-json-upload-url

Generates a temporary upload URL for a JSON room-data file. The handler creates the storage name; no body field is required.

*

Upload JSON with Content-Type: application/json. Use assetURL only for the reviewed import workflow; the service can delete that JSON after a successful import.

headers

x-api-key: <your-access-key>

response

{ signedUploadURL: string, assetURL: string, objectKey: string }
POST/api/v2/utils/generate-gltf-upload-url

Generates a temporary upload URL for a GLB binary model.

*

The handler validates fileType when issuing the URL, but does not bind a GLB Content-Type to the signed request. Validate the model before upload and use a matching header.

headers

x-api-key: <your-access-key>

request body

fileNamestringoptoptional name used when generating the object key
fileTypestringreq"model/gltf-binary"
enableDracobooleanoptrecorded in the generated key; it does not compress the file

response

{ signedUploadURL: string, assetURL: string, objectKey: string }
POST/api/v2/utils/generate-image-upload-url

Generates a temporary upload URL for an image. Supported formats: JPEG, PNG, GIF, and WebP.

*

The handler validates fileType when issuing the URL, but does not bind an image Content-Type to the signed request. Validate the file before upload and use a matching header.

headers

x-api-key: <your-access-key>

request body

fileTypestringreq"image/jpeg" | "image/jpg" | "image/png" | "image/gif" | "image/webp"

response

{ signedUploadURL: string, assetURL: string, objectKey: string }