Figma

Figma API

This is the OpenAPI specification for the [Figma REST API](https://developers.figma.com/docs/rest-api/). Note: we are releasing the OpenAPI specification as a…

Developer tools#openapi

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

This is the OpenAPI specification for the Figma REST API.

Note: we are releasing the OpenAPI specification as a beta given the large surface area and complexity of the REST API. If you notice any inaccuracies with the specification, please file an issue.

Endpoints 59

Files

  • GETGet file JSON/v1/files/:file_key?version=string&ids=string&depth=0.0&geometry=string&plugin_data=string&branch_data=falseReturns the document identified by file_key as a JSON object. The file key can be parsed from any Figma file url:…
  • GETGet file JSON for specific nodes/v1/files/:file_key/nodes?ids=string&version=string&depth=0.0&geometry=string&plugin_data=stringReturns the nodes referenced to by ids as a JSON object. The nodes are retrieved from the Figma file referenced to by file_key. The node ID and file key can…
  • GETRender images of file nodes/v1/images/:file_key?ids=string&version=string&scale=0.01&format=png&svg_outline_text=true&svg_include_id=false&svg_include_node_id=false&svg_simplify_stroke=true&contents_only=true&use_absolute_bounds=falseRenders images from a file. If no error occurs, "images" will be populated with a map from node IDs to URLs of the rendered images, and "status" will be…
  • GETGet image fills/v1/files/:file_key/imagesReturns download links for all images present in image fills in a document. Image fills are how Figma represents any user supplied images. When you drag an…
  • GETGet file metadata/v1/files/:file_key/metaGet file metadata
  • POSTDuplicate a file/v1/files/:file_key/duplicateDuplicates a main file or branch into the specified folder as a new standalone file. The source file and destination folder must belong to the Enterprise plan…
  • GETGet versions of a file/v1/files/:file_key/versions?page_size=0.0&before=0.0&after=0.0This endpoint fetches the version history of a file, allowing you to see the progression of a file over time. You can then use this information to render a…

Comments

  • GETGet comments in a file/v1/files/:file_key/comments?as_md=trueGets a list of comments left on the file.
  • POSTAdd a comment to a file/v1/files/:file_key/commentsPosts a new comment on the file.
  • DELETEDelete a comment/v1/files/:file_key/comments/:comment_idDeletes a specific comment. Only the person who made the comment is allowed to delete it.

Comment Reactions

  • GETGet reactions for a comment/v1/files/:file_key/comments/:comment_id/reactions?cursor=stringGets a paginated list of reactions left on the comment.
  • POSTAdd a reaction to a comment/v1/files/:file_key/comments/:comment_id/reactionsPosts a new comment reaction on a file comment.
  • DELETEDelete a reaction/v1/files/:file_key/comments/:comment_id/reactions?emoji=stringDeletes a specific comment reaction. Only the person who made the reaction is allowed to delete it.

Projects

  • GET[Deprecated] Get projects in a team/v1/teams/:team_id/projectsDeprecated. Deprecated in favor of Get top-level folders in a team. You can use this endpoint to get a list of the top-level Projects (now called "folders")…
  • GET[Deprecated] Get project metadata/v1/projects/:project_id/metaDeprecated. Deprecated in favor of Get folder metadata. Get metadata for a project (now called a "folder").
  • GET[Deprecated] Get files in a project/v1/projects/:project_id/files?branch_data=falseDeprecated. Deprecated in favor of Get files in a folder. Get a list of all the Files within the specified project (now called a "folder").

Teams

  • POSTCreate a team/v1/teamsCreates a team in the Enterprise plan associated with a private OAuth app. The app uses the authenticated user's permissions, and that user becomes the team…
  • GETGet a team/v1/teams/:team_idReturns metadata for a team the caller can access. Private OAuth apps can use this endpoint for Professional, Organization, and Enterprise plans. Plan access…
  • POSTInvite users to a team/v1/teams/:team_id/invitesInvites users to a team with the requested role. This endpoint is available only to private OAuth apps associated with an Enterprise plan, and the team must…

Folders

  • POSTCreate a folder/v1/teams/:team_id/foldersCreates a top-level folder in a team. The team must belong to the Enterprise plan associated with the private OAuth app, and the authenticated user must be…
  • GETGet top-level folders in a team/v2/teams/:team_id/foldersGet a list of the top-level folders (previously called "projects") within the specified team. Subfolders can be traversed with the GET…
  • GETGet subfolders in a folder/v2/folders/:folder_id/foldersGet a list of the direct subfolders within the specified folder.
  • GETGet files in a folder/v2/folders/:folder_id/files?branch_data=falseGet a list of the files directly within the specified folder.
  • GETGet folder metadata/v2/folders/:folder_id/metaGet metadata for a folder (name, thumbnail, file count, timestamps) without enumerating its files.

Users

  • GETGet current user/v1/meReturns the user information for the currently authenticated user.

Components

  • GETGet team components/v1/teams/:team_id/components?page_size=30&after=0.0&before=0.0Get a paginated list of published components within a team library.
  • GETGet file components/v1/files/:file_key/componentsGet a list of published components within a file library.
  • GETGet component/v1/components/:keyGet metadata on a component by key.

Component Sets

  • GETGet team component sets/v1/teams/:team_id/component_sets?page_size=30&after=0.0&before=0.0Get a paginated list of published component sets within a team library.
  • GETGet file component sets/v1/files/:file_key/component_setsGet a list of published component sets within a file library.
  • GETGet component set/v1/component_sets/:keyGet metadata on a published component set by key.

Styles

  • GETGet team styles/v1/teams/:team_id/styles?page_size=30&after=0.0&before=0.0Get a paginated list of published styles within a team library.
  • GETGet file styles/v1/files/:file_key/stylesGet a list of published styles within a file library.
  • GETGet style/v1/styles/:keyGet metadata on a style by key.

Webhooks

  • GETGet webhooks by context or plan/v2/webhooks?context=string&context_id=string&plan_api_id=string&cursor=stringReturns a list of webhooks corresponding to the context or plan provided, if they exist. For plan, the webhooks for all contexts that you have access to will…
  • POSTCreate a webhook/v2/webhooksCreate a new webhook which will call the specified endpoint when the event triggers. By default, this webhook will automatically send a PING event to the…
  • GETGet a webhook/v2/webhooks/:webhook_idGet a webhook by ID.
  • PUTUpdate a webhook/v2/webhooks/:webhook_idUpdate a webhook by ID.
  • DELETEDelete a webhook/v2/webhooks/:webhook_idDeletes the specified webhook. This operation cannot be reversed.
  • GET[Deprecated] Get team webhooks/v2/teams/:team_id/webhooksDeprecated. Returns all webhooks registered under the specified team.
  • GETGet webhook requests/v2/webhooks/:webhook_id/requestsReturns all webhook requests sent within the last week. Useful for debugging.

Activity Logs

  • GETGet activity logs/v1/activity_logs?events=string&start_time=0.0&end_time=0.0&limit=0.0&order=ascReturns a list of activity log events

Developer Logs

  • POSTGet developer logs/v1/developer_logsReturns a list of developer log entries for REST API and MCP server requests made within the organization. This endpoint requires a plan access token with the…

AI Usage

  • GETGet daily AI credit usage/v1/ai_usage/daily?start_date=string&end_date=string&user_email=string&limit=1000&cursor=stringReturns per-user, per-day AI credit usage for the plan associated with the calling token. This endpoint requires a plan access token with the…

Payments

  • GETGet payments/v1/payments?plugin_payment_token=string&user_id=string&community_file_id=string&plugin_id=string&widget_id=stringThere are two methods to query for a user's payment information on a plugin, widget, or Community file. The first method, using plugin payment tokens, is…

Variables

  • GETGet local variables/v1/files/:file_key/variables/localThis API is available to full members of Enterprise orgs. The GET /v1/files/:file_key/variables/local endpoint lets you enumerate local variables created in…
  • GETGet published variables/v1/files/:file_key/variables/publishedThis API is available to full members of Enterprise orgs. The GET /v1/files/:file_key/variables/published endpoint returns the variables that are published…
  • POSTCreate/modify/delete variables/v1/files/:file_key/variablesThis API is available to full members of Enterprise orgs with Editor seats. The POST /v1/files/:file_key/variables endpoint lets you bulk create, update, and…

Dev Resources

  • GETGet dev resources/v1/files/:file_key/dev_resources?node_ids=stringGet dev resources in a file
  • PUTUpdate dev resources/v1/dev_resourcesBulk update dev resources across multiple files. Ids for dev resources that are successfully updated will show up in the links_updated array in the response.…
  • POSTCreate dev resources/v1/dev_resourcesBulk create dev resources across multiple files. Dev resources that are successfully created will show up in the links_created array in the response. If there…
  • DELETEDelete dev resource/v1/files/:file_key/dev_resources/:dev_resource_idDelete a dev resource from a file

Library Analytics

  • GETGet library analytics component action data./v1/analytics/libraries/:file_key/component/actions?cursor=string&group_by=component&start_date=string&end_date=stringReturns a list of library analytics component actions data broken down by the requested dimension.
  • GETGet library analytics component usage data./v1/analytics/libraries/:file_key/component/usages?cursor=string&group_by=componentReturns a list of library analytics component usage data broken down by the requested dimension.
  • GETGet library analytics style action data./v1/analytics/libraries/:file_key/style/actions?cursor=string&group_by=style&start_date=string&end_date=stringReturns a list of library analytics style actions data broken down by the requested dimension.
  • GETGet library analytics style usage data./v1/analytics/libraries/:file_key/style/usages?cursor=string&group_by=styleReturns a list of library analytics style usage data broken down by the requested dimension.
  • GETGet library analytics variable action data./v1/analytics/libraries/:file_key/variable/actions?cursor=string&group_by=variable&start_date=string&end_date=stringReturns a list of library analytics variable actions data broken down by the requested dimension.
  • GETGet library analytics variable usage data./v1/analytics/libraries/:file_key/variable/usages?cursor=string&group_by=variableReturns a list of library analytics variable usage data broken down by the requested dimension.

oEmbed

  • GETGet oEmbed data/v1/oembed?url=string&maxwidth=800&maxheight=450Returns oEmbed data for a Figma file or published Make site URL, following the oEmbed specification.

API details

Base URL
https://api.figma.com
Authentication
An API key in the X-Figma-Token header
An API key in the X-Figma-Token header
OAuth 2.0 (authorization code flow) with 26 scopes
OAuth 2.0 (authorization code flow) with 1 scope
Operations
59 operations on 52 pathsGET 43POST 10DELETE 4PUT 2
4 marked deprecated
Main resources
Files 7Webhooks 7Library Analytics 6Folders 5Dev Resources 4Comment Reactions 3Comments 3Component Sets 3Components 3Projects 3
Response formats
application/json text/html
Description format
OpenAPI 3.1.0, API version 0.47.0

How to test the Figma API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Figma API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses an API key in the X-Figma-Token header. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Get file JSON” (GET /v1/files/:file_key?version=string&ids=string&depth=0.0&geometry=string&plugin_data=string&branch_data=false), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Figma API?

This is the OpenAPI specification for the [Figma REST API](https://developers.figma.com/docs/rest-api/). Note: we are releasing the OpenAPI specification as a… It is listed under Developer tools and has 59 endpoints.

Who publishes the Figma API?

It is listed from Figma's public API description (an OpenAPI document), not published by Figma on Swastik Codes. Anyone who controls figma.com can claim the profile by adding a DNS TXT record.

What is the base URL of the Figma API?

Requests go to https://api.figma.com. Endpoint paths are added to this base URL.

How do I authenticate with the Figma API?

It accepts 4 methods: an API key in the X-Figma-Token header; an API key in the X-Figma-Token header; OAuth 2.0 (authorization code flow) with 26 scopes; OAuth 2.0 (authorization code flow) with 1 scope.

How many endpoints does the Figma API have?

59 operations on 52 paths (43 GET, 10 POST, 4 DELETE, 2 PUT). The largest groups are Files, Webhooks, Library Analytics, Folders.

Is forking the Figma API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.