Skip to main content

Add Comment

POST

https://app.smartsuite.com/api/v1/comments/?record=[Record_Id]

Creates a comment. Returns a comment object.

Example Request using SmartDoc object

curl -X POST "https://app.smartsuite.com/api/v1/comments/?record=[Record_Id]" \
-H "Authorization: Token YOUR_API_KEY" \
-H "ACCOUNT-ID: WORKSPACE_ID" \
-H "Content-Type: application/json" \
--data '{
"assigned_to": "[Member Id]",
"message": {
"data": {
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "[Comment Text]"
}
]
}
]
}
},
"parent_comment": "[Parent Comment Id if applicable]",
"application": "[Table_Id]",
"record": "[Record_Id]"
}'
Example Request using HTML

curl -X POST "https://app.smartsuite.com/api/v1/comments/?record=[Record_Id]" \
-H "Authorization: Token YOUR_API_KEY" \
-H "ACCOUNT-ID: WORKSPACE_ID" \
-H "Content-Type: application/json" \
--data '{
"assigned_to": "[Member Id]",
"message": {
"html": "<b>A test</b>"
},
"application": "[Table_Id]",
"record": "[Record_Id]"
}'

Request Parameter​

ParamTypeDescription
recordstringRecord Id of the record to attach comment to

Request Body​

ParamTypeNullableDescription
assigned_tostringYesMember Id, or null for unassigned
messagecomment content objectNoAn object containing either data (a SmartDoc object) or html (an HTML string). Send an object: a bare string returns 400 ("Expected a dictionary, but got str.").

data (SmartDoc Object)

html (string)

parent_commentstringYesId of the comment this is a reply to; omit or null for a top-level comment.
applicationstringNoRecord's Table Id
recordstringNoId of the record the comment should be associated with

Response​

Returns 201 Created with the new comment object.