v1

latestOpenAPI 3.0.32026-08-061874701.5 MB
sharing

Share asset

Shares an asset with the specified users and/or groups.

One (and only one) of the following is required (alongside accessLevel):

  • email
  • groupId
post/shares

Query parameters

assetType'sheet' | 'report' | 'sight' | 'workspace' | 'collection' | 'file' required
Example:sheet

The type of the asset. Used in combination with assetId to determine the asset.

assetIdstring required
Example:1234567890

The ID of the asset being accessed. It's used in combination with assetType to determine the asset.

Depending on the asset, this may be a numeric or string value.

sendEmailboolean

Either true or false to indicate whether to notify the user by email. Default is false. If true, limit is 1000 emails.

Request body

emailstring

The primary email address of a user to share to. Must be provided if groupId is not provided.

groupIdnumber

The ID of the group to share to. Must be provided if email is not provided.

accessLevel'ADMIN' | 'COMMENTER' | 'EDITOR' | 'EDITOR_SHARE' | 'OWNER' | 'VIEWER' required
subjectstring

The subject of the email that is optionally sent to notify the recipient.

Must set the sendEmail query parameter to true for this parameter to take effect.

messagestring

The message included in the body of the email that is optionally sent to the recipient.

Must set the sendEmail query parameter to true for this parameter to take effect.

ccMeboolean

Indicates whether to send a copy of the email to the sharer of the sheet.

Must set the sendEmail query parameter to true for this parameter to take effect.

Example request

[
  {
    "email": "test.email@smartsheet.com",
    "groupId": 1234567890
  }
]

Response

Result object containing an array of Share response objects, corresponding to what was specified in the request.

If the users and/or groups are already shared to the specified asset, they will be omitted from the response. An empty response indicates that all the users and/or groups in the request are already shared to the asset.

message'SUCCESS'

Message that indicates the request was successful.

resultCode0
  • '0' Success

Example response

{
  "message": "SUCCESS",
  "result": [
    {
      "id": "AAAMCmYGFOeE",
      "email": "test.email@smartsheet.com",
      "userId": 9876543210,
      "groupId": 1234567890,
      "name": "Example Name",
      "type": "USER"
    }
  ]
}