Skip to content

Comment (Note) API V3 — Developer Guide

Applies to: Sprinklr Comment (Note) APIs V3

V2 API reference: Comment (Note) | Sprinklr Developer Portal


1. Overview

Comment (i.e. termed as Note in Sprinklr Platform) helps promote engagement between the agents working on the Case. By using Comment APIs, a brand agent sitting on a 3rd party tool can add comments on a case programmatically, which can be used by another agent for reference. Sprinklr supports APIs that allow adding, reading, updating, and deleting comments. The added advantage is to create notes with attachments such as image, file, or even video.

1.1 Supported Entity Types

Entity typeIdentifier to send in entityId
CASECase Number
MESSAGEMessage Id
OUTBOUND_MESSAGEOutbound message (post) Id
CAMPAIGNCampaign Id
PROFILEProfile Id

Before you Begin

You need an access token and API key to call these APIs. Use the environment-specific API host shown in each endpoint.


2. API Endpoints

POST Create Comment PUT Update Comment GET Read Comment / Fetch Comment DEL Delete Comment


3. Base URLs and Environments

All API calls are sent to the production endpoint:

https://api3.sprinklr.com/{env}/api/v3

So the resource in production is:

https://api3.sprinklr.com/{env}/api/v3/comment

Replace {env} with your assigned environment identifier (prod0, prod2, prod11, and so on — see APIs | Sprinklr Developer Portal for the environment list).


4. Authentication and Common Headers

The API applies two global security schemes:

SchemeTypeLocation
bearerAuthHTTP bearer (JWT)Authorization: Bearer {{accessToken}}
apiKeyAuthAPI keyKey: {{apiKey}}
HeaderValueDescription
AuthorizationBearer {token}Authenticates the user with the server.
Key{api-key}Authenticates the application with the server.
Content-Typeapplication/jsonIdentifies the request-body media type.
Acceptapplication/jsonIdentifies the expected response type.

5. Write operations

5.1.1 Create a Comment (with attachment | without attachment)

Creates a comment on an entity, with an optional attachment. Request body is required, media type application/json.

Endpoint: api/v3/comment

Request Parameters

ParameterSub-parameterRequiredTypeDescription
entityType—RequiredStringEntity type: MESSAGE, OUTBOUND_MESSAGE, CASE, CAMPAIGN, PROFILE.
entityId—RequiredStringEntity id — e.g. Case Number for CASE, Message Id for MESSAGE.
text—RequiredStringThe comment text. In V2's multiple-attachment endpoint this field was named comment.

Example Request

curl --location 'https://api3.sprinklr.com/{env}/api/v3/comment' \
--header 'Authorization: Bearer {{accessToken}}' \
--header 'Key: {{apiKey}}' \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--data '{
  "entityType": "CASE",
  "entityId": "116537343",
  "text": "comment test"
}'

Example Response

{
  "data": {
    "id": "6a8825baa34ff204e0821a61",
    "text": "comment test",
    "commentingUser": 66015421,
    "createdTime": 1787307448962,
    "modifiedTime": 1787307448962,
    "entityType": "CASE",
    "entityId": "116537343",
    "conversationId": "7608262980542680350",
    "externalComment": {
      "channelType": "TIKTOK"
    }
  },
  "errors": []
}

5.1.2 Create Comment with Multiple Attachments

Using this API, you can add multiple attachments on a comment (note).

Endpoint: api/v3/comments

Request Parameters

ParameterSub-ParameterRequiredTypeDescription
entityType—RequiredStringCASE, MESSAGE, etc.
entityId—RequiredStringID of the entity
text—RequiredStringComment text (previously comment field)
attachments—RequiredArrayArray of attachment objects
attachmentsurlRequiredStringURL from Media Upload API response
attachmentspreviewUrlOptionalStringPreview URL from Media Upload API
attachmentstypeRequiredEnumIMAGE | VIDEO | DOC

Example Request

curl --location --request POST 'https://api3.sprinklr.com/{env}/api/v3/comments' \
--header 'Authorization: Bearer {{accessToken}}' \
--header 'Key: {{apiKey}}' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
  "entityType": "CASE",
  "entityId": "25253550",
  "text": "Add Comment Attachments on Case",
  "attachments": [
    {
      "url": "https://.../test_image_p.png",
      "previewUrl": "...",
      "type": "IMAGE"
    },
    {
      "url": "https://.../GG.jpg",
      "previewUrl": "...",
      "type": "IMAGE"
    }
  ]
}'

Example Response

{
  "data": {
    "id": "65d5acd6dff20160fd4ac551",
    "object": "comment",
    "text": "Add Comment Attachments on Case",
    "attachments": {
      "type": "MULTI_MEDIA",
      "attachments": [
        {
          "url": "https://.../test_image_p.png",
          "previewUrl": "...",
          "type": "IMAGE"
        },
        {
          "url": "https://.../GG.jpg",
          "previewUrl": "...",
          "type": "IMAGE"
        }
      ]
    },
    "commentingUser": "user_1000157828",
    "entityType": "CASE",
    "entityId": "case_7252751",
    "created_at": "2025-02-21T08:17:06Z",
    "updated_at": "2025-02-21T08:17:06Z",
    "url": "/api/v3/comments/65d5acd6dff20160fd4ac551"
  }
}

Response Parameters

ParameterDescriptionType
idUnique identifier of the commentString
objectAlways "comment"String
textThe comment textString
attachmentsMulti-media attachment object with nested array and type: MULTI_MEDIAObject
commentingUserUser ID of the commenterString
entityTypeEntity type on which the comment was createdString
entityIdID of the entity on which the comment was createdString
created_atISO 8601 timestamp of comment creation (v2 was Epoch ms)String
updated_atISO 8601 timestamp of last modification (v2 was Epoch ms)String
urlSelf-referencing URL of the created commentString

5.2 Update a Comment

Updates a comment's text, media, external reply metadata, and/or channel sync fields.

Endpoint: api/v3/comment/{commentId}?entityType={entity type}&entityId={entity id}

Path Parameters

ParameterInRequired (spec)Required (docs)TypeDescription
commentIdpathYesRequiredStringId of the comment to update.
entityTypequeryNoRequiredStringEntity type (enum name, e.g. CASE).
entityIdqueryNoRequiredStringId of the entity.

Request Parameters

PropertyTypeDescription
entityTypeEntityTypeOptional; if set, must match the entityType query parameter.
entityIdstringId of the entity.
textstringText of the comment.
attachmentAttachmentAttachment of the comment.
externalCommentExternalCommentThird-party channel comment details when comments are synced with another system.
inReplyToCommentIdstringParent comment's id to which this is a reply.
channelAssetIdstringChannel-native asset id.
channelCommentIdstringChannel-native comment id.
channelTypestringChannel type.
channelCreationTimeint64Channel creation time (epoch ms).
channelModificationTimeint64Channel modification time (epoch ms).

Example Request

curl --location --request PUT \
'https://api3.sprinklr.com/{env}/api/v3/comment/{commentId}?entityType=CASE&entityId=116537343' \
--header 'Authorization: Bearer {{accessToken}}' \
--header 'Key: {{apiKey}}' \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--data '{
  "text": "new comment updated",
  "entityType": "CASE",
  "entityId": "116537343"
}'

Example Response

HTTP/1.1 204 (No Content) 

5.3 Delete comment

Deletes one or more comments.

Endpoint: api/v3/comment?entityType={entitytype}&entityId={entityid}&id={commentId}

Path Parameters

ParameterInRequired (spec)Required (docs)TypeDescription
entityTypequeryNoRequiredStringEntity type (enum name, e.g. CASE).
entityIdqueryNoRequiredStringId of the entity.
idqueryNoRequiredStringComment id(s): one id or a comma-separated list, maximum 50, all sharing the same entityType and entityId.

Example Request

curl --location --request DELETE \
'https://api3.sprinklr.com/{env}/api/v3/comment?entityType=CASE&entityId=116537343&id={commentId}' \
--header 'Authorization: Bearer {{accessToken}}' \
--header 'Key: {{apiKey}}' \
--header 'Content-Type: application/json' \
--header 'accept: application/json'

Example Response

HTTP/1.1 204 (No Content) 

6. Read Operations

6.1 Fetch Comment(s)

You can use the Fetch Comment API to fetch the comment from different entity types using entity Id and comment Id.

Endpoint: api/v3/comment?entityType={entitytype}&entityId={entityid}&id={comment id}

ParameterInRequired (spec)Required (docs)TypeDescription
entityTypequeryNoRequiredStringEntity type for which the comment is being fetched. Supported values: MESSAGE, CASE, CAMPAIGN, PROFILE.
entityIdqueryNoRequiredStringUnique identifier of the entity — Case Number for CASE, Message Id for MESSAGE, Campaign Id for CAMPAIGN, Profile Id for PROFILE.
idqueryNoRequiredStringComment id(s): one id or a comma-separated list, maximum 50, all sharing the same entityType and entityId.

Example Request

curl --location \
'https://api3.sprinklr.com/{env}/api/v3/comment?entityType=CASE&entityId=116537343&id={commentId}' \
--header 'Authorization: Bearer {{accessToken}}' \
--header 'Key: {{apiKey}}' \
--header 'Content-Type: application/json' \
--header 'accept: application/json'

Example Response

{
  "data": [
    {
      "id": "6a883e6cd4bb4391d375feea",
      "text": "comment test",
      "commentingUser": 66015421,
      "createdTime": 1787313772664,
      "modifiedTime": 1787313772664,
      "entityType": "CASE",
      "entityId": "116537343",
      "conversationId": "7608262980542680350",
      "externalComment": {
        "channelType": "TIKTOK"
      }
    }
  ],
  "errors": []
}

Response Parameters

ParameterTypeDescription
idStringUnique id of the comment.
textStringText of the comment.
attachmentObject (Attachment)Attachment of the comment.
commentingUserLong (int64)Sprinklr user id of the user who made the comment.
createdTimeEpoch (int64, ms)Time when the comment was made.
modifiedTimeEpoch (int64, ms)Time when the comment was last updated.
entityTypeStringEntity type on which the comment was created.
entityIdStringId of the entity on which the comment was created.
conversationIdStringConversation id of the entity on which the comment was created, if applicable.
externalCommentObject (ExternalComment)Details of the channel comment, if applicable.
isPrivateBooleanPrivate comment — internal only, not synced to third-party integrations.
inReplyToCommentIdStringParent comment's id to which this is a reply.
errorsArrayError details, if any.

ExternalComment object

PropertyTypeDescription
channelTypeStringChannel type, e.g. salesforce, zendesk, rightnow. The documented example returns TIKTOK.
commentIdStringUnique id of the third-party comment.
assetIdStringUnique id of the third-party asset on which the comment was made.
ownerIdStringOwner of the comment on the third-party channel.
creationTimeint64Channel creation time (epoch ms).
modificationTimeint64Channel modification time (epoch ms).

7. Use Cases

1. Add comments with attachments

Create notes containing supporting media or documents. The API supports attachments with types IMAGE, VIDEO, and DOC.

2. Attach multiple files to a comment

Use the multiple-attachment operation to associate multiple attachment objects with a single comment, including their URLs, optional preview URLs, and attachment types.

3. Retrieve existing comments

Fetch comments associated with a particular entity by using its entityType, entityId, and comment ID. The API can also accept a comma-separated list of comment IDs, up to 50 IDs that share the same entity type and entity ID.

4. Update existing comments

Modify an existing comment, including its text, attachment, external-comment information, reply relationship, and documented channel synchronisation fields.