Skip to main content
Vishal Tahilramani
New Member
July 2, 2026
Question

Variables REST API - Able to Update Default Mode Value but Failing for Non-Default Mode on Bound String Variable

  • July 2, 2026
  • 3 replies
  • 61 views

Hi Figma Team / Community,

 

I'm experimenting with the Variables REST API (POST /v1/files/:file_key/variables) and trying to understand the behavior when updating string variables across different modes.

 

My Setup

Variable Collection

 

{

  "name": "Localization",

  "collectionId": "VariableCollectionId:40000196:4269"

}

 

Modes

Mode Name Mode ID
EN 40000196:0
DE 40000196:1
Mode 40000200:0

EN is the default mode for this collection.

 

Variables

 

Variable 1 - Bound Variable

{

  "variableId": "VariableID:40000200:3754",

  "name": "suite",

  "type": "STRING"

}

Current values:

{

  "EN": "ABC_EN",

  "DE": "123",

  "Mode": "Mode"

}

This variable is bound to text content in the design.

 

 

Variable 2 - Unbound Variable

{

  "variableId": "VariableID:40000221:57715",

  "name": "New_Variable_Str",

  "type": "STRING"

}

Current values:

{

  "EN": "ABC_EN",

  "DE": "ABC_DE",

  "Mode": ""

}

This variable is currently not bound to any node.

 

What Works

I'm able to update the EN mode value for the bound variable (suite) using the following payload:

{

  "variableModeValues": [

    {

      "variableId": "VariableID:40000200:3754",

      "modeId": "40000196:0",

      "value": "ABC_EN"

    }

  ]

}

 

Response:

{

  "status": 200,

  "error": false

}

The value is updated successfully.

 

What Fails

When I try to update the DE mode value of the same variable:

{

  "variableModeValues": [

    {

      "variableId": "VariableID:40000200:3754",

      "modeId": "40000196:1",

      "value": "ABC_DE"

    }

  ]

}

I get:

{

  "status": 400,

  "error": true,

  "message": "Some node properties bound to the following variables could not be updated: VariableID:40000200:3754"

}

 

 

Observation

So far, my observations are:

Scenario Result
Bound variable + EN mode (default mode) ✅ Works
Bound variable + DE mode (non-default mode) ❌ Fails
Unbound variable + DE mode ✅ Works

This makes me wonder whether there is a restriction related to:

  1. Updating non-default mode values for variables that are currently bound to nodes.
  2. Updating localization values on bound text variables through the REST API.
  3. Whether this behavior is expected/documented or a limitation of the current Variables API implementation.

Questions

  1. Is updating non-default mode values of bound variables via variableModeValues currently unsupported?
  2. Is there any documented guidance on updating localized string variables through the REST API when they are already bound to text nodes?
  3. Has anyone successfully used the Variables REST API to update translation/localization variables across multiple modes (EN/DE/FR/etc.) while those variables remain bound in the design?
  4. Is the Plugin API currently the only supported approach for this scenario?

Any clarification or workaround would be greatly appreciated.

Thanks!

3 replies

Jaycee Lewis
Figmate
Figmate
July 3, 2026

Hey, ​@Vishal Tahilramani 👋 Thanks for the fascinating question. 

One question: is the font on that "suite" text node a custom font uploaded at the org or team level (Admin > Resources > Fonts), rather than one installed locally?

There's a documented restriction where a string variable bound to text content can't be updated via the API if that text node uses a shared/custom org font:

Warning: If a string variable is bound to a text node content in the same file, and the text node uses a shared font in the organization, that variable cannot be updated and will result in a 400 response.

One test: could you try setting the EN mode to a genuinely different value (rather than re-setting it to its current "ABC_EN") and see if that also fails? Comparing that against the DE result will tell us more.

Thank you so much for all the help so far! — Jaycee

Ruben Grill
New Member
September 5, 2026

Hi ​@Jaycee Lewis ,

I have the same problem, I don’t think it is related to whether the value for the default mode is updated or not. But rather whether any text node currently displays the mode value that should be updated. In other words, first it fails for the default mode, but if I switch the appearance of the text node to choose another mode that should be displayed, now updating the value for this mode will fail.

That is pretty much exactly what the warning says that you referred to.

My question now is: why does this restriction exist? I do use a font that is shared in the organization, but I would still like to be able to update variable values via REST API, also the ones which are used (and all of them are). What can I do now?

 

adamsmasher
Figmate
Figmate
September 5, 2026

Hey, ​@Ruben Grill - stepping in for ​@Jaycee Lewis. Thanks for posting this.

 

You are correct in identifying this as a font issue. It’s not really a default versus non-default issue, but rather that the REST API can’t access a local font or a shared org font.  As for why this restriction exists, it comes down to that font-access limitation rather than a restriction on updating "used" variables specifically (and it just happens to show up because the update would redraw the text). 

 

For your use case today, you have a couple of solutions:

  • Plugin API
    • Since plugins run in-editor, they have access to whatever fonts you have loaded (including your org's shared fonts).
  • Use Google Fonts only
    • While this won’t be an option with company brand fonts, this will also get around the issue if the design system can accommodate using a Google font instead of a custom font.

 

Let me know if you have other questions or issues.