Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.weaverse.io/llms.txt

Use this file to discover all available pages before exploring further.

Get Theme Settings

GET /api/v1/content/projects/:projectId/theme-settings
Returns the theme configuration for a project, including design tokens, colors, typography, and other global styling settings configured in the Weaverse Studio editor. When the locale query parameter is provided, also returns staticTranslations — the resolved static text translations for that locale (e.g., cart labels, button text, navigation strings).

Authentication

Requires a Content API key. See Authentication.

Path parameters

ParameterTypeRequiredDescription
projectIdstringYesThe project ID

Query parameters

ParameterTypeRequiredDescription
localestringNoLocale code (e.g., fr-fr, vi-vn). When provided, includes staticTranslations in the response. Tries exact match first, then falls back to language prefix (e.g., fr).
formatweaverse | portable-textNo (default weaverse)Output format. With portable-text, any string value (in theme or staticTranslations) that contains HTML markup is replaced in place by a Portable Text block array. The envelope shape is unchanged.
The format can also be requested via Accept: application/portable-text+json. The query parameter takes precedence when both are present. See Get Page › Portable Text format for the conversion rules and a rendering example.

Response

Without locale

{
  "object": "theme_settings",
  "projectId": "clx1abc23def456ghij",
  "theme": {
    "colorSchemes": {
      "primary": {
        "background": "#ffffff",
        "foreground": "#1a1a1a",
        "accent": "#246aff"
      },
      "secondary": {
        "background": "#f5f5f5",
        "foreground": "#333333",
        "accent": "#10b981"
      }
    },
    "typography": {
      "headingFont": "Inter",
      "bodyFont": "Inter",
      "baseSize": 16
    },
    "layout": {
      "maxWidth": 1280,
      "containerPadding": 24
    }
  }
}

With locale

GET /projects/:projectId/theme-settings?locale=fr-fr
{
  "object": "theme_settings",
  "projectId": "clx1abc23def456ghij",
  "theme": {
    "colorSchemes": { "..." : "..." },
    "typography": { "..." : "..." }
  },
  "staticTranslations": {
    "cart": {
      "title": "Panier",
      "empty": {
        "message": "Votre panier est vide"
      }
    },
    "product": {
      "addToCart": "Ajouter au panier",
      "soldOut": "Rupture de stock"
    }
  }
}

Response fields

FieldTypeDescription
objectstringAlways "theme_settings"
projectIdstringThe project ID
themeobjectTheme configuration object
staticTranslationsobjectNested translation keys with resolved values for the requested locale. Only present when locale query parameter is provided. Uses translated value when available, falls back to default value.
The theme object shape varies per project and depends on how theme settings are configured in the Weaverse Studio. Use the response data to apply consistent styling across your frontend.
Use the List Languages endpoint to discover available locales before requesting translations.

Portable Text format

With ?format=portable-text, the response carries Content-Type: application/portable-text+json and any HTML-valued leaf inside theme or staticTranslations is converted in place. Non-HTML strings, numbers, booleans, colors, and the surrounding object structure are preserved exactly — only richtext leaves change shape.
{
  "object": "theme_settings",
  "projectId": "clx1abc23def456ghij",
  "theme": {
    "colorSchemes": { "primary": { "background": "#ffffff" } },
    "footer": {
      "copyright": [
        {
          "_type": "block",
          "_key": "b1",
          "style": "normal",
          "children": [
            { "_type": "span", "_key": "s1", "text": "© 2026 " },
            { "_type": "span", "_key": "s2", "text": "Acme Inc.", "marks": ["em"] }
          ],
          "markDefs": []
        }
      ]
    }
  }
}
In the default weaverse format the same copyright field is returned as the original HTML string "<p>&copy; 2026 <em>Acme Inc.</em></p>".

Errors

CodeStatusWhen
INVALID_PARAMS400Missing projectId, empty locale, or unsupported format value
UNAUTHORIZED401Missing or invalid API key
FORBIDDEN403API key does not have access to this project
PROJECT_NOT_FOUND404Project does not exist or was deleted
INTERNAL_ERROR500Unexpected server error

Examples

# Without locale
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://studio.weaverse.io/api/v1/content/projects/clx1abc23def456ghij/theme-settings"

# With locale
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://studio.weaverse.io/api/v1/content/projects/clx1abc23def456ghij/theme-settings?locale=fr-fr"