Create a comment post
post
/swm/rs/v1/spaces/{spaceId}/comments
Post a new text comment (top-level or reply) to a space.
The text comment can not be blank.
Triggers an email notification if the space has other members who have opted-in to receive the notifications.
If post is a top-level comment, then set parentContentId = 0.
If post is a reply comment, the comment associated with the parentContentId itself must be a top-level comment (that is, the reply comment can not be a reply to a reply).
The API user must be a member of the space and will "own" the comment.
The contentId value returned in the response is used to reference and identify the comment post in the space.
Response parameter emailConfigMissing will appear in the developer response object if the system is not configured to send out email notifications.
The text comment can not be blank.
Triggers an email notification if the space has other members who have opted-in to receive the notifications.
If post is a top-level comment, then set parentContentId = 0.
If post is a reply comment, the comment associated with the parentContentId itself must be a top-level comment (that is, the reply comment can not be a reply to a reply).
The API user must be a member of the space and will "own" the comment.
The contentId value returned in the response is used to reference and identify the comment post in the space.
Response parameter emailConfigMissing will appear in the developer response object if the system is not configured to send out email notifications.
Request
Supported Media Types
- application/json
Path Parameters
-
spaceId: string
The ID of the space resource
{
"parentContentId":"string", - ID of the parent post (product or comment), otherwise "0" if top-level post
"comment":"string" - The text comment post
}
"parentContentId":"string", - ID of the parent post (product or comment), otherwise "0" if top-level post
"comment":"string" - The text comment post
}
Root Schema : schema
Type:
string
Response
Supported Media Types
- application/json; charset=UTF-8
200 Response
successful operation
Root Schema : JSONObject
Type:
object
201 Response
comment resource created
403 Response
not space member
Examples
Sample Request:
{"parentContentId":"2082990", "comment":"It looks like this one is on sale today."}
Sample Response:
{"response":{"code":"201.0","developerMessage":"comment resource created"}, "contentId":"2083924"}
Possible Error Codes:
{ "code":"403.1","developerMessage":"not space member", "code":"403.4","developerMessage":"max comments reached" }