Methods

Get a comment

Gets the comment specified by commentId.

Authorizations:
APITokenOAuth2 (READ_SHEETS)
path Parameters
sheetId
required
number

Sheet Id of the sheet being accessed.

commentId
required
string

ID of the comment

header Parameters
Authorization
string

API Access Token used to authenticate requests to Smartsheet APIs.

Example: Bearer ll352u9jujauoqz4gstvsae05

Responses

Request samples

curl https://api.smartsheet.com/2.0/sheets/{sheetId}/comments/{commentId} \
-H "Authorization: Bearer ll352u9jujauoqz4gstvsae05"

Response samples

Content type
application/json
{
  • "attachments": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "createdBy": {
    },
  • "discussionId": 0,
  • "id": 0,
  • "modifiedAt": "2019-08-24T14:15:22Z",
  • "text": "string"
}

Edit a comment

Updates the text of a comment. NOTE: Only the user that created the comment is permitted to update it.

Authorizations:
APITokenOAuth2 (WRITE_SHEETS)
path Parameters
sheetId
required
number

Sheet Id of the sheet being accessed.

commentId
required
string

ID of the comment

header Parameters
Authorization
string

API Access Token used to authenticate requests to Smartsheet APIs.

Example: Bearer ll352u9jujauoqz4gstvsae05
Content-Type
string
Default: application/json

Required for POST and PUT requests. Defines the structure for the request body.

Request Body schema: application/json
text
string

Comment body.

Responses

Request samples

Content type
application/json
{
  • "text": "string"
}

Response samples

Content type
application/json
{
  • "version": 0,
  • "message": "SUCCESS",
  • "resultCode": 0,
  • "result": {
    }
}

Delete a comment

Deletes the comment specified in the URL.

Authorizations:
APITokenOAuth2 (WRITE_SHEETS)
path Parameters
sheetId
required
number

Sheet Id of the sheet being accessed.

commentId
required
string

ID of the comment

header Parameters
Authorization
string

API Access Token used to authenticate requests to Smartsheet APIs.

Example: Bearer ll352u9jujauoqz4gstvsae05

Responses

Request samples

curl https://api.smartsheet.com/2.0/sheets/{sheetId}/comments/{commentId} \
-H "Authorization: Bearer ll352u9jujauoqz4gstvsae05" \
-X 'DELETE'

Response samples

Content type
application/json
{
  • "version": 0,
  • "message": "SUCCESS",
  • "resultCode": 0
}

Create a comment

Adds a comment to a discussion. To create a comment with an attachment please use "multipart/form-data" content type.

Authorizations:
APITokenOAuth2 (WRITE_SHEETS)
path Parameters
sheetId
required
number

Sheet Id of the sheet being accessed.

discussionId
required
string

ID of the discussion

header Parameters
Authorization
string

API Access Token used to authenticate requests to Smartsheet APIs.

Example: Bearer ll352u9jujauoqz4gstvsae05
Content-Type
string
Default: application/json

Required for POST and PUT requests. Defines the structure for the request body.

Request Body schema:
text
string

Comment body.

Responses

Request samples

Content type
{
  • "text": "string"
}

Response samples

Content type
application/json
{
  • "message": "SUCCESS",
  • "resultCode": 0,
  • "result": {
    }
}
➔ Next to Related Items