Figma

Learn how to use Figma with Composio

Overview

Enum

FIGMA

Description

A collaborative interface design tool.

Authentication Details

client_id
stringRequired
client_secret
stringRequired
oauth_redirect_uri
stringDefaults to https://backend.composio.dev/api/v1/auth-apps/add
scopes
stringDefaults to files:read,file_comments:write,file_dev_resources:read,file_dev_resources:write,webhooks:write
base_url
stringDefaults to https://api.figma.com
api_key
stringRequired
base_url
stringDefaults to https://api.figma.com

Actions

Posts a new comment on the file.

Action Parameters

client_meta
object
comment_id
string
file_key
stringRequired
message
stringRequired

Action Response

data
object
error
successful
boolean

Posts a new comment reaction on a file comment.

Action Parameters

comment_id
stringRequired
emoji
stringRequired
file_key
stringRequired

Action Response

data
object
error
successful
boolean

Create 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 endpoint when it is created. if this behavior is not desired, you can create the webhook and set the status to paused and reactivate it later.

Action Parameters

description
string
endpoint
stringRequired
event_type
stringRequired
passcode
stringRequired
status
string
team_id
stringRequired

Action Response

data
object
error
successful
boolean

Bulk 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 are any dev resources that cannot be created, you may still get a 200 response. these resources will show up in the errors array. some reasons a dev resource cannot be created include: - resource points to a file key that cannot be found. - the node already has the maximum of 10 dev resources. - another dev resource for the node has the same url.

Action Parameters

dev_resources
arrayRequired

Action Response

data
object
error
successful
boolean

This endpoint allows you to manage variables, variable collections, modes, and their values within a figma file. it provides comprehensive control over your design system’s variable structure, enabling you to create, update, and delete variable collections, modes, and individual variables. you can also set specific values for variables across different modes. use this endpoint when you need to programmatically update your design system’s variable structure or values, such as during bulk updates or when synchronizing with external systems. the endpoint supports various variable types (boolean, float, string, color) and allows for platform-specific code syntax definitions. keep in mind that this endpoint performs multiple actions in a single call, so careful structuring of your request is essential to avoid unintended changes.

Action Parameters

file_key
stringRequired
variableCollections
array
variableModeValues
array
variableModes
array
variables
array

Action Response

data
object
error
successful
boolean

Deletes a specific comment. only the person who made the comment is allowed to delete it.

Action Parameters

comment_id
stringRequired
file_key
stringRequired

Action Response

data
object
error
successful
boolean

Deletes a specific comment reaction. only the person who made the reaction is allowed to delete it.

Action Parameters

comment_id
stringRequired
emoji
stringRequired
file_key
stringRequired

Action Response

data
object
error
successful
boolean

Deletes the specified webhook. this operation cannot be reversed.

Action Parameters

webhook_id
stringRequired

Action Response

data
object
error
successful
boolean

Delete a dev resource from a file

Action Parameters

dev_resource_id
stringRequired
file_key
stringRequired

Action Response

data
object
error
successful
boolean

Returns a list of activity log events

Action Parameters

end_time
integer
events
string
limit
integer
order
stringDefaults to asc
start_time
integer

Action Response

data
object
error
successful
boolean

Get a webhook by id.

Action Parameters

webhook_id
stringRequired

Action Response

data
object
error
successful
boolean

Gets a list of comments left on the file.

Action Parameters

as_md
boolean
file_key
stringRequired

Action Response

data
object
error
successful
boolean

Get metadata on a component by key.

Action Parameters

key
stringRequired

Action Response

data
object
error
successful
boolean

Get metadata on a published component set by key.

Action Parameters

key
stringRequired

Action Response

data
object
error
successful
boolean

Returns the user information for the currently authenticated user.

Action Parameters

Action Response

data
object
error
successful
boolean

Get dev resources in a file

Action Parameters

file_key
stringRequired
node_ids
string

Action Response

data
object
error
successful
boolean

Get a list of all the files within the specified project.

Action Parameters

branch_data
boolean
project_id
stringRequired

Action Response

data
object
error
successful
boolean

Get a list of published components within a file library.

Action Parameters

file_key
stringRequired

Action Response

data
object
error
successful
boolean

Get a list of published component sets within a file library.

Action Parameters

file_key
stringRequired

Action Response

data
object
error
successful
boolean

Returns the document identified by file key as a json object. the file key can be parsed from any figma file url: https://www.figma.com/file/{file_key}/{title}“. the document property contains a node of type document. the components property contains a mapping from node ids to component metadata. this is to help you determine which components each instance comes from.

Action Parameters

branch_data
boolean
depth
integer
file_key
stringRequired
geometry
string
ids
string
plugin_data
string
version
string

Action Response

data
object
error
successful
boolean

Retrieves nodes (design elements) from a specified figma file. this endpoint allows developers to access and extract various design components, such as shapes, text layers, frames, components, and groups, from a particular figma document. it’s particularly useful for applications that need to analyze, render, or manipulate figma designs programmatically. the endpoint should be used when you need to fetch the structure and content of a figma file, but it won’t provide real-time collaborative features or make changes to the file. keep in mind that the response may be large for complex files with many nodes, so consider performance implications when making frequent calls.

Action Parameters

depth
integer
file_key
stringRequired
geometry
string
ids
stringRequired
plugin_data
string
version
string

Action Response

data
object
error
successful
boolean

Get a list of published styles within a file library.

Action Parameters

file_key
stringRequired

Action Response

data
object
error
successful
boolean

Returns 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 image into figma, we create a rectangle with a single fill that represents the image, and the user is able to transform the rectangle (and properties on the fill) as they wish. this endpoint returns a mapping from image references to the urls at which the images may be download. image urls will expire after no more than 14 days. image references are located in the output of the get files endpoint under the imageref attribute in a paint.

Action Parameters

file_key
stringRequired

Action Response

data
object
error
successful
boolean

Returns a list of library analytics component actions data broken down by the requested dimension.

Action Parameters

cursor
string
end_date
string
file_key
stringRequired
group_by
stringRequired
start_date
string

Action Response

data
object
error
successful
boolean

Returns a list of library analytics component usage data broken down by the requested dimension.

Action Parameters

cursor
string
file_key
stringRequired
group_by
stringRequired

Action Response

data
object
error
successful
boolean

Returns a list of library analytics style actions data broken down by the requested dimension.

Action Parameters

cursor
string
end_date
string
file_key
stringRequired
group_by
stringRequired
start_date
string

Action Response

data
object
error
successful
boolean

Returns a list of library analytics style usage data broken down by the requested dimension.

Action Parameters

cursor
string
file_key
stringRequired
group_by
stringRequired

Action Response

data
object
error
successful
boolean

Returns a list of library analytics variable actions data broken down by the requested dimension.

Action Parameters

cursor
string
end_date
string
file_key
stringRequired
group_by
stringRequired
start_date
string

Action Response

data
object
error
successful
boolean

Returns a list of library analytics variable usage data broken down by the requested dimension.

Action Parameters

cursor
string
file_key
stringRequired
group_by
stringRequired

Action Response

data
object
error
successful
boolean

this 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 the file and remote variables used in the file. remote variables are referenced by their subscribed id. as a part of the variables related api additions, the get /v1/files/:file key endpoint now returns a boundvariables property, containing the variableid of the bound variable. the get /v1/files/:file key/variables/local endpoint can be used to get the full variable or variable collection object. note that get /v1/files/:file key/variables/published does not return modes. instead, you will need to use the get /v1/files/:file key/variables/local endpoint, in the same file, to examine the mode values.

Action Parameters

file_key
stringRequired

Action Response

data
object
error
successful
boolean

Returns the user information for the currently authenticated user.(DEPRECATED use get_current_user)

Action Parameters

Action Response

data
object
error
successful
boolean

There 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 typically used when making queries from a plugin’s or widget’s code. the second method, providing a user id and resource id, is typically used when making queries from anywhere else. note that you can only query for resources that you own. in most cases, this means that you can only query resources that you originally created.

Action Parameters

community_file_id
integer
plugin_id
integer
plugin_payment_token
string
user_id
integer
widget_id
integer

Action Response

data
object
error
successful
boolean

You can use this endpoint to get a list of all the projects within the specified team. this will only return projects visible to the authenticated user or owner of the developer token. note: it is not currently possible to programmatically obtain the team id of a user just from a token. to obtain a team id, navigate to a team page of a team you are a part of. the team id will be present in the url after the word team and before your team name.

Action Parameters

team_id
stringRequired

Action Response

data
object
error
successful
boolean

this api is available to full members of enterprise orgs. the get /v1/files/:file key/variables/published endpoint returns the variables that are published from the given file. the response for this endpoint contains some key differences compared to the get /v1/files/:file key/variables/local endpoint: - each variable and variable collection contains a subscribed id. - modes are omitted for published variable collections published variables have two ids: an id that is assigned in the file where it is created (id), and an id that is used by subscribing files (subscribed id). the id and key are stable over the lifetime of the variable. the subscribed id changes every time the variable is modified and published. the same is true for variable collections. the updatedat fields are iso 8601 timestamps that indicate the last time that a change to a variable was published. for variable collections, this timestamp will change any time a variable in the collection is changed.

Action Parameters

file_key
stringRequired

Action Response

data
object
error
successful
boolean

Gets a paginated list of reactions left on the comment.

Action Parameters

comment_id
stringRequired
cursor
string
file_key
stringRequired

Action Response

data
object
error
successful
boolean

Get metadata on a style by key.

Action Parameters

key
stringRequired

Action Response

data
object
error
successful
boolean

Get a paginated list of published components within a team library.

Action Parameters

after
integer
before
integer
page_size
integerDefaults to 30
team_id
stringRequired

Action Response

data
object
error
successful
boolean

Get a paginated list of published component sets within a team library.

Action Parameters

after
integer
before
integer
page_size
integerDefaults to 30
team_id
stringRequired

Action Response

data
object
error
successful
boolean

Get a paginated list of published styles within a team library.

Action Parameters

after
integer
before
integer
page_size
integerDefaults to 30
team_id
stringRequired

Action Response

data
object
error
successful
boolean

Returns all webhooks registered under the specified team.

Action Parameters

team_id
stringRequired

Action Response

data
object
error
successful
boolean

This 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 specific version of the file, via another endpoint.

Action Parameters

after
integer
before
integer
file_key
stringRequired
page_size
integer

Action Response

data
object
error
successful
boolean

Returns all webhook requests sent within the last week. useful for debugging.

Action Parameters

webhook_id
stringRequired

Action Response

data
object
error
successful
boolean

Renders 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 omitted. the image assets will expire after 30 days. images up to 32 megapixels can be exported. any images that are larger will be scaled down. important: the image map may contain values that are null. this indicates that rendering of that specific node has failed. this may be due to the node id not existing, or other reasons such has the node having no renderable components. it is guaranteed that any node that was requested for rendering will be represented in this map whether or not the render succeeded. to render multiple images from the same file, use the ids query parameter to specify multiple node ids. get /v1/images/:key?ids=1:2,1:3,1:4

Action Parameters

contents_only
booleanDefaults to True
file_key
stringRequired
format
stringDefaults to png
ids
stringRequired
scale
integer
svg_include_id
boolean
svg_include_node_id
boolean
svg_outline_text
booleanDefaults to True
svg_simplify_stroke
booleanDefaults to True
use_absolute_bounds
boolean
version
string

Action Response

data
object
error
successful
boolean

Update a webhook by id.

Action Parameters

description
string
endpoint
stringRequired
event_type
stringRequired
passcode
stringRequired
status
string
webhook_id
stringRequired

Action Response

data
object
error
successful
boolean

Bulk 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. if there are any dev resources that cannot be updated, you may still get a 200 response. these resources will show up in the errors array.

Action Parameters

dev_resources
arrayRequired

Action Response

data
object
error
successful
boolean