molroo docs
API Reference

Endpoints

REST API endpoints for api.molroo.io.

API Endpoints

The molroo API is available at https://api.molroo.io. All endpoints require authentication via the X-API-Key header.

Base URL

https://api.molroo.io

Authentication

Include your API key in every request:

curl https://api.molroo.io/worlds \
  -H "X-API-Key: mk_live_xxxxx"

Endpoint Groups

World Configuration

MethodPathDescription
POST/worldsCreate a new world
GET/worldsList all worlds
GET/worlds/:idGet world details
PATCH/worlds/:idUpdate world definition
DELETE/worlds/:idSoft-delete a world
POST/worlds/:id/restoreRestore a deleted world

World Runtime

MethodPathDescription
POST/worlds/:id/chatSend a chat message
POST/worlds/:id/eventsDispatch a world event
POST/worlds/:id/tickAdvance world time
POST/worlds/:id/time-jumpJump forward in time
POST/worlds/:id/mutateExecute mutations
POST/worlds/:id/contextGet entity context
POST/worlds/:id/queryQuery world state
GET/worlds/:id/personasGet persona configs

World Data

MethodPathDescription
GET/worlds/:id/snapshotGet full snapshot
PUT/worlds/:id/snapshotRestore from snapshot

Response Format

All successful responses are wrapped in a result envelope:

{
  "result": {
    // response data
  }
}

Error responses use a standard error format:

{
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Entity \"unknown\" not found in world"
  }
}

OpenAPI Specification

The full OpenAPI specification is available at:

https://api.molroo.io/openapi.json

Detailed per-endpoint documentation with request/response schemas will be auto-generated from this specification. Run npm run generate:api in the docs-site to update.

On this page