Variables
Update Variables
Update existing variables and variable collections in a Figma file.
Modify existing variables, modes, or collections. Use this to sync updated design tokens from your codebase back to Figma.
PUT https://api.figma.com/v1/files/:file_key/variables
Authentication
Requires a valid access token with file_content:write scope. Pass via X-Figma-Token header (personal access token) or Authorization: Bearer header (OAuth).
Parameters
Path parameters
The key of the file containing the variables to update.
Request Body
The request body is a JSON object with optional arrays for each resource type. Each item must have "action": "UPDATE" and a valid permanent ID.
| Field | Type | Required | Description |
|---|---|---|---|
variableCollections | array | No | Collections to update |
variableModes | array | No | Modes to update |
variables | array | No | Variables to update |
Example Request
Response
Returns a 200 OK status on success with the updated variable metadata.
{
"meta": {
"tempIdMapping": {}
}
}