Skip to main content
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' });

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' });

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' });

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' });

List all comments on a file

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' });

Post a new comment on a file

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."} });

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' });

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' });
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"
  }
]
},
});

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"
},
});

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"
  }
]
},
});

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' });

Delete a comment from a file (author only)

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' });

Next Steps

All Providers

Browse all supported AI providers

Forward Proxy

Learn how to construct proxy URLs and authenticate requests