Skip to main content

Comments

Post Comment

Add a new comment to a Figma file.

Create a new comment on a file. Comments can be pinned to specific locations on the canvas or left as general file-level comments.

POST https://api.figma.com/v1/files/:file_key/comments

Authentication

Requires a valid access token with file_comments:write scope. Pass via X-Figma-Token header (personal access token) or Authorization: Bearer header (OAuth).

Workflow

1

Get your file key

Find the file key from the Figma URL. For example, in figma.com/file/ABC123/My-File, the file key is ABC123.

2

Build your comment payload

Construct the request body with the comment message. Optionally pin the comment to a canvas location using client_meta, or reply to an existing comment using comment_id.

3

Send the request

POST the payload to the comments endpoint with your authentication header. The response returns the created comment with its assigned ID.

Parameters

The key of the file to comment on.

Request Body

FieldTypeRequiredDescription
messagestringYesThe comment text. Supports basic formatting.
client_metaobjectNoPin location on the canvas. See below.
comment_idstringNoParent comment ID to create a threaded reply.

Example Request

curl -X POST "https://api.figma.com/v1/files/YOUR_FILE_KEY/comments" \
  -H "X-Figma-Token: YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "This looks great! Can we bump the font size?",
    "client_meta": {
      "x": 100,
      "y": 200,
      "node_id": "1:23"
    }
  }'

To reply to an existing comment thread, include the comment_id field with the ID of the parent comment. Omit client_meta when replying — the reply inherits the parent’s position.

Response

{
  "id": "789",
  "message": "This looks great! Can we bump the font size?",
  "created_at": "2024-01-15T10:30:00Z",
  "user": {
    "id": "456",
    "handle": "developer"
  }
}

Response Fields

FieldTypeDescription
idstringThe unique comment ID
messagestringThe comment text
created_atstringISO 8601 timestamp of when the comment was created
userobjectThe user who posted the comment
user.idstringThe user’s Figma ID
user.handlestringThe user’s display name