Developers Dashboard

Brand tokens and the site stylesheet.

Get the design

GET/sites/{siteId}/design

The site’s look: brand tokens (with the theme’s token list and defaults), fonts, and the stylesheet (design.css) whole and split into its parts (sections/hero.css, layout/header.css and so on). Shows unpublished site-wide draft changes too, as the editor does.

Path parameters

  • siteIdstringrequired

    The site’s id.

Response 200

  • tokensmap of stringrequired
  • themeTokensarrayrequired
  • fontsarrayrequired
  • cssstringrequired
  • partsarray of objectsrequired
    2 child fields
    • pathstringrequired
    • cssstringrequired

Errors

  • 401No key, or the key isn’t valid.
  • 403The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).
  • 404Not found, or not reachable with this key.
  • 429Too many requests; wait for RateLimit-Reset seconds.
Try itRead-only. Sends a real request with your key.
curl https://api.unvop.com/v1/sites/site_123/design \
  -H "Authorization: Bearer $UNVOP_KEY"
Response 200
{
  "tokens": {
    "signal": "#0f766e"
  },
  "themeTokens": [
    {}
  ],
  "fonts": [
    {}
  ],
  "css": "…",
  "parts": [
    {
      "path": "/menu",
      "css": "…"
    }
  ]
}

Change brand tokens

PATCH/sites/{siteId}/design/tokens

Set brand tokens (colours, fonts, radius) by name. Token names come from themeTokens in GET /sites/{siteId}/design. They save as a site-wide draft: the editor and draft previews show them on every page, and the live site changes when you publish (POST /sites/{siteId}/publish or any page publish).

Path parameters

  • siteIdstringrequired

    The site’s id.

Request body JSON

  • tokensmap of stringrequired

Response 200

  • tokensmap of stringrequired

Errors

  • 401No key, or the key isn’t valid.
  • 403The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).
  • 404Not found, or not reachable with this key.
  • 422The body is invalid; details say which values.
  • 429Too many requests; wait for RateLimit-Reset seconds.
Try itSends a real request. Asks before it changes anything.
curl -X PATCH https://api.unvop.com/v1/sites/site_123/design/tokens \
  -H "Authorization: Bearer $UNVOP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tokens": {
      "signal": "#0f766e"
    }
  }'
Response 200
{
  "tokens": {
    "signal": "#0f766e"
  }
}

Save one part of the stylesheet

PUT/sites/{siteId}/design/styles/{file}

Replace one part of design.css, such as sections/hero.css, or add a new section part under sections/. The CSS must parse; unsafe rules are removed and listed in warnings. Send the version from a previous read to refuse the save if the part changed since. Editing CSS is limited to platform administrators, as in the dashboard’s Code area.

Path parameters

  • siteIdstringrequired

    The site’s id.

  • filestringrequired

    The part’s path inside site/styles/, like sections/hero.css.

Request body JSON

  • contentstringrequired
  • versionstring

Response 200

  • pathstringrequired
  • contentstringrequired
  • versionstringrequired
  • warningsarray of strings

Errors

  • 401No key, or the key isn’t valid.
  • 403The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).
  • 404Not found, or not reachable with this key.
  • 409It conflicts with the current state.
  • 422The body is invalid; details say which values.
  • 429Too many requests; wait for RateLimit-Reset seconds.
Try itSends a real request. Asks before it changes anything.
curl -X PUT https://api.unvop.com/v1/sites/site_123/design/styles/sections/hero.css \
  -H "Authorization: Bearer $UNVOP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": ".hero { padding-block: 6rem; }"
  }'
Response 200
{
  "path": "/menu",
  "content": ".hero { padding-block: 6rem; }",
  "version": "v_123",
  "warnings": []
}