UNPKG

@figma/rest-api-spec

Version:
1,273 lines (1,253 loc) 360 kB
openapi: 3.1.0 info: title: Figma API version: 0.33.0 description: |- This is the OpenAPI specification for the [Figma REST API](https://www.figma.com/developers/api). Note: we are releasing the OpenAPI specification as a beta given the large surface area and complexity of the REST API. If you notice any inaccuracies with the specification, please [file an issue](https://github.com/figma/rest-api-spec/issues). termsOfService: https://www.figma.com/developer-terms/ contact: email: support@figma.com servers: - url: https://api.figma.com externalDocs: description: Figma REST API Documentation url: https://www.figma.com/developers/api tags: - name: Files description: Get file JSON, images, and other file-related content. externalDocs: description: File endpoints documentation url: https://www.figma.com/developers/api#files - name: Comments description: Interact with file comments. externalDocs: description: Comment endpoints documentation url: https://www.figma.com/developers/api#comments - name: Comment Reactions description: Interact with reactions to file comments. externalDocs: description: Comment endpoints documentation url: https://www.figma.com/developers/api#comments - name: Projects description: Get information about projects and files in teams. externalDocs: description: Project endpoints documentation url: https://www.figma.com/developers/api#projects - name: Users description: Get information about the currently authenticated user. externalDocs: description: User endpoints documentation url: https://www.figma.com/developers/api#users - name: Components description: Get information about published components. externalDocs: description: Component and style endpoints documentation url: https://www.figma.com/developers/api#library-items - name: Component Sets description: Get information about published component sets. externalDocs: description: Component and style endpoints documentation url: https://www.figma.com/developers/api#library-items - name: Styles description: Get information about published styles. externalDocs: description: Component and style endpoints documentation url: https://www.figma.com/developers/api#library-items - name: Webhooks description: Interact with team webhooks as a team admin. externalDocs: description: Webhook endpoints documentation url: https://www.figma.com/developers/api#webhooks_v2 - name: Activity Logs description: Get activity logs as an organization admin. externalDocs: description: Activity log endpoints documentation url: https://www.figma.com/developers/api#activity_logs - name: Payments description: Get purchase information for your Community resources. externalDocs: description: Payment endpoints documentation url: https://www.figma.com/developers/api#payments - name: Variables description: Interact with variables in an Enterprise organization. externalDocs: description: Variables endpoints documentation url: https://www.figma.com/developers/api#variables - name: Dev Resources description: Interact with dev resources in Figma Dev Mode. externalDocs: description: Dev resource endpoints documentation url: https://www.figma.com/developers/api#dev-resources - name: Library Analytics description: Get analytics data for your published libraries. externalDocs: description: Library analytics endpoints documentation url: https://www.figma.com/developers/api#library-analytics paths: /v1/files/{file_key}: get: tags: - Files summary: Get file JSON security: - PersonalAccessToken: [] - OAuth2: - file_content:read - files:read description: |- Returns the document identified by `file_key` as a JSON object. The file key can be parsed from any Figma file url: `https://www.figma.com/file/{file_key}/{title}`. The `document` property contains a node of type `DOCUMENT`. The `components` property contains a mapping from node IDs to component metadata. This is to help you determine which components each instance comes from. operationId: getFile parameters: - name: file_key in: path description: File to export JSON from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key. required: true schema: type: string - name: version in: query description: A specific version ID to get. Omitting this will get the current version of the file. schema: type: string - name: ids in: query description: |- Comma separated list of nodes that you care about in the document. If specified, only a subset of the document will be returned corresponding to the nodes listed, their children, and everything between the root node and the listed nodes. Note: There may be other nodes included in the returned JSON that are outside the ancestor chains of the desired nodes. The response may also include dependencies of anything in the nodes' subtrees. For example, if a node subtree contains an instance of a local component that lives elsewhere in that file, that component and its ancestor chain will also be included. For historical reasons, top-level canvas nodes are always returned, regardless of whether they are listed in the `ids` parameter. This quirk may be removed in a future version of the API. schema: type: string - name: depth in: query description: Positive integer representing how deep into the document tree to traverse. For example, setting this to 1 returns only Pages, setting it to 2 returns Pages and all top level objects on each page. Not setting this parameter returns all nodes. schema: type: number - name: geometry in: query description: Set to "paths" to export vector data. schema: type: string - name: plugin_data in: query description: A comma separated list of plugin IDs and/or the string "shared". Any data present in the document written by those plugins will be included in the result in the `pluginData` and `sharedPluginData` properties. schema: type: string - name: branch_data in: query description: "Returns branch metadata for the requested file. If the file is a branch, the main file's key will be included in the returned response. If the file has branches, their metadata will be included in the returned response. Default: false." schema: type: boolean default: false responses: "200": $ref: "#/components/responses/GetFileResponse" "400": $ref: "#/components/responses/BadRequestErrorResponseWithErrMessage" "403": $ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage" "404": $ref: "#/components/responses/NotFoundErrorResponseWithErrMessage" "429": $ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage" "500": $ref: "#/components/responses/InternalServerErrorResponseWithErrMessage" /v1/files/{file_key}/nodes: get: tags: - Files summary: Get file JSON for specific nodes security: - PersonalAccessToken: [] - OAuth2: - file_content:read - files:read description: |- Returns the nodes referenced to by `ids` as a JSON object. The nodes are retrieved from the Figma file referenced to by `file_key`. The node ID and file key can be parsed from any Figma node url: `https://www.figma.com/file/{file_key}/{title}?node-id={id}` The `name`, `lastModified`, `thumbnailUrl`, `editorType`, and `version` attributes are all metadata of the specified file. The `linkAccess` field describes the file link share permission level. There are 5 types of permissions a shared link can have: `"inherit"`, `"view"`, `"edit"`, `"org_view"`, and `"org_edit"`. `"inherit"` is the default permission applied to files created in a team project, and will inherit the project's permissions. `"org_view"` and `"org_edit"` restrict the link to org users. The `document` attribute contains a Node of type `DOCUMENT`. The `components` key contains a mapping from node IDs to component metadata. This is to help you determine which components each instance comes from. By default, no vector data is returned. To return vector data, pass the geometry=paths parameter to the endpoint. Each node can also inherit properties from applicable styles. The styles key contains a mapping from style IDs to style metadata. Important: the nodes map may contain values that are `null`. This may be due to the node id not existing within the specified file. operationId: getFileNodes parameters: - name: file_key in: path description: File to export JSON from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key. required: true schema: type: string - name: ids in: query description: A comma separated list of node IDs to retrieve and convert. required: true schema: type: string - name: version in: query description: A specific version ID to get. Omitting this will get the current version of the file. schema: type: string - name: depth in: query description: |- Positive integer representing how deep into the node tree to traverse. For example, setting this to 1 will return only the children directly underneath the desired nodes. Not setting this parameter returns all nodes. Note: this parameter behaves differently from the same parameter in the `GET /v1/files/:key` endpoint. In this endpoint, the depth will be counted starting from the desired node rather than the document root node. schema: type: number - name: geometry in: query description: Set to "paths" to export vector data. schema: type: string - name: plugin_data in: query description: A comma separated list of plugin IDs and/or the string "shared". Any data present in the document written by those plugins will be included in the result in the `pluginData` and `sharedPluginData` properties. schema: type: string responses: "200": $ref: "#/components/responses/GetFileNodesResponse" "400": $ref: "#/components/responses/BadRequestErrorResponseWithErrMessage" "403": $ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage" "404": $ref: "#/components/responses/NotFoundErrorResponseWithErrMessage" "429": $ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage" "500": $ref: "#/components/responses/InternalServerErrorResponseWithErrMessage" /v1/images/{file_key}: get: tags: - Files summary: Render images of file nodes security: - PersonalAccessToken: [] - OAuth2: - file_content:read - files:read description: | Renders images from a file. If no error occurs, `"images"` will be populated with a map from node IDs to URLs of the rendered images, and `"status"` will be omitted. The image assets will expire after 30 days. Images up to 32 megapixels can be exported. Any images that are larger will be scaled down. Important: the image map may contain values that are `null`. This indicates that rendering of that specific node has failed. This may be due to the node id not existing, or other reasons such has the node having no renderable components. It is guaranteed that any node that was requested for rendering will be represented in this map whether or not the render succeeded. To render multiple images from the same file, use the `ids` query parameter to specify multiple node ids. ``` GET /v1/images/:key?ids=1:2,1:3,1:4 ``` operationId: getImages parameters: - name: file_key in: path description: File to export images from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key. required: true schema: type: string - name: ids in: query description: A comma separated list of node IDs to render. required: true schema: type: string - name: version in: query description: A specific version ID to get. Omitting this will get the current version of the file. schema: type: string - name: scale in: query description: A number between 0.01 and 4, the image scaling factor. schema: type: number minimum: 0.01 maximum: 4 - name: format in: query description: A string enum for the image output format. schema: type: string enum: - jpg - png - svg - pdf default: png - name: svg_outline_text in: query description: |- Whether text elements are rendered as outlines (vector paths) or as `<text>` elements in SVGs. Rendering text elements as outlines guarantees that the text looks exactly the same in the SVG as it does in the browser/inside Figma. Exporting as `<text>` allows text to be selectable inside SVGs and generally makes the SVG easier to read. However, this relies on the browser's rendering engine which can vary between browsers and/or operating systems. As such, visual accuracy is not guaranteed as the result could look different than in Figma. schema: type: boolean default: true - name: svg_include_id in: query description: Whether to include id attributes for all SVG elements. Adds the layer name to the `id` attribute of an svg element. schema: type: boolean default: false - name: svg_include_node_id in: query description: Whether to include node id attributes for all SVG elements. Adds the node id to a `data-node-id` attribute of an svg element. schema: type: boolean default: false - name: svg_simplify_stroke in: query description: Whether to simplify inside/outside strokes and use stroke attribute if possible instead of `<mask>`. schema: type: boolean default: true - name: contents_only in: query description: Whether content that overlaps the node should be excluded from rendering. Passing false (i.e., rendering overlaps) may increase processing time, since more of the document must be included in rendering. schema: type: boolean default: true - name: use_absolute_bounds in: query description: Use the full dimensions of the node regardless of whether or not it is cropped or the space around it is empty. Use this to export text nodes without cropping. schema: type: boolean default: false responses: "200": $ref: "#/components/responses/GetImagesResponse" "400": $ref: "#/components/responses/BadRequestErrorResponseWithErrMessage" "403": $ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage" "404": $ref: "#/components/responses/NotFoundErrorResponseWithErrMessage" "429": $ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage" "500": $ref: "#/components/responses/InternalServerErrorResponseWithErrMessage" /v1/files/{file_key}/images: get: tags: - Files summary: Get image fills security: - PersonalAccessToken: [] - OAuth2: - file_content:read - files:read description: |- Returns download links for all images present in image fills in a document. Image fills are how Figma represents any user supplied images. When you drag an image into Figma, we create a rectangle with a single fill that represents the image, and the user is able to transform the rectangle (and properties on the fill) as they wish. This endpoint returns a mapping from image references to the URLs at which the images may be download. Image URLs will expire after no more than 14 days. Image references are located in the output of the GET files endpoint under the `imageRef` attribute in a `Paint`. operationId: getImageFills parameters: - name: file_key in: path description: File to get image URLs from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key. required: true schema: type: string responses: "200": $ref: "#/components/responses/GetImageFillsResponse" "400": $ref: "#/components/responses/BadRequestErrorResponseWithErrMessage" "403": $ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage" "404": $ref: "#/components/responses/NotFoundErrorResponseWithErrMessage" "429": $ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage" "500": $ref: "#/components/responses/InternalServerErrorResponseWithErrMessage" /v1/files/{file_key}/meta: get: tags: - Files summary: Get file metadata security: - PersonalAccessToken: [] - OAuth2: - file_metadata:read - files:read description: Get file metadata operationId: getFileMeta parameters: - name: file_key in: path description: File to get metadata for. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key. required: true schema: type: string responses: "200": $ref: "#/components/responses/GetFileMetaResponse" "400": $ref: "#/components/responses/BadRequestErrorResponseWithErrMessage" "403": $ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage" "404": $ref: "#/components/responses/NotFoundErrorResponseWithErrMessage" "429": $ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage" "500": $ref: "#/components/responses/InternalServerErrorResponseWithErrMessage" /v1/teams/{team_id}/projects: get: tags: - Projects summary: Get projects in a team security: - PersonalAccessToken: [] - OAuth2: - projects:read - files:read description: "You can use this endpoint to get a list of all the Projects within the specified team. This will only return projects visible to the authenticated user or owner of the developer token. Note: it is not currently possible to programmatically obtain the team id of a user just from a token. To obtain a team id, navigate to a team page of a team you are a part of. The team id will be present in the URL after the word team and before your team name." operationId: getTeamProjects parameters: - name: team_id in: path description: ID of the team to list projects from required: true schema: type: string responses: "200": $ref: "#/components/responses/GetTeamProjectsResponse" "400": $ref: "#/components/responses/BadRequestErrorResponseWithErrorBoolean" "403": $ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage" "429": $ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage" "500": $ref: "#/components/responses/InternalServerErrorResponseWithErrMessage" /v1/projects/{project_id}/files: get: tags: - Projects summary: Get files in a project security: - PersonalAccessToken: [] - OAuth2: - projects:read - files:read description: Get a list of all the Files within the specified project. operationId: getProjectFiles parameters: - name: project_id in: path description: ID of the project to list files from required: true schema: type: string - name: branch_data in: query description: Returns branch metadata in the response for each main file with a branch inside the project. schema: type: boolean default: false responses: "200": $ref: "#/components/responses/GetProjectFilesResponse" "400": $ref: "#/components/responses/BadRequestErrorResponseWithErrorBoolean" "403": $ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage" "429": $ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage" "500": $ref: "#/components/responses/InternalServerErrorResponseWithErrMessage" /v1/files/{file_key}/versions: get: tags: - Files summary: Get versions of a file security: - PersonalAccessToken: [] - OAuth2: - file_versions:read - files:read description: This endpoint fetches the version history of a file, allowing you to see the progression of a file over time. You can then use this information to render a specific version of the file, via another endpoint. operationId: getFileVersions parameters: - name: file_key in: path description: File to get version history from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key. required: true schema: type: string - name: page_size in: query description: The number of items returned in a page of the response. If not included, `page_size` is `30`. schema: type: number maximum: 50 - name: before in: query description: A version ID for one of the versions in the history. Gets versions before this ID. Used for paginating. If the response is not paginated, this link returns the same data in the current response. schema: type: number - name: after in: query description: A version ID for one of the versions in the history. Gets versions after this ID. Used for paginating. If the response is not paginated, this property is not included. schema: type: number responses: "200": $ref: "#/components/responses/GetFileVersionsResponse" "403": $ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage" "404": $ref: "#/components/responses/NotFoundErrorResponseWithErrMessage" "429": $ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage" "500": $ref: "#/components/responses/InternalServerErrorResponseWithErrMessage" /v1/files/{file_key}/comments: get: tags: - Comments summary: Get comments in a file security: - PersonalAccessToken: [] - OAuth2: - file_comments:read - files:read description: Gets a list of comments left on the file. operationId: getComments parameters: - name: file_key in: path description: File to get comments from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key. required: true schema: type: string - name: as_md in: query description: If enabled, will return comments as their markdown equivalents when applicable. schema: type: boolean responses: "200": $ref: "#/components/responses/GetCommentsResponse" "403": $ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage" "404": $ref: "#/components/responses/NotFoundErrorResponseWithErrMessage" "429": $ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage" "500": $ref: "#/components/responses/InternalServerErrorResponseWithErrMessage" post: tags: - Comments summary: Add a comment to a file security: - PersonalAccessToken: [] - OAuth2: - file_comments:write description: Posts a new comment on the file. operationId: postComment parameters: - name: file_key in: path description: File to add comments in. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key. required: true schema: type: string requestBody: description: Comment to post. required: true content: application/json: schema: type: object properties: message: type: string description: The text contents of the comment to post. comment_id: type: string description: The ID of the comment to reply to, if any. This must be a root comment. You cannot reply to other replies (a comment that has a parent_id). client_meta: description: The position where to place the comment. oneOf: - $ref: "#/components/schemas/Vector" - $ref: "#/components/schemas/FrameOffset" - $ref: "#/components/schemas/Region" - $ref: "#/components/schemas/FrameOffsetRegion" required: - message responses: "200": $ref: "#/components/responses/PostCommentResponse" "400": $ref: "#/components/responses/BadRequestErrorResponseWithErrorBoolean" "403": $ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage" "404": $ref: "#/components/responses/NotFoundErrorResponseWithErrMessage" "429": $ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage" "500": $ref: "#/components/responses/InternalServerErrorResponseWithErrMessage" /v1/files/{file_key}/comments/{comment_id}: delete: tags: - Comments summary: Delete a comment security: - PersonalAccessToken: [] - OAuth2: - file_comments:write description: Deletes a specific comment. Only the person who made the comment is allowed to delete it. operationId: deleteComment parameters: - name: file_key in: path description: File to delete comment from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key. required: true schema: type: string - name: comment_id in: path description: Comment id of comment to delete required: true schema: type: string responses: "200": $ref: "#/components/responses/DeleteCommentResponse" "403": $ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage" "404": $ref: "#/components/responses/NotFoundErrorResponseWithErrMessage" "429": $ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage" "500": $ref: "#/components/responses/InternalServerErrorResponseWithErrMessage" /v1/files/{file_key}/comments/{comment_id}/reactions: get: tags: - Comment Reactions summary: Get reactions for a comment security: - PersonalAccessToken: [] - OAuth2: - file_comments:read - files:read description: Gets a paginated list of reactions left on the comment. operationId: getCommentReactions parameters: - name: file_key in: path description: File to get comment containing reactions from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key. required: true schema: type: string - name: comment_id in: path description: ID of comment to get reactions from. required: true schema: type: string - name: cursor in: query description: Cursor for pagination, retrieved from the response of the previous call. schema: type: string responses: "200": $ref: "#/components/responses/GetCommentReactionsResponse" "403": $ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage" "404": $ref: "#/components/responses/NotFoundErrorResponseWithErrMessage" "429": $ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage" "500": $ref: "#/components/responses/InternalServerErrorResponseWithErrMessage" post: tags: - Comment Reactions summary: Add a reaction to a comment security: - PersonalAccessToken: [] - OAuth2: - file_comments:write description: Posts a new comment reaction on a file comment. operationId: postCommentReaction parameters: - name: file_key in: path description: File to post comment reactions to. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key. required: true schema: type: string - name: comment_id in: path description: ID of comment to react to. required: true schema: type: string requestBody: description: Reaction to post. required: true content: application/json: schema: type: object properties: emoji: $ref: "#/components/schemas/Emoji" required: - emoji responses: "200": $ref: "#/components/responses/PostCommentReactionResponse" "400": $ref: "#/components/responses/BadRequestErrorResponseWithErrorBoolean" "403": $ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage" "404": $ref: "#/components/responses/NotFoundErrorResponseWithErrMessage" "429": $ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage" "500": $ref: "#/components/responses/InternalServerErrorResponseWithErrMessage" delete: tags: - Comment Reactions summary: Delete a reaction security: - PersonalAccessToken: [] - OAuth2: - file_comments:write description: Deletes a specific comment reaction. Only the person who made the reaction is allowed to delete it. operationId: deleteCommentReaction parameters: - name: file_key in: path description: File to delete comment reaction from. This can be a file key or branch key. Use `GET /v1/files/:key` with the `branch_data` query param to get the branch key. required: true schema: type: string - name: comment_id in: path description: ID of comment to delete reaction from. required: true schema: type: string - name: emoji in: query required: true schema: $ref: "#/components/schemas/Emoji" responses: "200": $ref: "#/components/responses/DeleteCommentReactionResponse" "403": $ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage" "404": $ref: "#/components/responses/NotFoundErrorResponseWithErrMessage" "429": $ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage" "500": $ref: "#/components/responses/InternalServerErrorResponseWithErrMessage" /v1/me: get: tags: - Users summary: Get current user security: - PersonalAccessToken: [] - OAuth2: - current_user:read - files:read description: Returns the user information for the currently authenticated user. operationId: getMe responses: "200": $ref: "#/components/responses/GetMeResponse" "403": $ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage" "429": $ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage" "500": $ref: "#/components/responses/InternalServerErrorResponseWithErrMessage" /v1/teams/{team_id}/components: get: tags: - Components summary: Get team components security: - PersonalAccessToken: [] - OAuth2: - team_library_content:read - files:read description: Get a paginated list of published components within a team library. operationId: getTeamComponents parameters: - name: team_id in: path description: Id of the team to list components from. required: true schema: type: string - name: page_size in: query description: Number of items to return in a paged list of results. Defaults to 30. Maximum of 1000. schema: type: number default: 30 - name: after in: query description: Cursor indicating which id after which to start retrieving components for. Exclusive with before. The cursor value is an internally tracked integer that doesn't correspond to any Ids. schema: type: number - name: before in: query description: Cursor indicating which id before which to start retrieving components for. Exclusive with after. The cursor value is an internally tracked integer that doesn't correspond to any Ids. schema: type: number responses: "200": $ref: "#/components/responses/GetTeamComponentsResponse" "400": $ref: "#/components/responses/BadRequestErrorResponseWithErrMessage" "403": $ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage" "404": $ref: "#/components/responses/NotFoundErrorResponseWithErrorBoolean" "429": $ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage" "500": $ref: "#/components/responses/InternalServerErrorResponseWithErrMessage" /v1/files/{file_key}/components: get: tags: - Components summary: Get file components security: - PersonalAccessToken: [] - OAuth2: - library_content:read - files:read description: Get a list of published components within a file library. operationId: getFileComponents parameters: - name: file_key in: path description: File to list components from. This must be a main file key, not a branch key, as it is not possible to publish from branches. required: true schema: type: string responses: "200": $ref: "#/components/responses/GetFileComponentsResponse" "400": $ref: "#/components/responses/BadRequestErrorResponseWithErrMessage" "403": $ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage" "404": $ref: "#/components/responses/NotFoundErrorResponseWithErrorBoolean" "429": $ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage" "500": $ref: "#/components/responses/InternalServerErrorResponseWithErrMessage" /v1/components/{key}: get: tags: - Components summary: Get component security: - PersonalAccessToken: [] - OAuth2: - library_assets:read - files:read description: Get metadata on a component by key. operationId: getComponent parameters: - name: key in: path description: The unique identifier of the component. required: true schema: type: string responses: "200": $ref: "#/components/responses/GetComponentResponse" "400": $ref: "#/components/responses/BadRequestErrorResponseWithErrMessage" "403": $ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage" "404": $ref: "#/components/responses/NotFoundErrorResponseWithErrorBoolean" "429": $ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage" "500": $ref: "#/components/responses/InternalServerErrorResponseWithErrMessage" /v1/teams/{team_id}/component_sets: get: tags: - Component Sets summary: Get team component sets security: - PersonalAccessToken: [] - OAuth2: - team_library_content:read - files:read description: Get a paginated list of published component sets within a team library. operationId: getTeamComponentSets parameters: - name: team_id in: path description: Id of the team to list component sets from. required: true schema: type: string - name: page_size in: query description: Number of items to return in a paged list of results. Defaults to 30. schema: type: number default: 30 - name: after in: query description: Cursor indicating which id after which to start retrieving component sets for. Exclusive with before. The cursor value is an internally tracked integer that doesn't correspond to any Ids. schema: type: number - name: before in: query description: Cursor indicating which id before which to start retrieving component sets for. Exclusive with after. The cursor value is an internally tracked integer that doesn't correspond to any Ids. schema: type: number responses: "200": $ref: "#/components/responses/GetTeamComponentSetsResponse" "400": $ref: "#/components/responses/BadRequestErrorResponseWithErrMessage" "403": $ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage" "404": $ref: "#/components/responses/NotFoundErrorResponseWithErrorBoolean" "429": $ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage" "500": $ref: "#/components/responses/InternalServerErrorResponseWithErrMessage" /v1/files/{file_key}/component_sets: get: tags: - Component Sets summary: Get file component sets security: - PersonalAccessToken: [] - OAuth2: - library_content:read - files:read description: Get a list of published component sets within a file library. operationId: getFileComponentSets parameters: - name: file_key in: path description: File to list component sets from. This must be a main file key, not a branch key, as it is not possible to publish from branches. required: true schema: type: string responses: "200": $ref: "#/components/responses/GetFileComponentSetsResponse" "400": $ref: "#/components/responses/BadRequestErrorResponseWithErrMessage" "403": $ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage" "404": $ref: "#/components/responses/NotFoundErrorResponseWithErrorBoolean" "429": $ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage" "500": $ref: "#/components/responses/InternalServerErrorResponseWithErrMessage" /v1/component_sets/{key}: get: tags: - Component Sets summary: Get component set security: - PersonalAccessToken: [] - OAuth2: - library_assets:read - files:read description: Get metadata on a published component set by key. operationId: getComponentSet parameters: - name: key in: path description: The unique identifier of the component set. required: true schema: type: string responses: "200": $ref: "#/components/responses/GetComponentSetResponse" "400": $ref: "#/components/responses/BadRequestErrorResponseWithErrMessage" "403": $ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage" "404": $ref: "#/components/responses/NotFoundErrorResponseWithErrorBoolean" "429": $ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage" "500": $ref: "#/components/responses/InternalServerErrorResponseWithErrMessage" /v1/teams/{team_id}/styles: get: tags: - Styles summary: Get team styles security: - PersonalAccessToken: [] - OAuth2: - team_library_content:read - files:read description: Get a paginated list of published styles within a team library. operationId: getTeamStyles parameters: - name: team_id in: path description: Id of the team to list styles from. required: true schema: type: string - name: page_size in: query description: Number of items to return in a paged list of results. Defaults to 30. schema: type: number default: 30 - name: after in: query description: Cursor indicating which id after which to start retrieving styles for. Exclusive with before. The cursor value is an internally tracked integer that doesn't correspond to any Ids. schema: type: number - name: before in: query description: Cursor indicating which id before which to start retrieving styles for. Exclusive with after. The cursor value is an internally tracked integer that doesn't correspond to any Ids. schema: type: number responses: "200": $ref: "#/components/responses/GetTeamStylesResponse" "400": $ref: "#/components/responses/BadRequestErrorResponseWithErrMessage" "403": $ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage" "404": $ref: "#/components/responses/NotFoundErrorResponseWithErrorBoolean" "429": $ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage" "500": $ref: "#/components/responses/InternalServerErrorResponseWithErrMessage" /v1/files/{file_key}/styles: get: tags: - Styles summary: Get file styles security: - PersonalAccessToken: [] - OAuth2: - library_content:read - files:read description: Get a list of published styles within a file library. operationId: getFileStyles parameters: - name: file_key in: path description: File to list styles from. This must be a main file key, not a branch key, as it is not possible to publish from branches. required: true schema: type: string responses: "200": $ref: "#/components/responses/GetFileStylesResponse" "400": $ref: "#/components/responses/BadRequestErrorResponseWithErrMessage" "403": $ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage" "404": $ref: "#/components/responses/NotFoundErrorResponseWithErrorBoolean" "429": $ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage" "500": $ref: "#/components/responses/InternalServerErrorResponseWithErrMessage" /v1/styles/{key}: get: tags: - Styles summary: Get style security: - PersonalAccessToken: [] - OAuth2: - library_assets:read - files:read description: Get metadata on a style by key. operationId: getStyle parameters: - name: key in: path description: The unique identifier of the style. required: true schema: type: string responses: "200": $ref: "#/components/responses/GetStyleResponse" "400": $ref: "#/components/responses/BadRequestErrorResponseWithErrMessage" "403": $ref: "#/components/responses/ForbiddenErrorResponseWithErrMessage" "404": $ref: "#/components/responses/NotFoundErrorResponseWithErrorBoolean" "429": $ref: "#/components/responses/TooManyRequestsErrorResponseWithErrMessage" "500": $ref: "#/components/responses/InternalServerErrorResponseWithErrMessage" /v2/webhooks: get: tags: - Webhooks summary: Get webhooks by context or plan security: - PersonalAccessToken: [] - OAuth2: - webhooks:read description: Returns a list of webhooks corresponding to the context or plan provided, if they exist. For plan, the webhooks for all contexts that you have access to will be returned, and theresponse is paginated operationId: getWebhooks parameters: - name: context in: query required: false schema: type: string description: Context to create the resource on. Should be "team", "project", or "file". - name: context_id in: query required: false schema: type: string description: The id of the context that you want to get attached webhooks for. If you're using context_id, you cannot use plan_api_id. - name: plan_api_id in: query required: false schema: type: string description: The id of your plan. Use this to get all webhooks for all contexts you have access to. If you're using plan_api_id, you cannot use context or context_id. When you use plan_api_id, the response is paginated. - name: cursor in: query required: false schema: type: string description: If you're using plan_api_id, this is the cursor to use for pagination. If you're using context or context_id, this parameter is ignored. Provide the next_page or prev_page value from the previous response to get the next or previous page of results. responses: "200": $ref: "#/components/responses/GetWebhooksResponse" "400": $ref: "#/component