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 or null],
"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 or null],
"message": {
"html": "<b>A test</b>"
},
"application": "[App_Id]",
"record": "[Record_Id]"
}'

Request Parameter

ParamTypeDescription
recordstringRecord Id of the record to attach comment to

Request Body

ParamTypeNullableDescription
assigned_tostringNoMember Id or null for unassigned
messagecomment content objectNoThe comment as either a SmartDoc object or html string

data (SmartDoc Object)

html (string)

parent_commentarray of objectsNoParent comment Id if comment is a reply
applicationstringNoRecord's Table Id
recordstringNoId of the record the comment should be associated with