Skip to content

Create comment on an entity (with optional attachment)

Request

Security
bearerAuth and apiKeyAuth
Bodyapplication/jsonrequired
idstring
entityTypestring(EntityType)
entityIdstring
textstring
attachmentany(Attachment)
externalCommentobject(ExternalComment)

Third party channel comment details if comments are in sync with another system

inReplyToCommentIdstring

Parent comment's id to which this is a reply

contextIdstring

Context entity id when commenting in a nested context

contextClassstring(AssetClass)

Context asset class for nested context

Enum:"LOCATION_ACCOUNT""SYSTEM_USER_PAGE_ASSIGNMENT_REPORT""ACCOUNT_VIA_LINK""GUEST_USER""OAUTH_TOKEN""OAUTH_REFRESHABLE_TOKEN""OAUTH_API_USER""DISTRIBUTED_ASSET_GROUP""CLIENT_GROUP""CUSTOM_FIELD_GROUP"
clientIdinteger, (int64)

Client id override

commentingUserinteger, (int64)
commentedOnDateinteger, (int64)

Comment timestamp override

universalMessageKeyobject(UniversalMessageKey)

Universal message key when comment ties to a message

commentingCommunityUserIdstring

Community user id for community-sourced comments

collaborationChannelIdstring

Collaboration channel id

hasConversationboolean

Whether the comment has an associated conversation thread

restrictVisibilityboolean

Restrict visibility of the comment

resolvedboolean

Resolved flag for threaded / task comments

typestring

Comment subtype, e.g. BROADCAST for @here collaboration comments

additionalInfoobject
isPrivateboolean

Whether the comment is private

curl -i -X POST \
  https://developer.sprinklr.com/_mock/apis/sprinklr-v3/comment \
  -H 'Authorization: Bearer <YOUR_Token_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Key: YOUR_API_KEY_HERE' \
  -d '{
    "id": "string",
    "entityType": "string",
    "entityId": "string",
    "text": "string",
    "attachment": {
      "type": "IMAGE",
      "assetId": "string",
      "attachmentOptions": [
        {
          "channelType": "FACEBOOK",
          "accountId": 0,
          "embeddable": true,
          "category": "string",
          "noStory": true,
          "secret": true,
          "blockSocialActions": true,
          "expirationEnabled": true,
          "expirationDate": 0,
          "deletePost": true
        }
      ],
      "url": "string",
      "urlHash": "string",
      "title": "string",
      "description": "string",
      "previewUrl": "string",
      "hashedPreviewUrl": "string",
      "mimeType": "string",
      "alternateText": "string",
      "height": 0.1,
      "width": 0.1,
      "encryptedUrl": "string",
      "sizeInBytes": 0
    },
    "externalComment": {
      "channelType": "string",
      "commentId": "string",
      "assetId": "string",
      "ownerId": "string",
      "creationTime": 0,
      "modificationTime": 0
    },
    "inReplyToCommentId": "string",
    "contextId": "string",
    "contextClass": "LOCATION_ACCOUNT",
    "clientId": 0,
    "commentingUser": 0,
    "commentedOnDate": 0,
    "universalMessageKey": {
      "universalMessageId": "string",
      "snType": "string",
      "msgType": 0,
      "snMsgId": "string",
      "sourceId": 0,
      "sourceType": "ACCOUNT",
      "snCreatedTimeYearMonth": "string",
      "snCreatedTime": 0,
      "hashedUniversalMessageId": {},
      "additional": {
        "property1": "string",
        "property2": "string"
      }
    },
    "commentingCommunityUserId": "string",
    "collaborationChannelId": "string",
    "hasConversation": true,
    "restrictVisibility": true,
    "resolved": true,
    "type": "string",
    "additionalInfo": {
      "property1": [
        "string"
      ],
      "property2": [
        "string"
      ]
    },
    "isPrivate": true
  }'

Responses

Success

Bodyapplication/json
idstring
entityTypestring(EntityType)
entityIdstring
textstring
attachmentany(Attachment)
externalCommentobject(ExternalComment)

Third party channel comment details if comments are in sync with another system

inReplyToCommentIdstring

Parent comment's id to which this is a reply

contextIdstring

Context entity id when commenting in a nested context

contextClassstring(AssetClass)

Context asset class for nested context

Enum:"LOCATION_ACCOUNT""SYSTEM_USER_PAGE_ASSIGNMENT_REPORT""ACCOUNT_VIA_LINK""GUEST_USER""OAUTH_TOKEN""OAUTH_REFRESHABLE_TOKEN""OAUTH_API_USER""DISTRIBUTED_ASSET_GROUP""CLIENT_GROUP""CUSTOM_FIELD_GROUP"
clientIdinteger, (int64)

Client id override

commentingUserinteger, (int64)
commentedOnDateinteger, (int64)

Comment timestamp override

universalMessageKeyobject(UniversalMessageKey)

Universal message key when comment ties to a message

commentingCommunityUserIdstring

Community user id for community-sourced comments

collaborationChannelIdstring

Collaboration channel id

hasConversationboolean

Whether the comment has an associated conversation thread

restrictVisibilityboolean

Restrict visibility of the comment

resolvedboolean

Resolved flag for threaded / task comments

typestring

Comment subtype, e.g. BROADCAST for @here collaboration comments

additionalInfoobject
isPrivateboolean

Whether the comment is private

Response
{ "id": "string", "entityType": "string", "entityId": "string", "text": "string", "attachment": { "type": "IMAGE", "assetId": "string", "attachmentOptions": [ … ], "url": "string", "urlHash": "string", "title": "string", "description": "string", "previewUrl": "string", "hashedPreviewUrl": "string", "mimeType": "string", "alternateText": "string", "height": 0.1, "width": 0.1, "encryptedUrl": "string", "sizeInBytes": 0 }, "externalComment": { "channelType": "string", "commentId": "string", "assetId": "string", "ownerId": "string", "creationTime": 0, "modificationTime": 0 }, "inReplyToCommentId": "string", "contextId": "string", "contextClass": "LOCATION_ACCOUNT", "clientId": 0, "commentingUser": 0, "commentedOnDate": 0, "universalMessageKey": { "universalMessageId": "string", "snType": "string", "msgType": 0, "snMsgId": "string", "sourceId": 0, "sourceType": "ACCOUNT", "snCreatedTimeYearMonth": "string", "snCreatedTime": 0, "hashedUniversalMessageId": {}, "additional": { … } }, "commentingCommunityUserId": "string", "collaborationChannelId": "string", "hasConversation": true, "restrictVisibility": true, "resolved": true, "type": "string", "additionalInfo": { "property1": [ … ], "property2": [ … ] }, "isPrivate": true }