Methods

List Attachments

Gets a list of all attachments that are on the sheet, including sheet, row, and discussion-level attachments.

Authorizations:
APITokenOAuth2 (READ_SHEETS)
path Parameters
sheetId
required
number

Sheet Id of the sheet being accessed.

query Parameters
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, you'll receive an empty data set.

pageSize
number
Default: 100

The maximum number of items to return per page. Unless otherwise stated for a specific endpoint, defaults to 100. If only page is specified, defaults to a page size of 100. For reports, the default is 100 rows. If you need larger sets of data from your report, returns a maximum of 10,000 rows per request.

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 JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789

Responses

Request samples

curl https://api.smartsheet.com/2.0/sheets/{sheetId}/attachments \
-H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789"

Response samples

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

Attach File or URL to Sheet

Attaches a file to the sheet. The URL can be any of the following:

  • Normal URL (attachmentType "LINK")
  • Box.com URL (attachmentType "BOX_COM")
  • Dropbox URL (attachmentType "DROPBOX")
  • Egnyte URL (attachmentType "EGNYTE")
  • Evernote URL (attachmentType "EVERNOTE")
  • Google Drive URL (attachmentType "GOOGLE_DRIVE")
  • OneDrive URL (attachmentType "ONEDRIVE")

For multipart uploads 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 JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789
Content-Type
string
Default: application/json

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

Request Body schema:
string <binary>

Responses

Request samples

Content type
No sample

Response samples

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

Get Attachment

Fetches a temporary URL that allows you to download an attachment. The urlExpiresInMillis attribute tells you how long the URL is valid.

Authorizations:
APITokenOAuth2 (READ_SHEETS)
path Parameters
sheetId
required
number

Sheet Id of the sheet being accessed.

attachmentId
required
string

ID of the attachment

header Parameters
Authorization
string

API Access Token used to authenticate requests to Smartsheet APIs.

Example: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789

Responses

Request samples

curl https://api.smartsheet.com/2.0/sheets/{sheetId}/attachments/{attachmentId} \
-H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789"

Response samples

Content type
application/json
{
  • "id": 0,
  • "parentId": 0,
  • "attachmentType": "BOX_COM",
  • "attachmentSubType": "DOCUMENT",
  • "mimeType": "PNG",
  • "parentType": "COMMENT",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "createdBy": {
    },
  • "name": "string",
  • "sizeInKb": 0,
  • "url": "string",
  • "urlExpiresInMillis": 0
}

Delete Attachment

Deletes the attachment specified in the URL.

Authorizations:
APITokenOAuth2 (WRITE_SHEETS)
path Parameters
sheetId
required
number

Sheet Id of the sheet being accessed.

attachmentId
required
string

ID of the attachment

header Parameters
Authorization
string

API Access Token used to authenticate requests to Smartsheet APIs.

Example: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789

Responses

Request samples

curl https://api.smartsheet.com/2.0/sheets/{sheetId}/attachments/{attachmentId} \
-H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789" \
-X DELETE

Response samples

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

List Versions

Gets a list of all versions of the given attachmentId in order from newest to oldest.

Authorizations:
APITokenOAuth2 (READ_SHEETS)
path Parameters
sheetId
required
number

Sheet Id of the sheet being accessed.

attachmentId
required
string

ID of the attachment

query Parameters
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, you'll receive an empty data set.

pageSize
number
Default: 100

The maximum number of items to return per page. Unless otherwise stated for a specific endpoint, defaults to 100. If only page is specified, defaults to a page size of 100. For reports, the default is 100 rows. If you need larger sets of data from your report, returns a maximum of 10,000 rows per request.

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 JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789

Responses

Request samples

curl https://api.smartsheet.com/2.0/sheets/{sheetId}/attachments/{attachmentId}/versions \
-H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789"

Response samples

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

Attach New version

Uploads a new version of a file to a sheet or row. This operation can be performed using a simple upload or a multipart upload.

Authorizations:
APITokenOAuth2 (WRITE_SHEETS)
path Parameters
sheetId
required
number

Sheet Id of the sheet being accessed.

attachmentId
required
string

ID of the attachment

header Parameters
Authorization
string

API Access Token used to authenticate requests to Smartsheet APIs.

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

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

Request Body schema:
string <binary>

Responses

Request samples

curl https://api.smartsheet.com/2.0/sheets/{sheetId}/attachments/{attachmentId}/versions \
-H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789" \
-H "Content-Type: application/msword" \
-H 'Content-Disposition: attachment; filename="ProgressReport.docx"' \
-H "Content-Length: FILE_SIZE" \
-X POST \
--data-binary @ProgressReport.docx

Response samples

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

Delete All Versions

Deletes all versions of the attachment corresponding to the specified attachmentId. For attachments with multiple versions, this effectively deletes the attachment from the object that it’s attached to.

Authorizations:
APITokenOAuth2 (WRITE_SHEETS)
path Parameters
sheetId
required
number

Sheet Id of the sheet being accessed.

attachmentId
required
string

ID of the attachment

header Parameters
Authorization
string

API Access Token used to authenticate requests to Smartsheet APIs.

Example: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789

Responses

Request samples

curl https://api.smartsheet.com/2.0/sheets/{sheetId}/attachments/{attachmentId}/versions \
-H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789" \
-X DELETE

Response samples

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

Attach File or URL to Comment

Attaches a file to the comment. The URL can be any of the following:

  • Normal URL (attachmentType "LINK")
  • Box.com URL (attachmentType "BOX_COM")
  • Dropbox URL (attachmentType "DROPBOX")
  • Egnyte URL (attachmentType "EGNYTE")
  • Evernote URL (attachmentType "EVERNOTE")
  • Google Drive URL (attachmentType "GOOGLE_DRIVE")
  • OneDrive URL (attachmentType "ONEDRIVE")

This operation can be performed using a simple upload or a multipart upload.

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 JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789
Content-Type
string
Default: application/json

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

Request Body schema:
string <binary>

Responses

Request samples

Content type
No sample

Response samples

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

List Discussion Attachments

Gets a list of all attachments that are in the discussion.

Authorizations:
APITokenOAuth2 (READ_SHEETS)
path Parameters
sheetId
required
number

Sheet Id of the sheet being accessed.

discussionId
required
string

ID of the discussion

query Parameters
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, you'll receive an empty data set.

pageSize
number
Default: 100

The maximum number of items to return per page. Unless otherwise stated for a specific endpoint, defaults to 100. If only page is specified, defaults to a page size of 100. For reports, the default is 100 rows. If you need larger sets of data from your report, returns a maximum of 10,000 rows per request.

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 JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789

Responses

Request samples

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

Response samples

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

List Row Attachments

Gets a list of all attachments that are on the row, including row and discussion-level attachments.

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
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, you'll receive an empty data set.

pageSize
number
Default: 100

The maximum number of items to return per page. Unless otherwise stated for a specific endpoint, defaults to 100. If only page is specified, defaults to a page size of 100. For reports, the default is 100 rows. If you need larger sets of data from your report, returns a maximum of 10,000 rows per request.

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 JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789

Responses

Request samples

curl https://api.smartsheet.com/2.0/sheets/{sheetId}/rows/{rowId}/attachments \
-H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789"

Response samples

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

Attach File or URL to Row

Attaches a file to the row. The URL can be any of the following:

  • Normal URL (attachmentType "LINK")
  • Box.com URL (attachmentType "BOX_COM")
  • Dropbox URL (attachmentType "DROPBOX")
  • Egnyte URL (attachmentType "EGNYTE")
  • Evernote URL (attachmentType "EVERNOTE")
  • Google Drive URL (attachmentType "GOOGLE_DRIVE")
  • OneDrive URL (attachmentType "ONEDRIVE")

For multipart uploads 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 JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789
Content-Type
string
Default: application/json

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

Request Body schema:
string <binary>

Responses

Request samples

Content type
No sample

Response samples

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