Adds a comment to a post
Add a comment to a post. Supports threaded replies via parentCommentId, file attachments, private comments, and best-answer marking for townhall Q&A.
Endpoints
Request URL
https://ServerDomain/pulse/api/v2/addComment
Scope
ZohoPulse.feedList.CREATECopied!
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Request Parameters
- Query Parameters
| PARAM NAME | DATA TYPE | DESCRIPTION |
|---|---|---|
| scopeID | Long | Network (scope) ID. |
| commentMembers | Long | Comma-separated ZUIDs for private comment recipients. Max 20. |
| streamId | Long | Post ID to comment on. |
| fileIds | Long | Comma-separated attachment file IDs. Max 100. |
| parentCommentId | Long | Parent comment ID for threaded replies. Omit for top-level comments. |
| isThread | Boolean | If true, indicates threaded comment. |
| commentContent | String | Comment body (rich-text HTML). Max 10,000 characters. |
| isPrivate | Boolean | If true, creates a private comment. |
| version | Integer | API version hint. |
| isAnswer | Boolean | If true, marks as best answer (townhall Q&A). |
| direction | String | Text direction — ltr or rtl. |
Sample Request
curl --request POST \
--url 'https://connect.zoho.com/pulse/api/v2/addComment?scopeID=3000000000008&streamId=3000000070001' \
--header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52'Response Parameters
- HTTP code 200
Response Body - application/json
| PARAM NAME | DATA TYPE | DESCRIPTION |
|---|---|---|
| comment | JSON Object | Created comment object. |
| attachments | JSON Array | Array of attachment objects. |
| streamId | Long | Parent post ID. |
| isCurrentUserLiked | Boolean | Whether the current user liked this comment. |
| canEdit | String | 'true' if the current user can edit. |
| parentCommentId | Long | Parent comment ID (for threaded replies). |
| likeCount | Integer | Number of likes on this comment. |
| isPinnedComment | Boolean | Whether the comment is pinned. |
| userDetails | JSON Object | Comment author details. |
| name | String | Author display name. |
| hasCustomImg | Boolean | True if author has a custom profile image. |
| zuid | Long | Author Zoho UID. |
| content | String | Comment content (HTML). |
| formatedTime | String | Formatted creation time string. |
| streamType | String | Parent post type. |
| commentType | String | Comment type (COMMENT, ANSWER, etc.). |
| hasHistory | String | 'true' if the comment has been edited. |
| canDelete | String | 'true' if the current user can delete. |
| id | Long | Comment ID. |
| time | Long | Creation timestamp (epoch ms). |
| isApproved | Boolean | Whether the comment is approved. |
| isReply | String | 'true' if this is a reply to another comment. |
Possible Response Codes
| HTTP Code | Description |
|---|---|
| 200 | Success response |
Sample Response: HTTP 200
Threaded reply to a comment.
{
"comment": {
"streamType": "STATUS",
"streamId": 3000000070001,
"author": {
"name": "John Doe",
"hasCustomImg": true,
"zuid": 700000001
},
"parentCommentId": 3000000080001,
"id": 3000000080002,
"content": "Thanks Jane! Glad it was helpful."
}
}
Comment added to a post.
{
"comment": {
"streamType": "STATUS",
"streamId": 3000000070001,
"author": {
"name": "Jane Smith",
"hasCustomImg": false,
"zuid": 700000002
},
"parentCommentId": 0,
"id": 3000000080001,
"content": "Great update! Thanks for sharing."
}
}
![]()
Duration: 1 minute | Threshold: 10 | Lock period: 1 minute
Duration - Time window for the threshold.
Threshold - Number of API calls allowed within the specified duration.
Lock Period - Wait time before consecutive API requests.