Endpoints
Unlike the other endpoints associated with the Figma API, you are able to post comments and reactions to a Figma file - in addition to being able to view existing comments and reactions on a file. This means that there are GET, POST, and DELETE endpoints available for comments and reactions.
Get comments
Gets a list of comments left on the file.
This is a Tier 2 endpoint and requires the file_comments:read
scope.
HTTP Endpoint
GET /v1/files/:key/comments
Return value
{
"comments": Comment[],
}
Path parameters | Description |
---|---|
key |
|
as_md |
|
Error codes | Description |
---|---|
403 | The developer / OAuth token is invalid or expired |
404 | The specified file was not found |
Post comments
Posts a new comment on the file.
This is a Tier 2 endpoint and requires the file_comments:write
scope.
HTTP Endpoint
POST /v1/files/:file_key/comments
Return value
The Comment that was successfully posted
Path parameters | Description |
---|---|
file_key |
|
Body parameters | Description |
---|---|
message |
|
comment_id |
|
client_meta |
|
Error codes | Description |
---|---|
403 | The developer / OAuth token is invalid or expired |
404 | The specified file was not found |
Delete comments
Deletes a specific comment. Only the person who made the comment is allowed to delete it.
This is a Tier 2 endpoint and requires the file_comments:write
scope.
HTTP Endpoint
DELETE /v1/files/:file_key/comments/:comment_id
Return value
Nothing is returned from this endpoint
Path parameters | Description |
---|---|
file_key |
|
comment_id |
|
Error codes | Description |
---|---|
403 | The developer / OAuth token is invalid or expired |
404 | The specified file was not found |
Get comment reactions
Gets a paginated list of reactions left on the comment.
This is a Tier 2 endpoint and requires the file_comments:read
scope.
HTTP Endpoint
GET /v1/files/:file_key/comments/:comment_id/reactions
Return value
{
"reactions": Reaction[],
"pagination": {
"prev_page": String,
"next_page": String
}
}
Path parameters | Description |
---|---|
file_key |
|
comment_id |
|
Query parameters | Description |
---|---|
cursor |
|
Error codes | Description |
---|---|
403 | The developer / OAuth token is invalid or expired |
404 | The specified file was not found |
Post comment reactions
Posts a new comment reaction on a file comment.
This is a Tier 2 endpoint and requires the file_comments:write
scope.
HTTP Endpoint
POST /v1/files/:file_key/comments/:comment_id/reactions
Return value
Nothing is returned from this endpoint
Path parameters | Description |
---|---|
file_key |
|
comment_id |
|
Body parameters | Description |
---|---|
emoji |
|
Error codes | Description |
---|---|
400 | The specified emoji is not valid |
403 | The developer / OAuth token is invalid or expired |
404 | The specified file was not found |
Delete comment reactions
Deletes a specific comment reaction. Only the person who made the reaction is allowed to delete it.
This is a Tier 2 endpoint and requires the file_comments:write
scope.
HTTP Endpoint
DELETE /v1/files/:file_key/comments/:comment_id/reactions
Return value
Nothing is returned from this endpoint
Path parameters | Description |
---|---|
file_key |
|
comment_id |
|
Query parameters | Description |
---|---|
emoji |
|
Error codes | Description |
---|---|
403 | The developer / OAuth token is invalid or expired |
404 | The specified file or comment was not found |