Figma Components API
Figma Components API provides access to published components, component sets, and styles from team libraries. Query component metadata, retrieve thumbnails, and access documentation links for reusable design elements.
Figma Components API provides access to published components, component sets, and styles from team libraries. Query component metadata, retrieve thumbnails, and access documentation links for reusable design elements.
openapi: 3.1.0
info:
title: Figma REST API
version: '2.0.0'
description: >-
The Figma REST API provides programmatic access to Figma files, comments,
components, and related resources. It enables developers to read and interact
with design data, export assets, manage comments and reactions, and query
published components and styles from team libraries. Authentication is done
via personal access tokens or OAuth 2.0.
termsOfService: https://www.figma.com/developer-terms/
contact:
name: Figma Developer Support
url: https://www.figma.com/developers
email: [email protected]
license:
name: Figma Developer Terms
url: https://www.figma.com/developer-terms/
externalDocs:
description: Figma REST API Documentation
url: https://developers.figma.com/docs/rest-api/
servers:
- url: https://api.figma.com
description: Figma Production API Server
tags:
- name: Comments
description: >-
Endpoints for managing comments and reactions on Figma files, including
creating, listing, and deleting comments.
externalDocs:
description: Comments Endpoints Documentation
url: https://developers.figma.com/docs/rest-api/comments-endpoints/
- name: Components
description: >-
Endpoints for querying published components, component sets, and styles
from team libraries.
externalDocs:
description: Component Types Documentation
url: https://developers.figma.com/docs/rest-api/component-types/
- name: Files
description: >-
Endpoints for retrieving Figma file data including document trees, nodes,
images, and version history.
externalDocs:
description: File Endpoints Documentation
url: https://developers.figma.com/docs/rest-api/file-endpoints/
- name: Projects
description: >-
Endpoints for listing team projects and project files.
externalDocs:
description: Projects Documentation
url: https://developers.figma.com/docs/rest-api/projects-types/
- name: Users
description: >-
Endpoints for retrieving information about the authenticated user.
externalDocs:
description: Users Endpoints Documentation
url: https://developers.figma.com/docs/rest-api/users-endpoints/
paths:
/v1/files/{file_key}:
get:
tags:
- Files
summary: Figma Get File
operationId: getFile
description: >-
Returns the document tree for a given Figma file. If the file is large,
the response may be paginated. The file_key can be found in the Figma
file URL after figma.com/file/.
security:
- PersonalAccessToken: []
- OAuth2:
- files:read
parameters:
- $ref: '#/components/parameters/FileKeyPathParam'
- name: version
in: query
description: A specific version ID to get. Omitting this will get the current version.
required: false
schema:
type: string
example: example_value
- name: ids
in: query
description: >-
Comma-separated list of nodes that you want to receive. If not set,
all nodes are returned.
required: false
schema:
type: string
example: example_value
- name: depth
in: query
description: >-
Positive integer representing how deep into the document tree to
traverse. For example, setting depth=1 returns only pages.
required: false
schema:
type: integer
minimum: 1
example: 10
- name: geometry
in: query
description: Set to "paths" to export vector data.
required: false
schema:
type: string
enum:
- paths
example: paths
- name: plugin_data
in: query
description: >-
Comma-separated list of plugin IDs or the string "shared" for data
present in all plugins.
required: false
schema:
type: string
example: example_value
- name: branch_data
in: query
description: Set to true to include branch metadata in the response.
required: false
schema:
type: boolean
example: true
responses:
'200':
description: Successfully retrieved the file.
content:
application/json:
schema:
$ref: '#/components/schemas/GetFileResponse'
examples:
Getfile200Example:
summary: Default getFile 200 response
x-microcks-default: true
value:
name: Example Title
role: owner
lastModified: '2026-01-15T10:30:00Z'
editorType: figma
thumbnailUrl: https://www.example.com
version: example_value
document:
id: abc123
name: Example Title
type: DOCUMENT
children:
- {}
components: example_value
componentSets: example_value
schemaVersion: 10
styles: example_value
mainFileKey: example_value
branches:
- key: example_value
name: Example Title
thumbnail_url: https://www.example.com
last_modified: '2026-01-15T10:30:00Z'
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbiddenError'
'404':
$ref: '#/components/responses/NotFoundError'
'429':
$ref: '#/components/responses/RateLimitError'
'500':
$ref: '#/components/responses/InternalServerError'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/v1/files/{file_key}/nodes:
get:
tags:
- Files
summary: Figma Get File Nodes
operationId: getFileNodes
description: >-
Returns the nodes referenced by ids as a JSON object. The nodes are
retrieved from the document referred to by file_key. The node ID and
file key for a given node can be parsed from any Figma node URL.
security:
- PersonalAccessToken: []
- OAuth2:
- files:read
parameters:
- $ref: '#/components/parameters/FileKeyPathParam'
- name: ids
in: query
description: Comma-separated list of node IDs to retrieve.
required: true
schema:
type: string
example: example_value
- name: version
in: query
description: A specific version ID to get.
required: false
schema:
type: string
example: example_value
- name: depth
in: query
description: Positive integer for how deep into the node tree to traverse.
required: false
schema:
type: integer
minimum: 1
example: 10
- name: geometry
in: query
description: Set to "paths" to export vector data.
required: false
schema:
type: string
enum:
- paths
example: paths
- name: plugin_data
in: query
description: Comma-separated list of plugin IDs or "shared".
required: false
schema:
type: string
example: example_value
responses:
'200':
description: Successfully retrieved the file nodes.
content:
application/json:
schema:
$ref: '#/components/schemas/GetFileNodesResponse'
examples:
Getfilenodes200Example:
summary: Default getFileNodes 200 response
x-microcks-default: true
value:
name: Example Title
lastModified: '2026-01-15T10:30:00Z'
version: example_value
role: owner
nodes: example_value
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbiddenError'
'404':
$ref: '#/components/responses/NotFoundError'
'429':
$ref: '#/components/responses/RateLimitError'
'500':
$ref: '#/components/responses/InternalServerError'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/v1/images/{file_key}:
get:
tags:
- Files
summary: Figma Get Image Renders
operationId: getImages
description: >-
Renders images from a file. If no error occurs, the response includes
a mapping from node IDs to URLs of the rendered images. The image
assets are stored temporarily and expire after 14 days.
security:
- PersonalAccessToken: []
- OAuth2:
- files:read
parameters:
- $ref: '#/components/parameters/FileKeyPathParam'
- name: ids
in: query
description: Comma-separated list of node IDs to render.
required: true
schema:
type: string
example: example_value
- name: scale
in: query
description: A number between 0.01 and 4, the image scaling factor.
required: false
schema:
type: number
minimum: 0.01
maximum: 4
example: 42.5
- name: format
in: query
description: Image output format.
required: false
schema:
type: string
enum:
- jpg
- png
- svg
- pdf
example: jpg
- name: svg_include_id
in: query
description: Whether to include id attributes for all SVG elements.
required: false
schema:
type: boolean
example: '500123'
- name: svg_simplify_stroke
in: query
description: Whether to simplify inside/outside strokes and use stroke attribute.
required: false
schema:
type: boolean
example: true
- name: use_absolute_bounds
in: query
description: Use the full dimensions of the node regardless of cropping.
required: false
schema:
type: boolean
example: true
- name: version
in: query
description: A specific version ID to get.
required: false
schema:
type: string
example: example_value
responses:
'200':
description: Successfully rendered images.
content:
application/json:
schema:
$ref: '#/components/schemas/GetImagesResponse'
examples:
Getimages200Example:
summary: Default getImages 200 response
x-microcks-default: true
value:
err: example_value
images: example_value
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbiddenError'
'404':
$ref: '#/components/responses/NotFoundError'
'429':
$ref: '#/components/responses/RateLimitError'
'500':
$ref: '#/components/responses/InternalServerError'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/v1/files/{file_key}/image_fills:
get:
tags:
- Files
summary: Figma Get Image Fills
operationId: getImageFills
description: >-
Returns a mapping of image references to URLs of the image contents.
Image URLs expire after no more than 14 days.
security:
- PersonalAccessToken: []
- OAuth2:
- files:read
parameters:
- $ref: '#/components/parameters/FileKeyPathParam'
responses:
'200':
description: Successfully retrieved image fill URLs.
content:
application/json:
schema:
$ref: '#/components/schemas/GetImageFillsResponse'
examples:
Getimagefills200Example:
summary: Default getImageFills 200 response
x-microcks-default: true
value:
error: true
status: 10
meta:
images: example_value
'401':
$ref: '#/components/responses/UnauthorizedError'
'404':
$ref: '#/components/responses/NotFoundError'
'429':
$ref: '#/components/responses/RateLimitError'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/v1/files/{file_key}/versions:
get:
tags:
- Files
summary: Figma Get File Version History
operationId: getFileVersions
description: >-
Returns a list of the version history of a file. The version history
consists of versions, auto-save entries, and named versions.
security:
- PersonalAccessToken: []
- OAuth2:
- files:read
parameters:
- $ref: '#/components/parameters/FileKeyPathParam'
- name: page_size
in: query
description: Number of items to return per page. Defaults to 30.
required: false
schema:
type: integer
minimum: 1
maximum: 100
example: 10
- name: before
in: query
description: >-
Version ID before which to start listing versions. Used for pagination.
required: false
schema:
type: string
example: example_value
- name: after
in: query
description: >-
Version ID after which to start listing versions. Used for pagination.
required: false
schema:
type: string
example: example_value
responses:
'200':
description: Successfully retrieved version history.
content:
application/json:
schema:
$ref: '#/components/schemas/GetFileVersionsResponse'
examples:
Getfileversions200Example:
summary: Default getFileVersions 200 response
x-microcks-default: true
value:
versions:
- id: abc123
created_at: '2026-01-15T10:30:00Z'
label: Example Title
description: A sample description.
pagination:
before: 42.5
after: 42.5
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbiddenError'
'404':
$ref: '#/components/responses/NotFoundError'
'429':
$ref: '#/components/responses/RateLimitError'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/v1/files/{file_key}/comments:
get:
tags:
- Comments
summary: Figma Get Comments
operationId: getComments
description: >-
Gets a list of comments left on the file. Comments are returned in
order of creation, with the most recent comments first. By default,
only root-level comments and their direct replies are returned.
security:
- PersonalAccessToken: []
- OAuth2:
- files:read
parameters:
- $ref: '#/components/parameters/FileKeyPathParam'
- name: as_md
in: query
description: >-
If set to true, comment message content will be returned as
Markdown instead of plain text.
required: false
schema:
type: boolean
example: true
responses:
'200':
description: Successfully retrieved comments.
content:
application/json:
schema:
$ref: '#/components/schemas/GetCommentsResponse'
examples:
Getcomments200Example:
summary: Default getComments 200 response
x-microcks-default: true
value:
comments:
- id: abc123
file_key: example_value
parent_id: '500123'
created_at: '2026-01-15T10:30:00Z'
resolved_at: '2026-01-15T10:30:00Z'
message: example_value
order_id: '500123'
reactions: {}
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbiddenError'
'404':
$ref: '#/components/responses/NotFoundError'
'429':
$ref: '#/components/responses/RateLimitError'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
post:
tags:
- Comments
summary: Figma Post Comment
operationId: postComment
description: >-
Posts a new comment on the file. The body of the request should contain
the comment text and optionally the position (client_meta) where the
comment should be pinned.
security:
- PersonalAccessToken: []
- OAuth2:
- file_comments:write
parameters:
- $ref: '#/components/parameters/FileKeyPathParam'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PostCommentRequest'
examples:
PostcommentRequestExample:
summary: Default postComment request
x-microcks-default: true
value:
message: example_value
comment_id: '500123'
client_meta:
x: 42.5
'y': 42.5
node_id: '500123'
node_offset:
x: 42.5
'y': 42.5
responses:
'200':
description: Successfully posted the comment.
content:
application/json:
schema:
$ref: '#/components/schemas/Comment'
examples:
Postcomment200Example:
summary: Default postComment 200 response
x-microcks-default: true
value:
id: abc123
file_key: example_value
parent_id: '500123'
user:
id: abc123
handle: example_value
img_url: https://www.example.com
email: [email protected]
created_at: '2026-01-15T10:30:00Z'
resolved_at: '2026-01-15T10:30:00Z'
message: example_value
order_id: '500123'
client_meta:
x: 42.5
'y': 42.5
node_id: '500123'
node_offset:
x: 42.5
'y': 42.5
reactions:
- emoji: example_value
created_at: '2026-01-15T10:30:00Z'
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbiddenError'
'404':
$ref: '#/components/responses/NotFoundError'
'429':
$ref: '#/components/responses/RateLimitError'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/v1/files/{file_key}/comments/{comment_id}:
delete:
tags:
- Comments
summary: Figma Delete Comment
operationId: deleteComment
description: >-
Deletes a specific comment. Only the comment creator or file owner
can delete a comment.
security:
- PersonalAccessToken: []
- OAuth2:
- file_comments:write
parameters:
- $ref: '#/components/parameters/FileKeyPathParam'
- name: comment_id
in: path
description: The ID of the comment to delete.
required: true
schema:
type: string
example: '500123'
responses:
'200':
description: Successfully deleted the comment.
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessResponse'
examples:
Deletecomment200Example:
summary: Default deleteComment 200 response
x-microcks-default: true
value:
error: false
status: 200
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbiddenError'
'404':
$ref: '#/components/responses/NotFoundError'
'429':
$ref: '#/components/responses/RateLimitError'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/v1/files/{file_key}/comments/{comment_id}/reactions:
get:
tags:
- Comments
summary: Figma Get Comment Reactions
operationId: getCommentReactions
description: >-
Gets a paginated list of reactions for a comment.
security:
- PersonalAccessToken: []
- OAuth2:
- files:read
parameters:
- $ref: '#/components/parameters/FileKeyPathParam'
- name: comment_id
in: path
description: The ID of the comment.
required: true
schema:
type: string
example: '500123'
- name: cursor
in: query
description: Cursor for paginated results.
required: false
schema:
type: string
example: example_value
responses:
'200':
description: Successfully retrieved reactions.
content:
application/json:
schema:
$ref: '#/components/schemas/GetReactionsResponse'
examples:
Getcommentreactions200Example:
summary: Default getCommentReactions 200 response
x-microcks-default: true
value:
reactions:
- emoji: example_value
created_at: '2026-01-15T10:30:00Z'
pagination:
cursor: example_value
'401':
$ref: '#/components/responses/UnauthorizedError'
'404':
$ref: '#/components/responses/NotFoundError'
'429':
$ref: '#/components/responses/RateLimitError'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
post:
tags:
- Comments
summary: Figma Post Comment Reaction
operationId: postCommentReaction
description: >-
Posts a reaction to a comment.
security:
- PersonalAccessToken: []
- OAuth2:
- file_comments:write
parameters:
- $ref: '#/components/parameters/FileKeyPathParam'
- name: comment_id
in: path
description: The ID of the comment.
required: true
schema:
type: string
example: '500123'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- emoji
properties:
emoji:
type: string
description: The emoji string to react with.
examples:
PostcommentreactionRequestExample:
summary: Default postCommentReaction request
x-microcks-default: true
value:
emoji: example_value
responses:
'200':
description: Successfully posted the reaction.
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessResponse'
examples:
Postcommentreaction200Example:
summary: Default postCommentReaction 200 response
x-microcks-default: true
value:
error: false
status: 200
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbiddenError'
'404':
$ref: '#/components/responses/NotFoundError'
'429':
$ref: '#/components/responses/RateLimitError'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/v1/teams/{team_id}/components:
get:
tags:
- Components
summary: Figma Get Team Components
operationId: getTeamComponents
description: >-
Get a paginated list of published components within a team library.
The components are returned in order of when they were published.
security:
- PersonalAccessToken: []
- OAuth2:
- files:read
parameters:
- $ref: '#/components/parameters/TeamIdPathParam'
- name: page_size
in: query
description: Number of items per page. Defaults to 30.
required: false
schema:
type: integer
minimum: 1
maximum: 100
example: 10
- name: after
in: query
description: Cursor for paginated results. Use the cursor value from pagination in a previous response.
required: false
schema:
type: number
example: 42.5
- name: before
in: query
description: Cursor for paginated results in reverse.
required: false
schema:
type: number
example: 42.5
responses:
'200':
description: Successfully retrieved team components.
content:
application/json:
schema:
$ref: '#/components/schemas/GetTeamComponentsResponse'
examples:
Getteamcomponents200Example:
summary: Default getTeamComponents 200 response
x-microcks-default: true
value:
error: true
status: 10
meta:
components:
- {}
cursor:
before: 42.5
after: 42.5
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbiddenError'
'404':
$ref: '#/components/responses/NotFoundError'
'429':
$ref: '#/components/responses/RateLimitError'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/v1/files/{file_key}/components:
get:
tags:
- Components
summary: Figma Get File Components
operationId: getFileComponents
description: >-
Get a list of published components within a file library.
security:
- PersonalAccessToken: []
- OAuth2:
- files:read
parameters:
- $ref: '#/components/parameters/FileKeyPathParam'
responses:
'200':
description: Successfully retrieved file components.
content:
application/json:
schema:
$ref: '#/components/schemas/GetFileComponentsResponse'
examples:
Getfilecomponents200Example:
summary: Default getFileComponents 200 response
x-microcks-default: true
value:
error: true
status: 10
meta:
components:
- {}
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbiddenError'
'404':
$ref: '#/components/responses/NotFoundError'
'429':
$ref: '#/components/responses/RateLimitError'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/v1/components/{key}:
get:
tags:
- Components
summary: Figma Get Component
operationId: getComponent
description: >-
Get metadata on a component by key. This is the unique identifier for
a published component that is globally unique across all files.
security:
- PersonalAccessToken: []
- OAuth2:
- files:read
parameters:
- name: key
in: path
description: The unique identifier of the component.
required: true
schema:
type: string
example: example_value
responses:
'200':
description: Successfully retrieved component.
content:
application/json:
schema:
$ref: '#/components/schemas/GetComponentResponse'
examples:
Getcomponent200Example:
summary: Default getComponent 200 response
x-microcks-default: true
value:
error: true
status: 10
meta:
key: example_value
file_key: example_value
node_id: '500123'
thumbnail_url: https://www.example.com
name: Example Title
description: A sample description.
created_at: '2026-01-15T10:30:00Z'
updated_at: '2026-01-15T10:30:00Z'
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbiddenError'
'404':
$ref: '#/components/responses/NotFoundError'
'429':
$ref: '#/components/responses/RateLimitError'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/v1/teams/{team_id}/component_sets:
get:
tags:
- Components
summary: Figma Get Team Component Sets
operationId: getTeamComponentSets
description: >-
Get a paginated list of published component sets within a team library.
security:
- PersonalAccessToken: []
- OAuth2:
- files:read
parameters:
- $ref: '#/components/parameters/TeamIdPathParam'
- name: page_size
in: query
description: Number of items per page.
required: false
schema:
type: integer
minimum: 1
maximum: 100
example: 10
- name: after
in: query
description: Cursor for pagination.
required: false
schema:
type: number
example: 42.5
- name: before
in: query
description: Cursor for reverse pagination.
required: false
schema:
type: number
example: 42.5
responses:
'200':
description: Successfully retrieved team component sets.
content:
application/json:
schema:
$ref: '#/components/schemas/GetTeamComponentSetsResponse'
examples:
Getteamcomponentsets200Example:
summary: Default getTeamComponentSets 200 response
x-microcks-default: true
value:
error: true
status: 10
meta:
component_sets:
- {}
cursor:
before: 42.5
after: 42.5
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbiddenError'
'404':
$ref: '#/components/responses/NotFoundError'
'429':
$ref: '#/components/responses/RateLimitError'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/v1/teams/{team_id}/styles:
get:
tags:
- Components
summary: Figma Get Team Styles
operationId: getTeamStyles
description: >-
Get a paginated list of published styles within a tea
# --- truncated at 32 KB (70 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/openapi/figma-rest-api-openapi.yml