Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Project Variables

Project variables are values that the whole project uses: brand colors, fonts, font sizes and short texts. Change a variable once, and every element that uses it changes.

Requirements

  • A project with variables. You create variables in the editor, in the Variables panel.
  • An API key with the list:project scope to read, and create:project to change (see Authentication).

List the variables

curl https://api.vev.design/v2/projects/[projectKey]/variables \
  --header "x-vev-key: [your-key]"
{
  "success": true,
  "data": {
    "variables": [
      { "name": "Brand color", "type": "color", "value": "#1024f6" },
      { "name": "Heading font", "type": "font", "value": "Inter" },
      { "name": "Font size", "type": "number", "value": "16px" },
      { "name": "Campaign name", "type": "text", "value": "Spring sale" },
      { "name": "Logo", "type": "image", "value": "https://cdn.vev.design/.../logo.png" }
    ],
    "warnings": []
  }
}

Change values

Send the variable names and the new values. Variables you leave out keep their value.

curl -X PATCH https://api.vev.design/v2/projects/[projectKey]/variables \
  --header "x-vev-key: [your-key]" \
  --header "Content-Type: application/json" \
  --data '{"Brand color": "#e30613", "Campaign name": "Summer sale", "Font size": "18px"}'

The response is the full list, as above, with the new values.

TypeValueExample
textAny text"Summer sale"
colorA CSS color or gradient"#e30613", "rgb(227, 6, 19)", "linear-gradient(90deg, #e30613, #ffb000)"
fontA font family name"DM Sans"
numberA number, with an optional unit: px, %, em, rem, vh, vw, cm, deg, rad, s, ms"18px", or 18 to keep the current unit
imageA public https:// URL to an image of at most 20 MB. Vev copies it into the project."https://images.example.com/logo.png"

Names are not case sensitive. If one value is wrong, the API answers 400, says what to fix and changes nothing.

Publish the project to make the new values live.

Values you set through the API stay when you add more library sections to the project.