Skip to main content
Every figma.api.* operation is listed below with parameter shapes and return types from the plugin Zod schemas.
New to Corsair? See API access, authentication, and error handling.

Activity Logs

list

activityLogs.list List Figma organization activity logs Risk: read
await corsair.figma.api.activityLogs.list({});
Input
NameTypeRequiredDescription
start_timenumberNo
end_timenumberNo
limitnumberNo
orderstringNo
eventsstringNo
Output
NameTypeRequiredDescription
activity_logsany[]No
cursorstringNo
next_pagebooleanNo

Comments

add

comments.add Add a comment to a Figma file Risk: write
await corsair.figma.api.comments.add({});
Input
NameTypeRequiredDescription
messagestringYes
file_keystringYes
comment_idstringNo
client_metaanyNo
Output
NameTypeRequiredDescription
idstringYes
uuidstringNo
messagestringNo
file_keystringNo
order_idstringNo
parent_idstringNo
reactionsobject[]No
created_atstringNo
client_metaanyNo
resolved_atstringNo
userobjectNo
{
  user?: {
    id: string,
    handle?: string,
    img_url?: string
  },
  emoji?: string,
  created_at?: string
}[]
{
  id: string,
  handle?: string,
  img_url?: string
}

addReaction

comments.addReaction Add a reaction to a comment Risk: write
await corsair.figma.api.comments.addReaction({});
Input
NameTypeRequiredDescription
file_keystringYes
comment_idstringYes
emojistringYes
Output
NameTypeRequiredDescription
statusnumberNo
errorbooleanNo

delete

comments.delete Delete a comment from a Figma file [DESTRUCTIVE] Risk: destructive
await corsair.figma.api.comments.delete({});
Input
NameTypeRequiredDescription
file_keystringYes
comment_idstringYes
Output
NameTypeRequiredDescription
statusnumberNo
errorbooleanNo

deleteReaction

comments.deleteReaction Delete a reaction from a comment Risk: write
await corsair.figma.api.comments.deleteReaction({});
Input
NameTypeRequiredDescription
file_keystringYes
comment_idstringYes
emojistringYes
Output
NameTypeRequiredDescription
statusnumberNo
errorbooleanNo

getReactions

comments.getReactions Get reactions on a comment Risk: read
await corsair.figma.api.comments.getReactions({});
Input
NameTypeRequiredDescription
file_keystringYes
comment_idstringYes
cursorstringNo
Output
NameTypeRequiredDescription
reactionsobject[]No
paginationobjectNo
{
  user?: {
    id: string,
    handle?: string,
    img_url?: string
  },
  emoji?: string,
  created_at?: string
}[]
{
  cursor?: string
}

list

comments.list List comments on a Figma file Risk: read
await corsair.figma.api.comments.list({});
Input
NameTypeRequiredDescription
file_keystringYes
as_mdbooleanNo
Output
NameTypeRequiredDescription
commentsobject[]No
{
  id: string,
  uuid?: string | null,
  message?: string,
  file_key?: string,
  order_id?: string | null,
  parent_id?: string | null,
  reactions?: {
    user?: {
      id: string,
      handle?: string,
      img_url?: string
    },
    emoji?: string,
    created_at?: string
  }[],
  created_at?: string,
  client_meta?: any,
  resolved_at?: string | null,
  user?: {
    id: string,
    handle?: string,
    img_url?: string
  }
}[]

Components

get

components.get Get a Figma component by key Risk: read
await corsair.figma.api.components.get({});
Input
NameTypeRequiredDescription
keystringYes
Output
NameTypeRequiredDescription
metaobjectNo
statusnumberNo
{
  component?: {
    key: string,
    file_key?: string,
    node_id?: string,
    thumbnail_url?: string,
    name?: string,
    description?: string,
    created_at?: string,
    updated_at?: string,
    containing_frame?: {
      name?: string,
      node_id?: string
    },
    user?: {
      id: string,
      handle?: string,
      img_url?: string
    }
  }
}

getComponentSet

components.getComponentSet Get a Figma component set by key Risk: read
await corsair.figma.api.components.getComponentSet({});
Input
NameTypeRequiredDescription
keystringYes
Output
NameTypeRequiredDescription
metaobjectNo
statusnumberNo
{
  component_set?: {
    key: string,
    name?: string,
    description?: string,
    thumbnail_url?: string
  }
}

getComponentSetsForFile

components.getComponentSetsForFile Get all component sets in a Figma file Risk: read
await corsair.figma.api.components.getComponentSetsForFile({});
Input
NameTypeRequiredDescription
file_keystringYes
Output
NameTypeRequiredDescription
metaobjectNo
{
  component_sets?: {
    key: string,
    name?: string
  }[]
}

getComponentSetsForTeam

components.getComponentSetsForTeam Get all component sets for a Figma team Risk: read
await corsair.figma.api.components.getComponentSetsForTeam({});
Input
NameTypeRequiredDescription
team_idstringYes
page_sizenumberNo
afternumberNo
beforenumberNo
Output
NameTypeRequiredDescription
metaobjectNo
cursorstringNo
{
  component_sets?: {
    key: string,
    name?: string
  }[]
}

getForFile

components.getForFile Get all components in a Figma file Risk: read
await corsair.figma.api.components.getForFile({});
Input
NameTypeRequiredDescription
file_keystringYes
Output
NameTypeRequiredDescription
metaobjectNo
statusnumberNo
{
  components?: {
    key: string,
    file_key?: string,
    node_id?: string,
    thumbnail_url?: string,
    name?: string,
    description?: string,
    created_at?: string,
    updated_at?: string,
    containing_frame?: {
      name?: string,
      node_id?: string
    },
    user?: {
      id: string,
      handle?: string,
      img_url?: string
    }
  }[]
}

getForTeam

components.getForTeam Get all components for a Figma team Risk: read
await corsair.figma.api.components.getForTeam({});
Input
NameTypeRequiredDescription
team_idstringYes
page_sizenumberNo
afternumberNo
beforenumberNo
Output
NameTypeRequiredDescription
metaobjectNo
cursorstringNo
{
  components?: {
    key: string,
    file_key?: string,
    node_id?: string,
    thumbnail_url?: string,
    name?: string,
    description?: string,
    created_at?: string,
    updated_at?: string,
    containing_frame?: {
      name?: string,
      node_id?: string
    },
    user?: {
      id: string,
      handle?: string,
      img_url?: string
    }
  }[]
}

Design Tools

designTokensToTailwind

designTools.designTokensToTailwind Convert Figma design tokens to a Tailwind CSS configuration Risk: read
await corsair.figma.api.designTools.designTokensToTailwind({});
Input
NameTypeRequiredDescription
tokensobjectYes
prefixstringNo
config_formatstringNo
include_font_importsbooleanNo
{
}
Output
NameTypeRequiredDescription
configstringNo
cssstringNo

discoverResources

designTools.discoverResources Discover Figma files, projects, and teams Risk: read
await corsair.figma.api.designTools.discoverResources({});
Input
NameTypeRequiredDescription
figma_urlstringNo
file_keystringNo
team_idstringNo
project_idstringNo
max_depthnumberNo
Output
NameTypeRequiredDescription
filesany[]No
projectsany[]No
teamsany[]No

downloadImages

designTools.downloadImages Download rendered images for Figma nodes Risk: read
await corsair.figma.api.designTools.downloadImages({});
Input
NameTypeRequiredDescription
file_keystringYes
imagesobject[]Yes
scalenumberNo
svg_include_idbooleanNo
svg_outline_textbooleanNo
svg_simplify_strokebooleanNo
{
  node_id: string
}[]
Output
NameTypeRequiredDescription
imagesobjectNo
{
}

extractDesignTokens

designTools.extractDesignTokens Extract design tokens (variables and styles) from a Figma file Risk: read
await corsair.figma.api.designTools.extractDesignTokens({});
Input
NameTypeRequiredDescription
file_keystringYes
include_variablesbooleanNo
include_local_stylesbooleanNo
extract_from_nodesstringNo
Output
NameTypeRequiredDescription
tokensobjectNo
{
}

extractPrototypeInteractions

designTools.extractPrototypeInteractions Extract prototype interactions and flows from a Figma file Risk: read
await corsair.figma.api.designTools.extractPrototypeInteractions({});
Input
NameTypeRequiredDescription
file_keystringYes
analyze_componentsbooleanNo
include_animationsbooleanNo
Output
NameTypeRequiredDescription
interactionsany[]No
flowsany[]No

Dev Resources

create

devResources.create Create dev resources on a Figma file Risk: write
await corsair.figma.api.devResources.create({});
Input
NameTypeRequiredDescription
dev_resourcesobject[]Yes
{
  url: string,
  name: string,
  node_id: string,
  file_key: string
}[]
Output
NameTypeRequiredDescription
links_createdobject[]No
errorsobject[]No
{
  error: string,
  node_id?: string,
  file_key?: string
}[]

delete

devResources.delete Delete a dev resource from a Figma file [DESTRUCTIVE] Risk: destructive
await corsair.figma.api.devResources.delete({});
Input
NameTypeRequiredDescription
file_keystringYes
dev_resource_idstringYes
Output: empty object

get

devResources.get Get dev resources for a Figma file Risk: read
await corsair.figma.api.devResources.get({});
Input
NameTypeRequiredDescription
file_keystringYes
node_idsstringNo
Output
NameTypeRequiredDescription
dev_resourcesobject[]No
{
  id: string,
  url: string,
  name: string,
  node_id: string,
  file_key: string
}[]

update

devResources.update Update dev resources on a Figma file Risk: write
await corsair.figma.api.devResources.update({});
Input
NameTypeRequiredDescription
dev_resourcesobject[]Yes
{
  id: string,
  url?: string,
  name?: string
}[]
Output
NameTypeRequiredDescription
links_updatedobject[]No
errorsobject[]No
{
  error: string,
  dev_resource_id?: string
}[]

Files

getImageFills

files.getImageFills Get image fills from a Figma file Risk: read
await corsair.figma.api.files.getImageFills({});
Input
NameTypeRequiredDescription
file_keystringYes
Output
NameTypeRequiredDescription
metaobjectNo
errorbooleanNo
{
  images?: {
  }
}

getJSON

files.getJSON Get full Figma file JSON Risk: read
await corsair.figma.api.files.getJSON({});
Input
NameTypeRequiredDescription
file_keystringYes
versionstringNo
idsstringNo
depthnumberNo
geometrystringNo
plugin_datastringNo
branch_databooleanNo
simplifybooleanNo
include_rawbooleanNo
Output
NameTypeRequiredDescription
namestringNo
rolestringNo
lastModifiedstringNo
editorTypestringNo
thumbnailUrlstringNo
versionstringNo
documentanyNo
componentsobjectNo
stylesobjectNo
{
}
{
}

getMetadata

files.getMetadata Get Figma file metadata Risk: read
await corsair.figma.api.files.getMetadata({});
Input
NameTypeRequiredDescription
file_keystringYes
Output
NameTypeRequiredDescription
namestringNo
rolestringNo
last_modifiedstringNo
editorTypestringNo
thumbnail_urlstringNo
versionstringNo

getNodes

files.getNodes Get specific nodes from a Figma file Risk: read
await corsair.figma.api.files.getNodes({});
Input
NameTypeRequiredDescription
file_keystringYes
idsstringYes
versionstringNo
depthnumberNo
geometrystringNo
plugin_datastringNo
Output
NameTypeRequiredDescription
namestringNo
nodesobjectNo
{
}

getProjectFiles

files.getProjectFiles Get all files in a Figma project Risk: read
await corsair.figma.api.files.getProjectFiles({});
Input
NameTypeRequiredDescription
project_idstringYes
branch_databooleanNo
Output
NameTypeRequiredDescription
namestringNo
filesobject[]No
{
  key: string,
  name?: string,
  thumbnail_url?: string | null,
  last_modified?: string
}[]

getStyles

files.getStyles Get styles from a Figma file Risk: read
await corsair.figma.api.files.getStyles({});
Input
NameTypeRequiredDescription
file_keystringYes
Output
NameTypeRequiredDescription
metaobjectNo
{
  styles?: {
    key: string,
    file_key?: string,
    node_id?: string,
    style_type?: string,
    name?: string,
    description?: string
  }[]
}

getVersions

files.getVersions Get version history of a Figma file Risk: read
await corsair.figma.api.files.getVersions({});
Input
NameTypeRequiredDescription
file_keystringYes
page_sizenumberNo
beforenumberNo
afternumberNo
Output
NameTypeRequiredDescription
versionsobject[]No
paginationobjectNo
{
  id: string,
  created_at?: string,
  label?: string | null,
  description?: string | null,
  user?: {
    id: string,
    handle?: string,
    img_url?: string
  }
}[]
{
  cursor?: string
}

renderImages

files.renderImages Render Figma nodes as images Risk: read
await corsair.figma.api.files.renderImages({});
Input
NameTypeRequiredDescription
file_keystringYes
idsstringYes
scalenumberNo
formatjpg | png | svg | pdfNo
versionstringNo
contents_onlybooleanNo
svg_include_idbooleanNo
svg_outline_textbooleanNo
svg_include_node_idbooleanNo
svg_simplify_strokebooleanNo
use_absolute_boundsbooleanNo
Output
NameTypeRequiredDescription
imagesobjectNo
errstringNo
{
}

Library Analytics

componentActions

libraryAnalytics.componentActions Get library component action analytics Risk: read
await corsair.figma.api.libraryAnalytics.componentActions({});
Input
NameTypeRequiredDescription
file_keystringYes
start_datestringNo
end_datestringNo
group_bystringNo
cursorstringNo
Output
NameTypeRequiredDescription
rowsany[]No
cursorstringNo
next_pagebooleanNo

componentUsages

libraryAnalytics.componentUsages Get library component usage analytics Risk: read
await corsair.figma.api.libraryAnalytics.componentUsages({});
Input
NameTypeRequiredDescription
file_keystringYes
group_bystringNo
cursorstringNo
Output
NameTypeRequiredDescription
rowsany[]No
cursorstringNo
next_pagebooleanNo

styleActions

libraryAnalytics.styleActions Get library style action analytics Risk: read
await corsair.figma.api.libraryAnalytics.styleActions({});
Input
NameTypeRequiredDescription
file_keystringYes
start_datestringNo
end_datestringNo
group_bystringNo
cursorstringNo
Output
NameTypeRequiredDescription
rowsany[]No
cursorstringNo
next_pagebooleanNo

styleUsages

libraryAnalytics.styleUsages Get library style usage analytics Risk: read
await corsair.figma.api.libraryAnalytics.styleUsages({});
Input
NameTypeRequiredDescription
file_keystringYes
group_bystringNo
cursorstringNo
Output
NameTypeRequiredDescription
rowsany[]No
cursorstringNo
next_pagebooleanNo

variableActions

libraryAnalytics.variableActions Get library variable action analytics Risk: read
await corsair.figma.api.libraryAnalytics.variableActions({});
Input
NameTypeRequiredDescription
file_keystringYes
start_datestringNo
end_datestringNo
group_bystringNo
cursorstringNo
Output
NameTypeRequiredDescription
rowsany[]No
cursorstringNo
next_pagebooleanNo

variableUsages

libraryAnalytics.variableUsages Get library variable usage analytics Risk: read
await corsair.figma.api.libraryAnalytics.variableUsages({});
Input
NameTypeRequiredDescription
file_keystringYes
group_bystringNo
cursorstringNo
Output
NameTypeRequiredDescription
rowsany[]No
cursorstringNo
next_pagebooleanNo

Payments

get

payments.get Get payment information for a Figma plugin or widget Risk: read
await corsair.figma.api.payments.get({});
Input
NameTypeRequiredDescription
user_idstringNo
plugin_idstringNo
widget_idstringNo
community_file_idstringNo
plugin_payment_tokenstringNo
Output
NameTypeRequiredDescription
metaobjectNo
statusnumberNo
{
  payment_information?: any
}

Projects

getTeamProjects

projects.getTeamProjects Get all projects for a Figma team Risk: read
await corsair.figma.api.projects.getTeamProjects({});
Input
NameTypeRequiredDescription
team_idstringYes
Output
NameTypeRequiredDescription
namestringNo
projectsobject[]No
{
  id: string,
  name?: string
}[]

Styles

get

styles.get Get a Figma style by key Risk: read
await corsair.figma.api.styles.get({});
Input
NameTypeRequiredDescription
keystringYes
Output
NameTypeRequiredDescription
metaobjectNo
{
  style?: {
    key: string,
    file_key?: string,
    node_id?: string,
    style_type?: string,
    name?: string,
    description?: string
  }
}

getForTeam

styles.getForTeam Get all styles for a Figma team Risk: read
await corsair.figma.api.styles.getForTeam({});
Input
NameTypeRequiredDescription
team_idstringYes
page_sizenumberNo
afternumberNo
beforenumberNo
Output
NameTypeRequiredDescription
metaobjectNo
{
  styles?: {
    key: string,
    name?: string,
    style_type?: string
  }[]
}

Users

getCurrent

users.getCurrent Get the currently authenticated Figma user Risk: read
await corsair.figma.api.users.getCurrent({});
Input: empty object Output
NameTypeRequiredDescription
idstringYes
handlestringNo
img_urlstringNo
emailstringNo

Variables

createModifyDelete

variables.createModifyDelete Create, modify, or delete variables in a Figma file Risk: write
await corsair.figma.api.variables.createModifyDelete({});
Input
NameTypeRequiredDescription
file_keystringYes
variablesany[]No
variableModesany[]No
variableModeValuesany[]No
variableCollectionsany[]No
Output
NameTypeRequiredDescription
metaobjectNo
statusnumberNo
errorbooleanNo
{
  tempIdToRealId?: {
  }
}

getLocal

variables.getLocal Get local variables from a Figma file Risk: read
await corsair.figma.api.variables.getLocal({});
Input
NameTypeRequiredDescription
file_keystringYes
Output
NameTypeRequiredDescription
metaobjectNo
statusnumberNo
errorbooleanNo
{
  variables?: {
  },
  variableCollections?: {
  }
}

getPublished

variables.getPublished Get published variables from a Figma file Risk: read
await corsair.figma.api.variables.getPublished({});
Input
NameTypeRequiredDescription
file_keystringYes
Output
NameTypeRequiredDescription
metaobjectNo
statusnumberNo
errorbooleanNo
{
  variables?: {
  },
  variableCollections?: {
  }
}

Webhooks

create

webhooks.create Create a Figma webhook Risk: write
await corsair.figma.api.webhooks.create({});
Input
NameTypeRequiredDescription
event_typestringYes
endpointstringYes
passcodestringYes
statusACTIVE | PAUSEDNo
contextstringNo
context_idstringNo
team_idstringNo
descriptionstringNo
Output
NameTypeRequiredDescription
idstringYes
statusACTIVE | PAUSEDNo
contextteam | project | fileNo
team_idstringNo
endpointstringNo
passcodestringNo
client_idstringNo
context_idstringNo
event_typestringNo
descriptionstringNo

delete

webhooks.delete Delete a Figma webhook [DESTRUCTIVE] Risk: destructive
await corsair.figma.api.webhooks.delete({});
Input
NameTypeRequiredDescription
webhook_idstringYes
Output
NameTypeRequiredDescription
idstringNo
statusACTIVE | PAUSEDNo
contextteam | project | fileNo
team_idstringNo
endpointstringNo
passcodestringNo
client_idstringNo
context_idstringNo
event_typestringNo
descriptionstringNo

get

webhooks.get Get a Figma webhook by ID Risk: read
await corsair.figma.api.webhooks.get({});
Input
NameTypeRequiredDescription
webhook_idstringYes
Output
NameTypeRequiredDescription
idstringYes
statusACTIVE | PAUSEDNo
contextteam | project | fileNo
team_idstringNo
endpointstringNo
passcodestringNo
client_idstringNo
context_idstringNo
event_typestringNo
descriptionstringNo

getRequests

webhooks.getRequests Get webhook request history Risk: read
await corsair.figma.api.webhooks.getRequests({});
Input
NameTypeRequiredDescription
webhook_idstringYes
Output
NameTypeRequiredDescription
requestsobject[]No
{
  id: string,
  webhook_id: string,
  status?: string,
  created_at?: string,
  error?: {
  }
}[]

list

webhooks.list List Figma webhooks Risk: read
await corsair.figma.api.webhooks.list({});
Input
NameTypeRequiredDescription
contextstringNo
context_idstringNo
Output
NameTypeRequiredDescription
webhooksobject[]No
{
  id: string,
  status?: ACTIVE | PAUSED,
  context?: team | project | file | null,
  team_id?: string | null,
  endpoint?: string,
  passcode?: string,
  client_id?: string | null,
  context_id?: string | null,
  event_type?: string,
  description?: string | null
}[]

update

webhooks.update Update a Figma webhook Risk: write
await corsair.figma.api.webhooks.update({});
Input
NameTypeRequiredDescription
webhook_idstringYes
event_typestringNo
endpointstringNo
passcodestringNo
statusACTIVE | PAUSEDNo
descriptionstringNo
Output
NameTypeRequiredDescription
idstringYes
statusACTIVE | PAUSEDNo
contextteam | project | fileNo
team_idstringNo
endpointstringNo
passcodestringNo
client_idstringNo
context_idstringNo
event_typestringNo
descriptionstringNo