Design-collaboration API for reading and writing Figma files, comments, components, styles, dev resources, and webhooks that a team already owns in Figma. Use when an agent needs to pull a file’s document tree, render node images, post comments, link external dev resources to nodes, or subscribe to file-change webhooks. Unlike public design databases, Figma returns design data the user has created or been shared — not a public corpus.
13 example endpoints available through Lava’s AI Gateway. See the Figma API docs for full documentation.
This provider requires your own credentials — connect your API key or OAuth account before use.
This is a
catch-all provider — any valid URL under
https://api.figma.com is supported. Any Figma REST API endpoint. Common roots: /v1/files/, /v1/files//nodes, /v1/images/, /v1/files//comments, /v1/teams//components, /v1/teams//projects, /v1/dev_resources, /v2/webhooks, /v1/me. Construct URL as
https://api.figma.com/{versioned_path} . Variables, library analytics, and org activity endpoints require an Enterprise Figma plan. See
https://developers.figma.com/docs/rest-api/ for full reference. The endpoints below are curated examples.
Endpoints
Get the authenticated Figma user
GET https://api.figma.com/v1/me — Free
const data = await lava . gateway ( 'https://api.figma.com/v1/me' , { method: 'GET' });
curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.figma.com%2Fv1%2Fme" \
-H "Authorization: Bearer $LAVA_SECRET_KEY "
Fetch the full document tree JSON for a Figma file
GET https://api.figma.com/v1/files/{file_key} — Free
const data = await lava . gateway ( 'https://api.figma.com/v1/files/{file_key}' , { method: 'GET' });
curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.figma.com%2Fv1%2Ffiles%2F%7Bfile_key%7D" \
-H "Authorization: Bearer $LAVA_SECRET_KEY "
Fetch specific nodes of a file by id
GET https://api.figma.com/v1/files/{file_key}/nodes?ids=1:2,1:3 — Free
const data = await lava . gateway ( 'https://api.figma.com/v1/files/{file_key}/nodes?ids=1:2,1:3' , { method: 'GET' });
curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.figma.com%2Fv1%2Ffiles%2F%7Bfile_key%7D%2Fnodes%3Fids%3D1%3A2%2C1%3A3" \
-H "Authorization: Bearer $LAVA_SECRET_KEY "
Render file nodes as PNG/SVG/JPG/PDF; returns URLs hosted by Figma
GET https://api.figma.com/v1/images/{file_key}?ids=1:2&format=png — Free
const data = await lava . gateway ( 'https://api.figma.com/v1/images/{file_key}?ids=1:2&format=png' , { method: 'GET' });
curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.figma.com%2Fv1%2Fimages%2F%7Bfile_key%7D%3Fids%3D1%3A2%26format%3Dpng" \
-H "Authorization: Bearer $LAVA_SECRET_KEY "
GET https://api.figma.com/v1/files/{file_key}/comments — Free
const data = await lava . gateway ( 'https://api.figma.com/v1/files/{file_key}/comments' , { method: 'GET' });
curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.figma.com%2Fv1%2Ffiles%2F%7Bfile_key%7D%2Fcomments" \
-H "Authorization: Bearer $LAVA_SECRET_KEY "
POST https://api.figma.com/v1/files/{file_key}/comments — Free
const data = await lava . gateway ( 'https://api.figma.com/v1/files/{file_key}/comments' , { body: { "message" : "Ship blocker — hero CTA mis-aligned on mobile." } });
curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.figma.com%2Fv1%2Ffiles%2F%7Bfile_key%7D%2Fcomments" \
-H "Authorization: Bearer $LAVA_SECRET_KEY " \
-H "Content-Type: application/json" \
-d '{"message":"Ship blocker — hero CTA mis-aligned on mobile."}'
List published components in a team library
GET https://api.figma.com/v1/teams/{team_id}/components — Free
const data = await lava . gateway ( 'https://api.figma.com/v1/teams/{team_id}/components' , { method: 'GET' });
curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.figma.com%2Fv1%2Fteams%2F%7Bteam_id%7D%2Fcomponents" \
-H "Authorization: Bearer $LAVA_SECRET_KEY "
List projects within a team
GET https://api.figma.com/v1/teams/{team_id}/projects — Free
const data = await lava . gateway ( 'https://api.figma.com/v1/teams/{team_id}/projects' , { method: 'GET' });
curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.figma.com%2Fv1%2Fteams%2F%7Bteam_id%7D%2Fprojects" \
-H "Authorization: Bearer $LAVA_SECRET_KEY "
Attach external dev resource links (URLs) to nodes in a file for Dev Mode
POST https://api.figma.com/v1/dev_resources — Free
const data = await lava . gateway ( 'https://api.figma.com/v1/dev_resources' , {
body: {
"dev_resources" : [
{
"name" : "Storybook — Button" ,
"url" : "https://storybook.example.com/?path=/story/button" ,
"file_key" : "{file_key}" ,
"node_id" : "1:2"
}
]
},
});
curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.figma.com%2Fv1%2Fdev_resources" \
-H "Authorization: Bearer $LAVA_SECRET_KEY " \
-H "Content-Type: application/json" \
-d '{"dev_resources":[{"name":"Storybook — Button","url":"https://storybook.example.com/?path=/story/button","file_key":"{file_key}","node_id":"1:2"}]}'
Create a v2 webhook subscription for file or team events; Figma delivers events to the endpoint URL
POST https://api.figma.com/v2/webhooks — Free
const data = await lava . gateway ( 'https://api.figma.com/v2/webhooks' , {
body: {
"event_type" : "FILE_UPDATE" ,
"team_id" : "{team_id}" ,
"endpoint" : "https://example.com/figma-webhook" ,
"passcode" : "shared-secret-for-verification" ,
"description" : "File updates to design-system library"
},
});
curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.figma.com%2Fv2%2Fwebhooks" \
-H "Authorization: Bearer $LAVA_SECRET_KEY " \
-H "Content-Type: application/json" \
-d '{"event_type":"FILE_UPDATE","team_id":"{team_id}","endpoint":"https://example.com/figma-webhook","passcode":"shared-secret-for-verification","description":"File updates to design-system library"}'
Update one or more existing dev resources by id
PUT https://api.figma.com/v1/dev_resources — Free
const data = await lava . gateway ( 'https://api.figma.com/v1/dev_resources' , {
method: 'PUT' ,
body: {
"dev_resources" : [
{
"id" : "{dev_resource_id}" ,
"name" : "Storybook — Button (v2)" ,
"url" : "https://storybook.example.com/?path=/story/button-v2"
}
]
},
});
curl -X PUT "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.figma.com%2Fv1%2Fdev_resources" \
-H "Authorization: Bearer $LAVA_SECRET_KEY " \
-H "Content-Type: application/json" \
-d '{"dev_resources":[{"id":"{dev_resource_id}","name":"Storybook — Button (v2)","url":"https://storybook.example.com/?path=/story/button-v2"}]}'
Delete a v2 webhook subscription by id
DELETE https://api.figma.com/v2/webhooks/{webhook_id} — Free
const data = await lava . gateway ( 'https://api.figma.com/v2/webhooks/{webhook_id}' , { method: 'DELETE' });
curl -X DELETE "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.figma.com%2Fv2%2Fwebhooks%2F%7Bwebhook_id%7D" \
-H "Authorization: Bearer $LAVA_SECRET_KEY " \
-H "Content-Type: application/json"
DELETE https://api.figma.com/v1/files/{file_key}/comments/{comment_id} — Free
const data = await lava . gateway ( 'https://api.figma.com/v1/files/{file_key}/comments/{comment_id}' , { method: 'DELETE' });
curl -X DELETE "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.figma.com%2Fv1%2Ffiles%2F%7Bfile_key%7D%2Fcomments%2F%7Bcomment_id%7D" \
-H "Authorization: Bearer $LAVA_SECRET_KEY " \
-H "Content-Type: application/json"
Next Steps
All Providers Browse all supported AI providers
Forward Proxy Learn how to construct proxy URLs and authenticate requests