{"id":14981499,"url":"https://github.com/figma/rest-api-spec","last_synced_at":"2025-04-12T19:41:27.576Z","repository":{"id":220551194,"uuid":"731779242","full_name":"figma/rest-api-spec","owner":"figma","description":"OpenAPI specification and types for the Figma REST API","archived":false,"fork":false,"pushed_at":"2024-10-25T20:47:03.000Z","size":132,"stargazers_count":65,"open_issues_count":0,"forks_count":11,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-10-29T15:13:43.356Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.figma.com/developers/api","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/figma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-14T21:27:57.000Z","updated_at":"2024-10-29T12:04:25.000Z","dependencies_parsed_at":"2024-09-27T01:25:10.419Z","dependency_job_id":"fbd13b9e-9cb1-4415-86c4-aab6918acb91","html_url":"https://github.com/figma/rest-api-spec","commit_stats":{"total_commits":30,"total_committers":11,"mean_commits":2.727272727272727,"dds":0.8,"last_synced_commit":"c81da97143759e011c24f1740ded663ff057ecd0"},"previous_names":["figma/rest-api-spec"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/figma%2Frest-api-spec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/figma%2Frest-api-spec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/figma%2Frest-api-spec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/figma%2Frest-api-spec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/figma","download_url":"https://codeload.github.com/figma/rest-api-spec/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248624958,"owners_count":21135509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T14:03:43.520Z","updated_at":"2025-04-12T19:41:27.552Z","avatar_url":"https://github.com/figma.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# rest-api-spec\n\nThis repository contains the OpenAPI specification and Typescript types for the [Figma REST API](https://www.figma.com/developers/api).\n\n[Changelog](https://www.figma.com/developers/api#changelog)\n\nNote: 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.\n\n## Usage\n\nThe 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.\n\nThe Typescript types are generated from the OpenAPI specification and are located in `dist/`.\n\nWe 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:\n\n- 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...).\n- Types directly associated with API endpoints are prefixed with the OpenAPI operation ID (e.g. `getFile` -\u003e `GetFilePathParams`, `GetFileQueryParams`, `GetFileResponse`). For API endpoints expecting a request body, the types are suffixed with `RequestBody` (e.g. `postComments` -\u003e `PostCommentsRequestBody`).\n\nTo use these types in your Typescript code, install the package:\n\n```sh\nnpm install --save-dev @figma/rest-api-spec\n```\n\nThen import the types that you need:\n\n```ts\nimport { type GetFileResponse } from '@figma/rest-api-spec'\n\n// Many popular HTTP clients let you annotate response types\nconst result = await axios.get\u003cGetFileResponse\u003e(url);\nresult.data // This has type GetFileResponse\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffigma%2Frest-api-spec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffigma%2Frest-api-spec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffigma%2Frest-api-spec/lists"}