Realms of Shod logo

Realms of Shod

Overview
  • Getting Started

    • Quickstart
    • Storytelling
    • Using the H.U.B.
    • Sculpting Realms
    • Collaborating
    • Coins
  • Understanding the Interface

    • Navigation
    • Media Controls
    • Story Tools
  • Realms Sandbox

    • Play Modes
    • Gamestream
    • Transcripts
    • Compendium
  • World Building

    • Import / Export
    • Entities
    • Notes
  • Integrations

    • Discord
    • MCP
  • API Reference

    • Authentication
    • Realms API
    • Entity Graph API
    • Notes API
    • Sessions API
  • Support

    • FAQs
    • Contact & Feedback
    • Privacy
Realms API

API Reference

Realms

Create, update, and inspect the realms you have access to. All endpoints require a valid Bearer token. Creating a realm requires only a valid token; editing requires realm creator access.


POST /api/v1/realms

Creates a new realm owned by the authenticated user. Returns 201 Created with the new realm object.

Request Body

ParameterTypeDescription
title*stringDisplay name for the new realm.

Response (201)

ParameterTypeDescription
realmId*stringID of the newly created realm.
title*stringDisplay name of the realm.
createdAt*integerUnix timestamp (ms) when the realm was created.
coverImageUrl*string | nullCover image URL, or null.
isCreator*booleanAlways true for the creating user.
lastActiveAt*integer | nullUnix timestamp (ms) of last activity, or null.
users*RealmMember[]Current realm members (initially just the creator).
curl -X POST https://realmsofshod.com/api/v1/realms \
  -H "Authorization: Bearer ros_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{"title":"The Shattered Realm"}'
{
  "realmId": "clxyz...",
  "title": "The Shattered Realm",
  "createdAt": 1716000000000,
  "coverImageUrl": null,
  "isCreator": true,
  "lastActiveAt": null,
  "users": [
    {
      "userId": "usr_abc...",
      "color": "#7c3aed",
      "createdAt": 1716000000000,
      "isStoryteller": true,
      "avatarUrl": null
    }
  ]
}

PATCH /api/v1/realms/:realmId

Updates the title of an existing realm. Requires the authenticated user to be the realm creator; other members receive 404 Not Found. Returns 200 with the updated realm object.

Path Parameters

ParameterTypeDescription
realmId*stringThe ID of the realm to update. You must be the realm creator.

Request Body

ParameterTypeDescription
title*stringNew display name for the realm.
curl -X PATCH https://realmsofshod.com/api/v1/realms/clxyz... \
  -H "Authorization: Bearer ros_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{"title":"Realm of Ash and Iron"}'
{
  "realmId": "clxyz...",
  "title": "Realm of Ash and Iron",
  "createdAt": 1716000000000,
  "coverImageUrl": null,
  "isCreator": true,
  "lastActiveAt": 1716500000000,
  "users": [...]
}

GET /api/v1/realms

Returns a paginated list of realms the authenticated user is a member of, ordered newest first.

Query Parameters

ParameterTypeDescription
limitintegerNumber of results per page. Default: 50. Values above 100 are clamped to 100. Returns 400 if not a positive integer.
cursorstringOpaque pagination cursor returned in nextCursor from the previous response. Omit to start from the first page.

Response

ParameterTypeDescription
data*Realm[]Array of realm objects for this page.
nextCursor*string | nullCursor to pass as cursor in the next request. null when there are no more pages.
hasMore*booleanTrue when additional pages exist.

Realm

ParameterTypeDescription
id*stringUnique realm identifier.
title*stringDisplay name of the realm.
createdAt*integerUnix timestamp (milliseconds) when the realm was created.
coverImageUrl*string | nullURL of the realm cover image, or null if none is set.
creatorId*stringUser ID of the realm creator.
curl https://realmsofshod.com/api/v1/realms \
  -H "Authorization: Bearer ros_your_token_here"
{
  "data": [
    {
      "id": "clxyz...",
      "title": "The Shattered Realm",
      "createdAt": 1716000000000,
      "coverImageUrl": "https://...",
      "creatorId": "usr_abc..."
    }
  ],
  "nextCursor": "eyJjIjox...",
  "hasMore": true
}

Pass the nextCursor value as the cursor query parameter to fetch the next page. Cursors are opaque; treat them as strings and do not parse their contents.


GET /api/v1/realms/:realmId

Returns detailed information about a single realm. You must be a member of the realm; non-members receive 404 Not Found.

Path Parameters

ParameterTypeDescription
realmId*stringThe ID of the realm to retrieve. Must be a realm you are a member of.

Response

ParameterTypeDescription
id*stringUnique realm identifier.
creatorId*stringUser ID of the realm creator.
title*stringDisplay name of the realm.
coverImageUrl*string | nullCover image URL, or null.
enableVideo*booleanWhether video is enabled for this realm.
allowPartyInvites*booleanWhether players can invite others.
lastActiveAt*integer | nullUnix timestamp (ms) of last activity, or null.
users*RealmMember[]List of realm members. See RealmMember below.
createdAt*integerUnix timestamp (ms) when the realm was created.
updatedAt*integerUnix timestamp (ms) when the realm was last updated.

RealmMember

ParameterTypeDescription
userId*stringThe member's user ID.
color*stringThe member's color in the realm (hex).
createdAt*integerUnix timestamp (ms) when the member joined.
isStoryteller*booleanTrue if the member has Storyteller access.
avatarUrlstring | nullThe member's avatar URL, or null.
streamedAtinteger | nullUnix timestamp (ms) of the member's last stream, or null.
connectedAtinteger | nullUnix timestamp (ms) when the member last connected, or null.
userNamestring | nullThe member's display name, or null.
realmNamestring | nullThe member's in-realm name, or null.

Member email addresses and avatar keys are not included in the response.

curl https://realmsofshod.com/api/v1/realms/clxyz... \
  -H "Authorization: Bearer ros_your_token_here"
{
  "id": "clxyz...",
  "creatorId": "usr_abc...",
  "title": "The Shattered Realm",
  "coverImageUrl": "https://...",
  "enableVideo": true,
  "allowPartyInvites": false,
  "lastActiveAt": 1716500000000,
  "users": [
    {
      "userId": "usr_abc...",
      "color": "#7c3aed",
      "createdAt": 1716000000000,
      "isStoryteller": true,
      "avatarUrl": "https://...",
      "userName": "Mordecai"
    }
  ],
  "createdAt": 1716000000000,
  "updatedAt": 1716500000000
}
← Previous: AuthenticationNext Entity Graph API →