Issues with Updating Node Properties via Figma API

Hi!
I am currently developing an application that interacts with Figma files (updating some nodes) through the Figma API. I am encountering persistent issues.

Details of the Issue:

  • Node Information:

    • ID: “yy:yyy”
    • Type: TEXT
    • Current Name “xxxxxxxxxxxx”
  • API Request:

  • Payload:
    json
    {
    “document”: {
    “id”: “yy:yyy”,
    “name”: “xxxxxxxxxxxx”
    }
    }

  • Headers:

    • X-FIGMA-TOKEN: [Valid API Token]
  • Error Response:

    • Status Code: 404 Not Found
    • Message: { status: 404, err: ‘Not found’ }
  • Additional Information:

  • Figma Account Plan: Professional
  • API Token Permissions: File content (read), Comments (write), Dev resources (write), Webhooks (write)
  • Development Environment: Node.js application using Axios for HTTP requests

Request for Assistance:

I am seeking your expertise to understand the following:

  1. Feasibility: Is it possible to update the name property of a text node using the Figma API? If not, which properties are modifiable?
  2. Correct Endpoint and Method: Am I using the appropriate API endpoint and HTTP method for this operation? If there is a more suitable approach, please advise.
  3. Error Clarification: What does the 404 error indicate in this context? Does it pertain to the node not being found, or is it related to insufficient permissions?
  4. Best Practices: Could you provide guidance or best practices for programmatically updating node properties within a Figma file?
  5. Token permissions: why my token “file content” permission is just “read”, no possibility to select “write” permission when I generate a new token despite I have Professional Plan?

Additional Information:

  • Figma Account Plan: Professional
  • API Token Permissions: File content (read), Comments (write), Dev resources (write), Webhooks (write)
  • Development Environment: Node.js application using Axios for HTTP requests

Thanks

This is not possible. REST API does not allow modification of nodes.

This endpoint only supports the GET method. Please refer to the developer documentation: https://www.figma.com/developers/api#files-endpoints

Thanks for your reply!
In this case, which API types and endpoints support modification of nodes in Figma? Maybe it is needed to change Figma plan or type of seats?
Please support: how can I get possiblity to interact with Figma files through API with option to modify nodes?
Thanks.

You can modify nodes using Plugin API. Please see the “Compare the Figma APIs” page.