UGC API (BETA)
User-Generated Content API for publishing, browsing, and engaging with community content.
Overview
The UGC API enables games to let users create, share, and discover community content such as custom characters, levels, decks, or any structured data your game supports.
Key Features:
📤 Publish content with JSON metadata (up to 100KB)
🔍 Browse community content with sorting, pagination, and author filtering
📋 List your own published content
📦 Batch Fetch multiple entries by ID
🔗 Cross-App browse, read, create, update, and delete entries across sibling apps
👥 Follow Creators and track follower/following counts
❤️ Like/Unlike content (with optimistic updates)
📊 Track Usage when content is imported/used
🚩 Report inappropriate content
🗳️ Weekly Voting with subscription-tiered budgets, live leaderboards, and historical winners
🎯 Recommendations personalized content discovery, similar-item suggestions, and interaction tracking
Quick Start
Publishing Content
create params: contentType and data are required; isPublic (defaults to true), title, tags, isPlatformVisible, and thumbnailUrl are optional. When isPlatformVisible is true, title and thumbnailUrl are both required.
Browsing Community Content
Managing Your Content
update params: only id is required. data, isPublic, title, tags, isPlatformVisible, and thumbnailUrl are optional partial updates; omit a field to leave it unchanged. When setting isPlatformVisible to true, title and thumbnailUrl must either be supplied in the update or already present on the entry.
Batch Fetching Entries
Retrieve multiple entries by ID in a single request (max 100):
Fetching a Single Entry
Use get(id) to read one entry by ID. It returns the entry, or null if no entry exists with that ID (a quarantined entry is also returned as null to non-members):
Counting Entries
count(params?) returns how many entries match an optional contentType (single type or array) and indexed-field filters, without fetching the entries themselves. Pass no params to count every entry in your app:
count accepts the same contentType and filters surface as browse (see Filtering by Indexed Fields). The cross-app variant is crossAppCount(targetAppId, params?).
Collaborators (multi-editor)
By default a UGC entry has one owner, its authorId. The owner can invite collaborators (editors) who may then read and update() that entry as if it were their own. This is the foundation for co-editing a single piece of content.
Scope and rules:
Per-entry. Collaborators are managed on one specific entry. Adding someone to entry A grants edit rights on entry A only, never on other entries by the same owner.
Owner-managed. Only the owner (
authorId) can add or remove collaborators, or delete the entry. A collaborator can remove themselves (leave).Editors can edit, not administer. A collaborator can
update()and read the entry (including while it is private), but cannot delete it or manage its collaborator list.editorIdsis member-scoped. It carries real values only when the caller is the owner or an editor (get,listMine,listShared,listCollaborators). Discovery surfaces (browse,getMany) always returneditorIds: [], so collaborator IDs of public content are never exposed.
addCollaborator is idempotent (re-adding an existing editor is a safe no-op), and the owner is never added to their own editorIds.
Engagement Features
Likes
Optimistic UI Pattern:
Usage Tracking
Track when users import or use community content:
Reporting
Let players flag content for moderation. Reports are community-driven and can lead to automatic quarantine once enough distinct users report the same entry.
report params: id and reason are required; details (free-text), supportEmail (reporter contact), and metadata (a Record<string, string> of arbitrary context) are all optional.
Behavior:
One report per user per entry. Reports are idempotent on
(reporter, entry); a user reporting the same entry twice is a silent no-op (it does not increment the count or re-notify).Auto-quarantine on threshold. Each new report increments the entry's
reportCount. When the count reaches a server-configured threshold (autoQuarantineReportThreshold), the server flips the entry tostatus: 'quarantined'and stamps aquarantineobject withsource: 'user_reports'. This happens automatically: no admin action required.Effect of quarantine. A quarantined entry is hidden from community
browse,getMany, and publicgetfor everyone except the author and collaborators (members), who can still see it (with thequarantinedetails attached) so they understand why it disappeared.Recovery. Only an admin can lift a quarantine (
rundot ugc approve <entry-id>) or soft-remove the entry (rundot ugc admin remove, which sets the terminalstatus: 'removed'). See CLI Management.Platform moderation. RUN's own moderators can also quarantine an entry; it then carries
quarantine.source: 'admin', and only RUN can lift it (rundot ugc approveis refused). Treat it like any other quarantine: the author and collaborators still see the entry and thereason.
Quarantine also happens at create/update time from automated content moderation (text/image/video scanning), independently of reports; those entries carry
quarantine.source: 'auto_moderation'. See Configuration.
Checking Text (Moderation)
Check text against the same procedural profanity filter the server runs — entirely client-side, deterministic, no network call. Use it to give players instant feedback (e.g. per-keystroke on a name field) before submitting, instead of waiting for a server rejection.
checkTextAsync params: text is required; options is optional with policy ('strict' | 'lenient', defaults to 'strict') and customWords (extra words to flag). Returns { clean: boolean, profaneWords: string[] } — profaneWords lists the matched words and is empty when clean.
Which policy to use — match the server-side gate your text is headed for:
UGC entries, comments, profiles, game tags
strict
'strict' (the default)
AI generation prompts (image/audio/video/3D gen — the "That looks a bit offensive. Let's try again." rejection path)
lenient
'lenient'
Behavior:
UX pre-filter, not a guarantee. The server still enforces its own moderation on submit — including LLM-based checks the client doesn't run — so a client-side
clean: truedoes not guarantee the server will accept the text. Conversely, a client-side flag under the right policy will also be flagged server-side.Strict mode is aggressive by design. It matches across 23 languages and internally ignores word boundaries (obfuscation matching), which produces known false positives on innocent English words (see the
'lenient'callout above). That mirrors the server exactly: content the strict check false-flags client-side would be rejected server-side too.Server parity. This is the same procedural filter, policies, and pinned library version (
glin-profanity2.3.8) the server runs; parity is enforced by unit tests that compare the SDK's policies and version against the server's.Fail-open. If the filter itself fails to load or errors internally, the call resolves
{ clean: true, profaneWords: [] }— it never rejects. This matches the server's behavior for its local profanity check.Lazy-loaded. The word lists are loaded on the first
checkTextAsynccall, not at SDK boot, so games that never moderate text don't pay for them.
Creator Following
Follow and unfollow content creators, check follow status, and retrieve follower/following counts.
Follow / Unfollow
Check Follow Status
Get Follow Counts
Building a Creator Profile
Combine following with browse to build a creator profile page:
Weekly Voting
Let players vote on community UGC entries each ISO week. The server enforces per-user weekly budgets (3 votes by default, 15 for Ultimate subscribers), exposes a live leaderboard, and archives the top 3 winners each week.
All voting methods live under RundotGameAPI.ugc.voting. Calls are authenticated and per-app; the current week is determined server-side from UTC.
Casting and Removing Votes
count defaults to 1 and must be a positive integer no greater than 15 (the Ultimate weekly budget; no single call can exceed it). Requests with count <= 0 or count > 15 are rejected by the server.
Idempotency. Both vote and unvote accept a stable clientRequestId for safe retry after a network failure; the server returns the cached result instead of double-counting (or, on unvote, instead of 409-ing because the votes are already gone):
If a request would exceed the user's remaining budget the server returns INSUFFICIENT_VOTES; trying to unvote an entry the user has not voted on returns NO_VOTES_TO_REMOVE. Surface these to the player as "out of votes" / "nothing to undo" rather than as generic errors.
Reading Your State
Use this to render per-entry vote counts in your UI and to gate the vote button when remaining === 0.
Leaderboard (Current Week)
The leaderboard is sorted by vote count descending, then by firstVotedAt ascending (earliest entry to receive a vote wins ties). Page size defaults to 5 and is capped at 25.
Historical Winners
Each Monday at 00:00 UTC the server snapshots the previous week's top 25 entries per app, including a denormalized author/title snapshot so winners survive UGC deletion. The endpoint trims each week's winners array to topN at read time, so apps can pick the shape that fits their UI without re-snapshotting.
limit (weeks per page) defaults to 4 and is capped at 25. topN (ranked entries per week) defaults to 3 and is capped at 25. Weeks are returned newest-first; rank is 1-based within the week.
Subscription-Tiered Budgets
Free / default
3
Ultimate subscribers
15
The tier is resolved at vote-time, not snapshotted. A player who upgrades mid-week immediately gets the higher budget without losing their already-cast votes; a player who downgrades keeps the votes they cast but cannot add new ones until used < 3.
Voting Cadence
Voting runs weekly by default. An app can be switched to a monthly cadence via server-side configuration (contact the RUN team); there is no client-side setting and no code change on your side.
For a monthly app, everything above works the same, with two visible differences:
weekKeycarries a month key like"2026-07"instead of an ISO week key like"2026-W29". Treat it as an opaque period identifier either way.Budgets reset per month instead of per week. The defaults stay 3 (free) and 15 (Ultimate) unless the server-side config overrides them.
Winners are snapshotted per period: monthly apps get one winners entry per month, archived shortly after the month ends (UTC).
Recommendations
Surface personalized content to players using the built-in recommendation engine. The system learns from player interactions (views, ratings, usage) to improve suggestions over time.
Personalized Recommendations
Get content recommendations tailored to the current user based on their interaction history:
The optional filter parameter lets you narrow results using a filter expression:
Similar Item Recommendations
Find content similar to a specific entry:
This also accepts an optional filter parameter as the third argument.
Composite Recommendations
Composite recommendations first select a source entry, then recommend items related to that source. This is useful for "Because you liked X, try these" experiences:
You can pass optional sourceFilter and resultFilter parameters to constrain the source selection and recommended results independently:
Paginating Recommendations (More Results)
Every recommendation response includes a recommId. Pass it to getMoreRecommendations to fetch the next page of results -- the engine returns previously unseen items each time:
getMoreRecommendations works with the recommId from any recommendation method (getUserRecommendation, getItemRecommendation, or getCompositeRecommendation). All parameters from the original request (filters, scenario) are inherited automatically.
Recording Interactions
Feed user behavior back into the recommendation engine so it learns what each player likes. Every interaction method accepts an optional recommId -- pass it when the interaction originated from a recommendation to improve the engine's accuracy.
Detail View
Record when a user views an entry's details:
View Portion
Record how much of a content item a user has consumed, as a number from 0 (nothing) to 1 (the entire item). This is useful for content with progress like stories, tutorials, or videos:
The portion should reflect the actual amount consumed, regardless of seeking. For example, if a user skips to the middle and reads 10% from there, the portion should be 0.1, not 0.5.
Calling setViewPortion again for the same user and item updates the stored portion rather than creating a duplicate.
Rating
Record a rating between -1 (dislike) and 1 (like):
Cart Addition
A stronger signal than a detail view, indicating the user took a meaningful action on the content. This doesn't have to be a purchase -- common examples include importing, saving, favoriting, or adding content to a collection:
Recommendation Flow Example
A typical integration combines recommendations with interaction tracking:
Cross-App UGC
Access UGC entries across apps owned by the same creator. This enables patterns like a level-editor app that creates content and a runner app that reads it, both published by the same creator.
Same-creator requirement: Both the calling app and the target app must share the same ownerUserId. The server verifies this on every cross-app call.
Browsing Another App's Content
Reading Entries
crossAppGet and crossAppGetMany take the target app ID as the first positional argument; crossAppCount takes it first with an optional params object second.
Creating in Another App
A game can create UGC entries in a sibling app's collection. The entry is attributed to the current user and stored under the target app's UGC namespace.
Pass a uniqueKey to make creation idempotent. The key is unique per contentType within the target app — across all users. If the caller's own entry (created from this app) already holds the key, the server returns it instead of creating a duplicate; if another user's entry holds it, the call fails with a 409 conflict (the other entry is never returned). Derive keys from identifiers that can't collide between users — a UUID generated when the content is created, or a key that embeds the user's profile ID:
Updating and Deleting Cross-App Entries
Entries created via crossAppCreate can be updated and deleted from the app that created them. Re-publishing should always update the existing entry rather than calling crossAppCreate again — repeated creates produce duplicate entries in the target app.
Three conditions are enforced server-side:
The same-creator requirement applies, as with all cross-app calls.
The entry must have been created cross-app from the calling app (its
sourceAppIdmust match). Entries the target app created natively cannot be touched.The caller must be the entry's author (or a listed editor, for updates). Deletes are author-only.
A UGC_CROSS_APP_DENIED error is returned when the sourceAppId doesn't match; UGC_NOT_FOUND when the entry doesn't exist in the target app.
Backfilling a uniqueKey onto older entries
Entries published before keyed publishing have no uniqueKey, so a keyed crossAppCreate won't find them and would create a duplicate. Migrate them once by passing uniqueKey to crossAppUpdate:
From then on the entry behaves as if it was created with that key — re-publishes dedupe against it. If another entry already holds the key, the call fails with a 409 conflict whose body names the entry that owns it.
Recommended Publish Flow
Two things to know before wiring a publish button:
A
uniqueKeydedup hit returns the existing entry unchanged. It does not apply the data you sent, and the response doesn't indicate whether the entry was created or matched. Never treatcrossAppCreatealone as "publish latest content."Plain
update()/delete()cannot reach cross-app entries — they look in your own app's namespace and return "not found". An "update first, create on 404" flow built on the plain calls silently duplicates on every re-publish. UsecrossAppUpdate/crossAppDelete.
The robust recipe is get-or-create, then update — correct on first publish, re-publish, and after lost local state:
As an optimization, cache key → entry.id locally and call crossAppUpdate directly when you have the ID, falling back to the recipe above when you don't.
For multi-entry publishes (e.g. a story parent plus one entry per chapter), derive keys from a per-user-unique root — story-{storyUuid} and story-{storyUuid}-chapter-{n} — never from titles or plain local counters that another user could also produce. Two gotchas:
Re-publishing with fewer children does not remove the extras;
crossAppDeleteremoved chapters explicitly.To unpublish, delete every child, then the parent. Deletes are author-only.
Cleaning Up Existing Duplicates
If earlier re-publishes already created duplicates, clean them up in-app (deletes run as the signed-in author, so this happens per user — on launch or next publish):
crossAppBrowseyour own entries (authorIdfilter) and group them by your internal identity (an ID you stored indata).Pick a keeper per group — the oldest, or the one with the most engagement (
likeCount/useCountdon't transfer between copies).Backfill the key onto the keeper via
crossAppUpdate, thencrossAppDeletethe rest.
A 409 "uniqueKey is already in use" during backfill means a keeper already holds that key — the entry you're holding is the duplicate; delete it.
Note: cross-app browse only returns public, active entries. Private or quarantined entries can't be rediscovered this way — store entry IDs at publish time.
Cross-App Mutation Errors
Entry doesn't exist in the target app
not found
Create it (with a uniqueKey)
Another entry holds the key (409)
uniqueKey is already in use
If it's your entry, update it or delete your duplicate; a key held by another user can't be claimed — use a different key
Entry wasn't cross-app created by your app
was not created from this app
You can't touch it — don't retry
Caller isn't the author
Only the author
Surface to the user — don't retry
crossAppUpdate and crossAppDelete require host support; on app versions that predate them the calls fail. Treat failures as "feature unavailable" and skip cleanup/backfill rather than retrying into a create loop.
Editor / Runner Pattern
A common architecture splits creation and consumption into two apps:
Both apps must be published by the same creator. The runner app reads content from the editor app without duplicating it.
Platform UGC (Globally Readable)
The special targetAppId value "platform" gives any game read access to platform-level UGC such as Worlds — no same-creator requirement applies. This is read-only; games cannot create entries in the platform namespace.
Cross-App Error Codes
UGC_CROSS_APP_DENIED
The calling app and target app don't share an ownerUserId, or (for crossAppUpdate/crossAppDelete) the entry wasn't created from the calling app.
UGC_CROSS_APP_TARGET_INVALID
The target app doesn't exist or has no ownerUserId set.
Platform Visibility
Mark a UGC entry as platform visible to promote it beyond your game's in-app browse into platform-wide discovery surfaces (search results and personalized recommendations shown to all RUN.world users).
Requirements
A
thumbnailUrlis required — entries without a thumbnail cannot be marked platform visible. Use the Files API to upload an image and obtain a hosted URL (see example below).A
titleis required — entries without a title cannot be marked platform visible.
Setting Platform Visibility
Hosting a Thumbnail via the Files API
The easiest way to get a hosted thumbnail URL is through the Files API + Cloudinary export:
What Happens When a User Discovers Your Content
Platform-visible UGC entries appear in platform-wide searches and recommendation carousels alongside games and series. When a user taps one of these entries, the platform launches your game and passes the UGC entry ID as a launch parameter:
This enables a seamless flow: users discover your community content from anywhere on the platform and land directly in the relevant experience within your game.
Data Model
UGC Entry
Reading audience. The key is omitted when unset and never backfilled, so branch on entry.audience === 'mature' rather than comparing against 'general'. Setting 'mature' is restricted (see Cross-App Parameters).
Reading quarantine in your game. Discovery surfaces already filter out quarantined content, so you rarely see it in browse/getMany. But an author or collaborator fetching their own entry will receive status: 'quarantined' plus the quarantine object; use these to show a "this content is under review" state instead of rendering it as normal.
Browse Parameters
The sortBy union is also exported as named types: UgcSortBy = UgcBuiltinSortBy | UgcCustomSortBy, where UgcBuiltinSortBy = 'recent' | 'mostLiked' | 'mostUsed' and UgcCustomSortBy = \idx_${string}``.
Browse Response
List Parameters & Response
listMine and listShared take UgcListParams and return UgcListResponse. Unlike browse, contentType here is a single string (no arrays), and the returned entries are plain UgcEntry without the isLikedByMe augmentation.
Get-Many & Count Parameters
Filtering by Indexed Fields
Use the filters parameter to query on fields with the idx_ prefix. These fields are promoted to top-level indexed fields at create/update time from your data payload, based on your game's indexedFields configuration.
Equality
Range
gte
>=
{ idx_power: { gte: 100 } }
lte
<=
{ idx_power: { lte: 500 } }
Important: When using range filters, set sortBy to the same idx_ field you are filtering on (e.g. sortBy: 'idx_tier'). The default sort (createdAt) combined with a range filter on a different field requires a composite index that may not exist; if it's missing the query returns an error. Setting sortBy to the filtered field avoids this.
Range filters on multiple different idx_ fields in the same query are not supported.
Follow Counts
Voting Types
Recommendation Response
Cross-App Parameters
UgcCrossAppBrowseParams is UgcBrowseParams plus a required targetAppId, so it inherits the full browse surface (contentType, authorId, cursor, limit, sortBy, sortOrder, filters) with the same UgcSortBy union as browse.
audience is restricted. Any write that sets or changes 'mature' requires an authorized internal principal; every other caller gets a 403 (UgcAuthorizationError). Setting 'general' on an entry that is not already mature is ungated, echoing an entry's existing value back is not a mutation, and there is no way to clear the field — so omit it unless you intend to change it. The same 403 also fires when you flip isPublic or isPlatformVisible to true on a mature entry, even when audience is absent from your request. The SDK's game-scoped create/update do not expose audience at all.
Configuration
Recommended: rundot/ugc.config.json
Place your UGC config at rundot/ugc.config.json. The file contains the UGC settings directly (no ugc wrapping key):
Commit
rundot/to your repo; it's project config likepackage.json, not a build artifact. It's env-agnostic and takes priority over legacyconfig.{local,staging}.jsonfor any system it defines.game.config.prod.jsonis a separate file for local CLI metadata; UGC config does not go there.
Also supported: legacy config.json
Add a ugc key to your project's config.json. Legacy layouts keep working indefinitely; run rundot migrate-config (with --dry-run to preview) to move them into rundot/ automatically.
Configuration Options:
maxEntriesPerUser
100
Max entries per user per app
maxDataSizeBytes
102400
Max size of data field (100KB)
moderationFields
["title"]
Fields to check for content moderation
requireModeration
false
If true, new content is hidden until approved
autoQuarantineReportThreshold
(server default)
Distinct user reports that auto-quarantine an entry (see Reporting)
Content Types
Content types are app-defined strings that categorize your UGC:
Best Practices:
Use lowercase, alphanumeric with underscores/hyphens
Keep types consistent across your app
Query by content type to show relevant UGC sections
Best Practices
Content Structure
Error Handling
Caching
Limits & Rate Limiting
Max entries per user per app
100 (configurable)
Max data size
100KB
Content type format
Alphanumeric, _, -
Max content type length
64 characters
Usage tracking
Once per user per entry per day
getMany batch size
Max 100 entry IDs per request
Self-follow
Not allowed (server rejects)
Recommendation count
1 min, 50 max
getMoreRecommendations validity
30 minutes after last request
Weekly vote budget (default)
3 per user per app
Weekly vote budget (Ultimate)
15 per user per app
Per-request vote/unvote count
1 min, 15 max (defaults to 1)
Leaderboard page size
5 default, 25 max
Winners page size (weeks per page)
4 default, 25 max
Winners topN (ranked entries per week)
3 default, 25 max
Winners retained per weekly snapshot
Top 25
Security
Authentication Required: All UGC operations require a logged-in user
Ownership Enforcement: Only authors can update/delete their content
Cross-App Isolation: Cross-app access is restricted to apps sharing the same
ownerUserIdContent Moderation: Optional field-level moderation via configuration
Rate Limiting: Prevents spam creation
Report System: Community-driven content flagging
Features Summary
CRUD Operations: Create, read, update, delete user content
Collaborators: Owner-managed per-entry editors for co-editing a single entry
Community Browse: Discover public content with sorting and author filtering
Batch Fetch: Retrieve multiple entries by ID in a single request
Cross-App UGC: Browse, read, count, create, update, and delete entries across apps by the same creator
Creator Following: Follow/unfollow creators with follower and following counts
Engagement: Likes, usage tracking, reporting
Weekly Voting: Subscription-tiered weekly vote budgets, live leaderboards, and archived top-3 winners
Recommendations: Personalized, item-based, and composite content discovery with pagination and interaction tracking
Pagination: Cursor-based pagination for large datasets
Flexible Data: Store any JSON structure (up to 100KB)
Content Moderation: Optional moderation for titles and data fields
Author Attribution: Automatic author info on all entries
CLI Management (rundot ugc)
The rundot CLI provides commands for managing UGC entries and handling moderation without requiring the game client.
Player Commands
Admin Commands (Owner/Editor)
These commands require owner or editor role on the game.
Typical Moderation Workflow
Auto-quarantine runs without admin action (see Reporting), so periodically review the queue and either approve false positives or remove genuinely bad content:
All commands accept --game-id <id> to specify the game explicitly. If omitted, the CLI reads game.config.local.json from the current directory (set via rundot init).
Last updated