# @figma/rest-api-spec

> Typings for the Figma REST API

Latest version **0.42.0** (published 2026-08-11) · MIT License license · 0 weekly downloads

## Install

```sh
npm install @figma/rest-api-spec
pnpm add @figma/rest-api-spec
yarn add @figma/rest-api-spec
bun add @figma/rest-api-spec
```

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.42.0 |
| Published | 2026-08-11 |
| First published | 2024-02-02 |
| Weekly downloads | 0 |
| License | MIT License |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 219 |
| Author | Figma |
| Maintainers | ehasama-figma, brandonchung-figma, efrankenberg, iturner, spark.fig, ahurtado-figma, sakatam-figma, figbonicus, fszeto-figma, agarbutt-figma |
| Keywords | figma, REST, typings |

## Links

- npm: https://www.npmjs.com/package/@figma/rest-api-spec
- Repository: https://github.com/figma/rest-api-spec
- Issues: https://github.com/figma/rest-api-spec/issues
- npm.io page: https://npm.io/package/@figma/rest-api-spec

## Recent versions

- 0.42.0 (latest) — 2026-08-11
- 0.41.0 — 2026-07-01
- 0.40.0 — 2026-06-02
- 0.39.0 — 2026-05-22
- 0.38.0 — 2026-05-06
- 0.37.0 — 2026-03-30
- 0.36.0 — 2026-01-21
- 0.35.0 — 2025-12-17
- 0.34.0 — 2025-09-29
- 0.33.0 — 2025-07-08
- 0.32.0 — 2025-06-25
- 0.31.0 — 2025-05-28
- 0.30.0 — 2025-05-07
- 0.29.0 — 2025-04-24
- 0.28.0 — 2025-04-17
- … 18 more at https://npm.io/package/@figma/rest-api-spec/versions

## README

# rest-api-spec

This repository contains the OpenAPI specification and Typescript types for the [Figma REST API](https://www.figma.com/developers/api).

[Changelog](https://www.figma.com/developers/api#changelog)

Note: this specification is currently in beta. If you notice any inaccuracies with the specification, please [file an issue](https://github.com/figma/rest-api-spec/issues) in this repository.

## Usage

The OpenAPI (v3.1.0) specification is located in the `openapi/` directory. This specification can be used with a [wide variety of tools](https://tools.openapis.org/) to generate API documentation, client SDKs, and more.

The Typescript types are generated from the OpenAPI specification and are located in `dist/`.

We use a custom code generator to convert the OpenAPI spec to TypeScript. While there are a number of existing OpenAPI-to-Typescript code generators, we adopted a custom solution that produces output that we believe is more optimal for the Figma REST API. In particular:

- All OpenAPI schemas, responses, and request parameters are exported as named types. This exposes named types inside complex node properties (e.g. `Paint`, `VariableAlias`, etc...).
- Types directly associated with API endpoints are prefixed with the OpenAPI operation ID (e.g. `getFile` -> `GetFilePathParams`, `GetFileQueryParams`, `GetFileResponse`). For API endpoints expecting a request body, the types are suffixed with `RequestBody` (e.g. `postComments` -> `PostCommentsRequestBody`).

To use these types in your Typescript code, install the package:

```sh
npm install --save-dev @figma/rest-api-spec
```

Then import the types that you need:

```ts
import { type GetFileResponse } from '@figma/rest-api-spec'

// Many popular HTTP clients let you annotate response types
const result = await axios.get<GetFileResponse>(url);
result.data // This has type GetFileResponse
```

---
_Source: https://npm.io/package/@figma/rest-api-spec · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
