Actions43
- Comment Actions
- Component and Style Actions
- Dev Resource Actions
- Figma File Actions
- Library Analytic Actions
- Project Actions
- User Actions
- Variable Actions
- Version History Actions
- Webhook V2 Actions
Variable → Create or Update or Delete Variable
AI-generatedSummary
Create, update, or delete variables and variable collections in a Figma file by specifying the file's key and providing the variable data in JSON format.
Inputs
- Key (required) — The file key of the Figma file in which to create, update, or delete variables.
- Query Parameters — Optional parameters to customize the request, such as pagination or filtering options.
- Request Body (required) — A JSON object containing the variable or variable collection data to create, update, or delete.
Output shape
The operation returns the API response from Figma, typically a JSON object representing the created, updated, or deleted variable(s) or an empty response with status 204 No Content if successful with no content.
The output may vary depending on the API response; errors will be returned as NodeApiError exceptions. The operation requires valid OAuth2 credentials and the file key and request body are mandatory inputs.
Examples
Example 1: Create or update a variable
Set 'Key' to the Figma file key and provide the variable data JSON in 'Request Body'.