# Share dashboard (deprecated)

Shares a dashboard with the specified users and groups.

DEPRECATED - As early as the sunset date specified in this Changelog entry, this endpoint will be discontinued. Please refer to the Changelog entry for more details.

Endpoint: POST /sights/{sightId}/shares
Version: 2.0.0
Security: APIToken, OAuth2

## Header parameters:

  - `Authorization` (string)
    API Access Token used to authenticate requests to Smartsheet APIs.

  - `smartsheet-integration-source` (string)
    Uses the following metadata to distinguish between human-initiated API requests and third-party service-initiated calls by AI Connectors or ITSM:

- Integration source type
- Organization name
- Integration source name 

Format:


TYPE,OrgName,SourceName


Examples: 

AI,SampleOrg,My-AI-Connector-v2

SCRIPT,SampleOrg2,Accounting-updater-script

APPLICATION,SampleOrg3,SheetUpdater
    Example: "AI,SampleOrg,My-AI-Connector-v2"

## Query parameters:

  - `accessApiLevel` (number)
    Allows COMMENTER access for inputs and return values. For backwards-compatibility, VIEWER is the default. For example, to see whether a user has COMMENTER access for a sheet, use accessApiLevel=1.

  - `sendEmail` (boolean)
    Either true or false to indicate whether to notify the user by email. Default is false. If true, limit is 1000 emails.

## Path parameters:

  - `sightId` (string, required)
    ID of the dashboard (sight) being accessed.

## Request fields (application/json):

  - `id` (string)
    Share ID.

NOTE: unlike other Smartsheet object Ids, this ID is an alphanumeric string.

  - `groupId` (number)
    Group ID if the share is a group share, else null.

  - `userId` (number)
    User ID if the share is a user share, else null.

  - `type` (string)
    The type of this share. One of the following values: GROUP or USER.

  - `accessLevel` (string)
    Enum: "ADMIN", "COMMENTER", "EDITOR", "EDITOR_SHARE", "OWNER", "VIEWER"

  - `ccMe` (boolean)
    Indicates whether to send a copy of the email to the sharer of the sheet. You can specify this attribute
in a request, but it is never present in a response.

  - `email` (string)
    User's primary email address for user shares.

  - `message` (string)
    The message included in the body of the email that is optionally sent to the recipient. You can specify
this attribute in a request, but it is never present in a response.

  - `name` (string)
    If a user share and user is also a contact, the user's full name. If a group share, the group's name.

  - `scope` (string)
    The scope of this share. One of the following values:
  * ITEM: an item-level share (that is, the specific object to which the share applies is shared with
    the user or group).
  * WORKSPACE: a workspace-level share (that is, the workspace that contains the object to which the
    share applies is shared with the user or group).

  - `subject` (string)
    The subject of the email that is optionally sent to notify the recipient. You can specify this attribute
in a request, but it is never present in a response.

## Response 200 fields (application/json):

  - `version` (number,null)
    New version of the sheet. Applicable only for operations which update sheet data.

  - `failedItems` (array,null)
    Array of BulkItemFailure objects which represents the items that failed to be added or updated. See [Bulk operations > Partial success](/api/smartsheet/guides/advanced-topics/scalability-options) for more information. Applicable only for bulk operations that support partial success.

  - `failedItems.rowId` (number,null)
    The ID of the row that failed. Applicable only to bulk row operations.

  - `failedItems.error` (object)
    The error caused by the failed item.

  - `failedItems.error.refId` (string)
    The ID of the specific error occurrence. Please include this information when contacting Smartsheet support.

  - `failedItems.error.errorCode` (number)
    Custom error code from Smartsheet. See the complete [Error Code List](/api/smartsheet/error-codes).

  - `failedItems.error.message` (string)
    Descriptive error message.

  - `failedItems.index` (number)
    The index of the failed item in the bulk request array.

  - `message` (string)
    Message that indicates the outcome of the request. (One of SUCCESS or PARTIAL_SUCCESS.)
    Enum: "PARTIAL_SUCCESS", "SUCCESS"

  - `resultCode` (number)
    * '0' Success
* '3' Partial Success of Bulk Operation
    Enum: 0, 3

  - `result` (any)

## Response 400 fields (application/json):

  - `refId` (string)
    The ID of the specific error occurrence. Please include this information when contacting Smartsheet support.

  - `errorCode` (number)
    Custom error code from Smartsheet. See the complete [Error Code List](/api/smartsheet/error-codes).

  - `message` (string)
    Descriptive error message.

## Response default fields (application/json):

  - `refId` (string)
    The ID of the specific error occurrence. Please include this information when contacting Smartsheet support.

  - `errorCode` (number)
    Custom error code from Smartsheet. See the complete [Error Code List](/api/smartsheet/error-codes).

  - `message` (string)
    Descriptive error message.


