I would like to format the message text when I create comments using the REST API (POST/v1/files/:file_key/comments
)
Something like this:
curl -X POST
-H 'X-FIGMA-TOKEN: figd_xyz'
-H "Content-Type: application/json"
'https://api.figma.com/v1/files/ZXY/comments'
-d '{"message":"This s a **bold** comment","client_meta":{"node_id":"1:360","node_offset":{"x":700,"y":10}}}'
However, this creates the comment with the literal string in the Figma file and without applying any formatting, the comment will show up in Figma like this:
“This s a **bold** comment”
How can I create formatted comments using the REST API?
I can see that the GET comment endpoint has an as_md
parameter to get the comment with the markdown formatting, so I was expecting this to work the other way around too.
Is this possible?