List team components with the Figma API
Lists the components published in the libraries of a team, with the file_key and node_id of each one, which Get file nodes and Render images accept. The response has meta.cursor: pass its after value as after to read the next page; the list ends when after is missing.
- Identifier
- figma_list_team_components
The request
POST https://connect.reportei.com/api/tools/figma_list_team_components/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json
{
"customer_toolkit": "<connection UUID>",
"arguments": {
"team_id": "<team_id>"
}
}Your system sends your customer's connection id and the tool arguments. The headers are the same as the rest of the Connect API: your product's token and your customer's token.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| team_id | string | Yes | Id of the team: the number after /team/ in the URL of the team page in Figma. The API has no call that lists teams. |
| page_size | integer | No | Components per page, up to 1000. The default is 30. |
| after | integer | No | The meta.cursor.after value of the previous response, to read the next page. |
Supported connections
Your customer connects their Figma account once, with one of the modes below. The same connection serves every tool of the toolkit.
OAuth with your product's app
You register your product's OAuth app once, with POST /api/merchants/credentials/figma, and your customer authorizes the account on a consent screen. Connect renews the token when it is about to expire.
The response
On success, Connect preserves the app's response status and body. HTTP errors returned by the app use the {error, api_error} envelope; authentication or validation can fail before execution. The X-Toolkit-Execution-Id header identifies the recorded execution, available at GET /api/tools/executions/{uuid}.
Ready for AI agents
This tool's input is a JSON Schema, available at GET /api/tools/figma_list_team_components. It becomes your agent's tool definition with no conversion.
Other Figma tools
- Get file metadataGETReturns the metadata of a file without its content: name, folder, editor type (Figma Design, FigJam, Slides and others), creator, who changed it last and when, thumbnail, the role of the user and the link access. Much cheaper than Get file in the Figma rate limits, so use it first when the question is about the file and not its layers.
- Get fileGETReturns the document tree of a file: pages, frames and layers with their properties and ids, plus the components and styles the file uses. The tree of a large file is huge: pass depth 1 for the pages only, or 2 for the top-level frames of each page, then read a frame with Get file nodes. Figma puts this call in its smallest rate limit tier: files in a Starter plan, and users with a View or Collab seat, get only up to 20 calls a month.
- Get file nodesGETReturns the given frames or layers of a file, each with its whole subtree, under nodes, plus the name, version and last change of the file. A node that does not exist comes back as null. It is the light way to read one frame of a large file. Figma puts this call in its smallest rate limit tier: files in a Starter plan, and users with a View or Collab seat, get only up to 20 calls a month.
- Render imagesGETRenders frames or layers of a file as images and returns, in images, a map from each node id to a temporary URL of the image, valid for 30 days. A null value means that node could not be rendered. Images above 32 megapixels are scaled down. Figma puts this call in its smallest rate limit tier: files in a Starter plan, and users with a View or Collab seat, get only up to 20 calls a month.
- List file versionsGETLists the version history of a file, newest first: id, creation date, author, and the label and description of named versions. To read older versions, pass as before the before value of the pagination.next_page link; the history ends when next_page is missing.
- List commentsGETLists all the comments of a file, replies included. Each comment has id, message, author, created_at, resolved_at when it was resolved, its position in client_meta and the reactions. A reply carries the id of its root comment in parent_id.
- Create commentPOSTPosts a comment on a file as the connected user and returns it, or a reply when comment_id is sent. Without client_meta the comment is not pinned to a spot of the canvas. A posted comment cannot be edited, only deleted with Delete comment.
- Delete commentDELETEDeletes a comment of a file. Figma only lets the author delete a comment, so it works on the comments made by the connected user.
See Connect applied to your product.
Try it for 15 days with no card, or walk our team through your use case.
