Create a User Comment

POST

POST User Comments

POST /users/{userId}/comments endpoint is used to create a comment for a user. To attach files in the comment upload the file first using the POST /pre-signed-url endpoint and then use the returned key to attach the file in the comment with the filename and size.`

Path parameters

userIdstringRequired
Unique User Identifier

Request

This endpoint expects an object.
body
stringRequired
Comment body
files
list of objectsOptional
createdTimestamp
doubleOptional
Timestamp when comment is created

Response

This endpoint returns an object
commentId
string
Unique comment ID
body
string
Comment body
files
list of objectsOptional
createdTimestamp
doubleOptional
Timestamp when comment is created
updatedTimestamp
doubleOptional
Timestamp when comment is updated

Errors

POST
1curl -X POST https://sandbox.api.flagright.com/management/users/userId/comments \
2 -H "x-api-key: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "body": "This is a comment",
6 "createdTimestamp": 1641654664000
7}'
1{
2 "commentId": "96647cfd9e8fe66ee0f3362e011e34e8",
3 "body": "This is a comment",
4 "files": [
5 {
6 "filename": "filename",
7 "size": 1.1,
8 "downloadLink": "downloadLink"
9 }
10 ],
11 "createdTimestamp": 1641654664000,
12 "updatedTimestamp": 1.1
13}