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 and pagination

  • 📋 List your own published content

  • ❤️ Like/Unlike content (with optimistic updates)

  • 📊 Track Usage when content is imported/used

  • 🚩 Report inappropriate content


Quick Start

Publishing Content

// Create new content
const entry = await RundotAPI.ugc.create({
  contentType: 'character',  // App-defined type
  data: {
    name: 'My Character',
    stats: { strength: 10, agility: 8 },
    abilities: ['fireball', 'shield']
  },
  isPublic: true,  // Visible in community browse
  title: 'Fire Mage',  // Optional, for display
  tags: ['mage', 'fire']  // Optional, for filtering
})

console.log(`Published with ID: ${entry.id}`)

Browsing Community Content

Managing Your Content


Engagement Features

Likes

Optimistic UI Pattern:

Usage Tracking

Track when users import or use community content:

Reporting


Data Model

UGC Entry

Browse Response


Configuration

Add UGC settings to your game's config.json:

Configuration Options:

Field
Default
Description

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


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

Limit
Value

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


Security

  • Authentication Required: All UGC operations require a logged-in user

  • Ownership Enforcement: Only authors can update/delete their content

  • Content 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

  • Community Browse: Discover public content with sorting

  • Engagement: Likes, usage tracking, reporting

  • 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

Last updated