feat: full Figma REST API coverage (46/46 endpoints)#1
Merged
alexey1312 merged 3 commits intomainfrom Mar 16, 2026
Merged
Conversation
Add 38 new endpoints covering the complete Figma REST API v0.36.0: - User: GET /me - Files: HEAD /files/:key, GET /files/:key/images, GET /files/:key/versions, GET /files/:key/variables/published - Comments: GET/POST/DELETE /files/:key/comments - Components: GET /components/:key, GET /teams/:id/components - Component Sets: GET /component_sets/:key, GET /files/:key/component_sets, GET /teams/:id/component_sets - Styles: GET /styles/:key, GET /teams/:id/styles - Projects: GET /teams/:id/projects, GET /projects/:id/files - Reactions: GET/POST/DELETE /files/:key/comments/:id/reactions - Dev Resources: GET/POST/PUT/DELETE /files/:key/dev_resources - Webhooks (v2): GET/POST/PUT/DELETE /v2/webhooks, GET /v2/teams/:id/webhooks, GET /v2/webhooks/:id/requests - Analytics: activity_logs, payments, library component/style/variable actions and usages Refactor baseURL from https://api.figma.com/v1/ to https://api.figma.com/ so endpoints can target both v1 and v2 paths. This is an internal change with no impact on the public API. Add PaginationParams for cursor-based team endpoints, EmptyResponse for DELETE operations, and 22 new JSON fixtures with 290 total test cases.
- Fix DELETE endpoints crashing on empty 204 No Content responses by adding explicit content(from:with:) that handles empty body - Fix POST/PUT dev_resources to use correct path /v1/dev_resources with batch request/response wrapping (dev_resources/links_created/links_updated) - Fix PostDevResourceBody to include required file_key field per spec - Fix PutDevResourceBody to match spec (remove dev_status, keep id/name/url) - Fix GetPaymentsEndpoint to use query params per spec instead of path params - Fix GetWebhooksEndpoint to use query params (context, context_id) per spec - Fix GetActivityLogsEndpoint to use correct query filters per spec - Fix GetFileMetaEndpointTests for Linux FoundationNetworking compatibility - Remove incorrect @available deprecation from GetTeamWebhooksEndpoint - Add pageSize validation precondition to PaginationParams - Narrow Codable to Decodable for read-only models (Webhook, DevResource, FileVersion, ComponentSet, User)
Prevents downstream clients (e.g. ExFig) from hardcoding the base URL in their mock clients, which would silently break when the URL format changes (as it did when moving version prefix into individual endpoints).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
baseURLfromhttps://api.figma.com/v1/tohttps://api.figma.com/to support both v1 and v2 API paths (no public API change)Endpoints added by category
/me/files/:key(HEAD),/files/:key/images,/files/:key/versions,/files/:key/variables/published/files/:key/comments/components/:key,/teams/:id/components/component_sets/:key,/files/:key/component_sets,/teams/:id/component_sets/styles/:key,/teams/:id/styles/teams/:id/projects,/projects/:id/files/files/:key/comments/:id/reactions/files/:key/dev_resources/v2/webhooks,/v2/webhooks/:id,/v2/teams/:id/webhooks,/v2/webhooks/:id/requestsactivity_logs,payments, library component/style/variable actions & usagesNew patterns introduced
GetFileMetaEndpoint) — extracts metadata from HTTP response headersPaginationParams) — for team-level list endpoints/v2/prefix while all other endpoints use/v1/Test plan
swift buildcompiles without errorsswift test— all 290 test cases pass (0 failures)Sendable