meta { name: Create Theme type: http seq: 1 } post { url: {{appview_url}}/api/admin/themes } body:json { { "name": "Neobrutal Light", "colorScheme": "light", "tokens": { "color-bg": "#f5f0e8", "color-text": "#1a1a1a", "color-primary": "#ff5c00" }, "fontUrls": ["https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;700"] } } assert { res.status: eq 201 res.body.uri: isDefined res.body.cid: isDefined } docs { Create a new theme record on the Forum DID's PDS. The firehose indexer creates the DB row asynchronously. **Requires:** space.atbb.permission.manageThemes Body: - name (required): Theme display name, non-empty - colorScheme (required): "light" or "dark" - tokens (required): Plain object of CSS design token key-value pairs. Values must be strings. - cssOverrides (optional): Raw CSS string for structural overrides (not rendered until ATB-62 sanitization ships) - fontUrls (optional): Array of HTTPS URLs for font stylesheets Returns (201): { "uri": "at://did:plc:.../space.atbb.forum.theme/abc123", "cid": "bafyrei..." } Error codes: - 400: Missing name/colorScheme/tokens, invalid colorScheme, non-HTTPS fontUrl, token value not a string, malformed JSON - 401: Not authenticated - 403: Missing manageThemes permission - 500: ForumAgent not configured (server configuration issue) - 503: ForumAgent not authenticated or PDS network error }