Methods

List Discussions

Gets a list of all discussions associated with the specified sheet. Remember that discussions are containers for the conversation thread. To see the entire thread, use the include=comments parameter.

Authorizations:
APITokenOAuth2 (READ_SHEETS)
path Parameters
sheetId
required
number

Sheet Id of the sheet being accessed.

query Parameters
include
string

A comma-separated list of optional elements to include in the response:

  • attachments - effective only if comments is present, otherwise ignored
  • comments - include all comments in threads
Enum: "attachments" "comments"
page
number
Default: 1

Which page to return. Defaults to 1 if not specified. If you specify a value greater than the total number of pages, the last page of results is returned.

pageSize
number
Default: 100

The maximum number of items to return per page. Unless otherwise stated for a specific endpoint, defaults to 100. If neither pageSize nor page is specified, returns all rows in the sheet. If only page is specified, defaults to a page size of 100.

includeAll
boolean
Default: false

If true, include all results, that is, do not paginate. Mutually exclusive with page and pageSize (they are ignored if includeAll=true is specified).

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}/discussions?include=comments,attachments' \
-H "Authorization: Bearer ll352u9jujauoqz4gstvsae05"

Response samples

Content type
application/json
{
  • "pageNumber": 1,
  • "pageSize": 50,
  • "totalPages": 25,
  • "totalCount": 136,
  • "data": [
    ]
}

Create a Discussion

Creates a new discussion on a sheet. To create a discussion 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.

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:
object

Comment.

Responses

Request samples

Content type
{
  • "comment": {
    }
}

Response samples

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

Get Discussion

Gets the discussion specified by discussionId.

Authorizations:
APITokenOAuth2 (READ_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

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "accessLevel": "ADMIN",
  • "id": 0,
  • "comments": [
    ],
  • "commentAttachments": [
    ],
  • "commentCount": 0,
  • "createdBy": {
    },
  • "lastCommentedAt": "2019-08-24T14:15:22Z",
  • "lastCommentedUser": {
    },
  • "parentId": 0,
  • "parentType": "ROW",
  • "readOnly": true,
  • "title": "string"
}

Delete a Discussion

Deletes the discussion specified in the URL.

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

Responses

Request samples

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

Response samples

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

List Discussions with a Row

Gets a list of all discussions associated with the specified row. Remember that discussions are containers for the conversation thread. To see the entire thread, use the include=comments parameter.

Authorizations:
APITokenOAuth2 (READ_SHEETS)
path Parameters
sheetId
required
number

Sheet Id of the sheet being accessed.

rowId
required
number

Row Id in the sheet being accessed.

query Parameters
include
string

A comma-separated list of optional elements to include in the response:

  • attachments - effective only if comments is present, otherwise ignored
  • comments - include all comments in threads
Enum: "attachments" "comments"
page
number
Default: 1

Which page to return. Defaults to 1 if not specified. If you specify a value greater than the total number of pages, the last page of results is returned.

pageSize
number
Default: 100

The maximum number of items to return per page. Unless otherwise stated for a specific endpoint, defaults to 100. If neither pageSize nor page is specified, returns all rows in the sheet. If only page is specified, defaults to a page size of 100.

includeAll
boolean
Default: false

If true, include all results, that is, do not paginate. Mutually exclusive with page and pageSize (they are ignored if includeAll=true is specified).

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}/rows/{rowId}/discussions?include=comments,attachments' \
-H "Authorization: Bearer ll352u9jujauoqz4gstvsae05"

Response samples

Content type
application/json
{
  • "pageNumber": 1,
  • "pageSize": 50,
  • "totalPages": 25,
  • "totalCount": 136,
  • "data": [
    ]
}

Create a Discussion on a Row

Creates a new discussion on a row. To create a discussion 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.

rowId
required
number

Row Id in the sheet being accessed.

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:
object

Comment.

Responses

Request samples

Content type
{
  • "comment": {
    }
}

Response samples

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