### POST /workspaces Source: https://developers.smartsheet.com/api/smartsheet/openapi/workspaces/create-workspace Creates a new workspace with the specified name and optional configurations. ```APIDOC ## POST /workspaces ### Description Creates a new workspace. ### Method POST ### Endpoint /workspaces ### Parameters #### Query Parameters - **accessApiLevel** (number) - Optional - Allows COMMENTER access for inputs and return values. Default is 0 (VIEWER). - **include** (string) - Optional - A comma-separated list of elements to include in the response (e.g., 'all', 'attachments', 'shares'). - **skipRemap** (string) - Optional - A comma-separated list of references to NOT re-map for the newly created folder (e.g., 'cellLinks', 'reports'). #### Headers - **Authorization** (string) - Required - API Access Token used to authenticate requests. Example: `Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789` - **smartsheet-integration-source** (string) - Optional - Metadata to distinguish API request origins. Format: `TYPE,OrgName,SourceName`. Example: `AI,SampleOrg,My-AI-Connector-v2` - **Content-Type** (string) - Required - Defines the structure for the request body. Default: `application/json` #### Request Body - **name** (string) - Required - Workspace name. Example: `"New workspace"` ### Request Example ```bash curl https://api.smartsheet.com/2.0/workspaces \ -H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789" \ -H "Content-Type: application/json" \ -X POST \ -d '{"name": "New workspace"}' ``` ### Response #### Success Response (200) - **id** (integer) - The unique identifier for the created workspace. - **name** (string) - The name of the workspace. - **createdAt** (string) - The date and time the workspace was created. - **modifiedAt** (string) - The date and time the workspace was last modified. - **workspace** (object) - Contains workspace-specific details. #### Response Example ```json { "id": 12345, "name": "New workspace", "createdAt": "2023-10-27T10:00:00Z", "modifiedAt": "2023-10-27T10:00:00Z", "workspace": { "id": 12345, "name": "New workspace" } } ``` ``` -------------------------------- ### GET /sheets - List Sheets Source: https://developers.smartsheet.com/api/smartsheet/guides/getting-started This endpoint allows you to list all sheets accessible to your account. You will need to include your API access token in the Authorization header. ```APIDOC ## GET /sheets ### Description Retrieves a list of all sheets associated with the authenticated user. ### Method GET ### Endpoint /2.0/sheets ### Parameters #### Query Parameters None #### Request Body None ### Request Example ``` curl -X GET -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ "https://api.smartsheet.com/2.0/sheets" ``` ### Response #### Success Response (200) - **pageNumber** (integer) - The current page number of the results. - **pageSize** (integer) - The number of items per page. - **totalPages** (integer) - The total number of pages available. - **totalCount** (integer) - The total number of sheets. - **data** (array) - An array of sheet objects. - **id** (integer) - The unique identifier for the sheet. - **name** (string) - The name of the sheet. - **accessLevel** (string) - The user's access level to the sheet (e.g., ADMIN, VIEWER). - **permalink** (string) - A direct link to the sheet. - **createdAt** (string) - The date and time the sheet was created (ISO 8601 format). - **modifiedAt** (string) - The date and time the sheet was last modified (ISO 8601 format). #### Response Example ```json { "pageNumber": 1, "pageSize": 100, "totalPages": 1, "totalCount": 2, "data": [ { "id": 6141831453927300, "name": "My first sheet", "accessLevel": "ADMIN", "permalink": "https://app.smartsheet.com/b/home?lx=8enlO7GkdYSz-cHHVus33A", "createdAt": "2023-09-25T17:38:02Z", "modifiedAt": "2023-09-25T17:38:09Z" }, { "id": 6141831453927300, "name": "Sheet shared to me", "accessLevel": "VIEWER", "permalink": "https://app.smartsheet.com/b/home?lx=8enlO7GkdYSz-cHHVus33A", "createdAt": "2017-06-27T21:17:15Z", "modifiedAt": "2023-04-19T17:16:05Z" } ] } ``` ``` -------------------------------- ### Create Workspace Source: https://developers.smartsheet.com/api/smartsheet/openapi/workspaces/list-workspaces This endpoint allows you to create a new workspace. It returns a Workspace object with details of the newly created workspace. ```APIDOC ## POST /workspaces ### Description Creates a new workspace. Returns a Workspace object containing details of the newly created workspace. ### Method POST ### Endpoint /workspaces ### Parameters #### Request Body - **name** (string) - Required - The name of the workspace. ### Request Example ```json { "name": "My New Workspace" } ``` ### Response #### Success Response (200) - **message** (string) - Indicates the outcome of the request (SUCCESS or PARTIAL_SUCCESS). - **resultCode** (number) - '0' for Success, '3' for Partial Success of Bulk Operation. - **result** (WorkspaceListing) - An object containing details of the created workspace. - **id** (integer) - The ID of the workspace. - **name** (string) - The name of the workspace. - **accessLevel** (string) - The access level of the user to the workspace (e.g., ADMIN). - **permalink** (string) - A deep link to the workspace. #### Response Example ```json { "message": "SUCCESS", "resultCode": 0, "result": { "id": 12345, "name": "My New Workspace", "accessLevel": "ADMIN", "permalink": "https://app.smartsheet.com/b/home?lx=..." } } ``` ``` -------------------------------- ### Get Dashboard Publish Status - cURL Example Source: https://developers.smartsheet.com/api/smartsheet/openapi/dashboards/delete-sight Provides an example of how to retrieve the current publish settings for a Smartsheet dashboard using cURL. This operation requires the sightId of the dashboard and an Authorization header for authentication. ```bash curl https://api.smartsheet.com/2.0/sights/{sightId}/publish \ -H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789" ``` -------------------------------- ### Get Favorite Response Example (JSON) Source: https://developers.smartsheet.com/api/smartsheet/openapi/favorites/add-favorite Example JSON response for a successful favorite retrieval operation. It includes a message indicating the outcome and a result code. The 'result' field contains details of the favorite item, such as its object ID and type. ```json { "message": "SUCCESS", "resultCode": 0, "result": { "objectId": 0, "type": "folder" } } ``` -------------------------------- ### Create Workspace Source: https://developers.smartsheet.com/api/smartsheet/openapi/sharing/share-sight-get Creates a new workspace. ```APIDOC ## POST /workspaces ### Description Creates a new workspace. Workspaces are organizational containers that can hold sheets, reports, dashboards, and templates. ### Method POST ### Endpoint /workspaces ### Parameters #### Request Body - **workspace** (object) - Required - The workspace object to create. - **name** (string) - Required - The name for the new workspace. ### Request Example ```json { "workspace": { "name": "New Project Workspace" } } ``` ### Response #### Success Response (200) - **id** (integer) - The unique identifier for the newly created workspace. - **name** (string) - The name of the newly created workspace. - **objectType** (string) - The type of object (e.g., "workspace"). #### Response Example ```json { "id": 67890, "name": "New Project Workspace", "objectType": "workspace" } ``` ``` -------------------------------- ### Get List of Sheets (HTTP GET) Source: https://developers.smartsheet.com/api/smartsheet/guides/basics/http-and-rest Retrieves a list of all Sheet objects accessible via the API. This is a common starting point for querying Smartsheet data. No specific libraries are required, just a standard HTTP client. ```http GET https://api.smartsheet.com/2.0/sheets ``` -------------------------------- ### Create Workspace Source: https://developers.smartsheet.com/api/smartsheet/openapi/groupmembers/groupmember Creates a new workspace. ```APIDOC ## POST /workspaces ### Description Creates a new workspace. ### Method POST ### Endpoint /workspaces ### Parameters #### Request Body - **name** (string) - Required - The name of the workspace to create. ### Request Example ```json { "name": "New Project Workspace" } ``` ### Response #### Success Response (201) - **id** (integer) - The unique identifier of the newly created workspace. - **name** (string) - The name of the newly created workspace. - **objectType** (string) - The type of the object, always 'workspace'. #### Response Example ```json { "id": 456, "name": "New Project Workspace", "objectType": "workspace" } ``` ``` -------------------------------- ### Search API Source: https://developers.smartsheet.com/api/smartsheet/openapi/discussions/discussion-listattachments Search a specific sheet or search across all sheets that a user can access. Provisioning may be required for first-time users, which can take up to 24 hours. ```APIDOC ## Search Operations ### GET /search #### Description Searches for sheets based on criteria. ### GET /search/sheets/{sheetId} #### Description Searches within a specific sheet. #### Parameters ##### Path Parameters - **sheetId** (string) - Required - The ID of the sheet to search within. ``` -------------------------------- ### Get Report by ID - cURL Examples Source: https://developers.smartsheet.com/api/smartsheet/openapi/reports/getreport Demonstrates how to retrieve a specific report using the Smartsheet API via cURL. Examples show fetching a report with specific parameters like 'level' and 'include', and also how to request the report in different formats such as Excel and CSV by setting the 'Accept' header. ```curl // Sample 1: Get report curl https://api.smartsheet.com/2.0/reports/{reportId}?level=3&include=objectValue \ -H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789" ``` ```curl // Sample 2: Get report as Excel curl https://api.smartsheet.com/2.0/reports/{reportId} \ -H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789" \ -H "Accept: application/vnd.ms-excel" \ -o output.xlsx ``` ```curl // Sample 3: Get report as CSV curl https://api.smartsheet.com/2.0/reports/{reportId} \ -H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789" \ -H "Accept: text/csv" \ -o output.csv ``` -------------------------------- ### Proofs API Source: https://developers.smartsheet.com/api/smartsheet/openapi/users/list-user-plans Endpoints for managing proofs, including retrieving, updating, deleting, and handling attachments and discussions. ```APIDOC ## GET /sheets/{sheetId}/proofs ### Description Retrieves a list of all proofs associated with a specific sheet. ### Method GET ### Endpoint `/sheets/{sheetId}/proofs` ### Parameters #### Path Parameters - **sheetId** (integer) - Required - The ID of the sheet. ### Response #### Success Response (200) - **proofs** (array) - An array of proof objects. #### Response Example ```json { "proofs": [ { "id": 1, "title": "Proof 1", "createdAt": "2023-10-27T10:00:00Z" }, { "id": 2, "title": "Proof 2", "createdAt": "2023-10-27T11:00:00Z" } ] } ``` ## GET /sheets/{sheetId}/proofs/{proofId} ### Description Retrieves a specific proof by its ID from a given sheet. ### Method GET ### Endpoint `/sheets/{sheetId}/proofs/{proofId}` ### Parameters #### Path Parameters - **sheetId** (integer) - Required - The ID of the sheet. - **proofId** (integer) - Required - The ID of the proof. ### Response #### Success Response (200) - **proof** (object) - The proof object. #### Response Example ```json { "proof": { "id": 1, "title": "Proof 1", "createdAt": "2023-10-27T10:00:00Z" } } ``` ## DELETE /sheets/{sheetId}/proofs/{proofId} ### Description Deletes a specific proof by its ID from a given sheet. ### Method DELETE ### Endpoint `/sheets/{sheetId}/proofs/{proofId}` ### Parameters #### Path Parameters - **sheetId** (integer) - Required - The ID of the sheet. - **proofId** (integer) - Required - The ID of the proof to delete. ### Response #### Success Response (200) - **message** (string) - Confirmation message. #### Response Example ```json { "message": "Proof deleted successfully." } ``` ## PUT /sheets/{sheetId}/proofs/{proofId} ### Description Updates a specific proof by its ID from a given sheet. Allows modification of proof details. ### Method PUT ### Endpoint `/sheets/{sheetId}/proofs/{proofId}` ### Parameters #### Path Parameters - **sheetId** (integer) - Required - The ID of the sheet. - **proofId** (integer) - Required - The ID of the proof to update. #### Request Body - **title** (string) - Optional - The new title for the proof. ### Response #### Success Response (200) - **proof** (object) - The updated proof object. #### Response Example ```json { "proof": { "id": 1, "title": "Updated Proof Title", "createdAt": "2023-10-27T10:00:00Z" } } ``` ## GET /sheets/{sheetId}/proofs/{proofId}/attachments ### Description Retrieves all attachments associated with a specific proof. ### Method GET ### Endpoint `/sheets/{sheetId}/proofs/{proofId}/attachments` ### Parameters #### Path Parameters - **sheetId** (integer) - Required - The ID of the sheet. - **proofId** (integer) - Required - The ID of the proof. ### Response #### Success Response (200) - **attachments** (array) - An array of attachment objects. #### Response Example ```json { "attachments": [ { "id": 101, "name": "document.pdf", "size": 102400 } ] } ``` ## POST /sheets/{sheetId}/proofs/{proofId}/attachments ### Description Adds an attachment to a specific proof. ### Method POST ### Endpoint `/sheets/{sheetId}/proofs/{proofId}/attachments` ### Parameters #### Path Parameters - **sheetId** (integer) - Required - The ID of the sheet. - **proofId** (integer) - Required - The ID of the proof. #### Request Body * **file** (file) - Required - The file to attach. ### Response #### Success Response (200) - **attachment** (object) - The newly added attachment object. #### Response Example ```json { "attachment": { "id": 102, "name": "image.jpg", "size": 51200 } } ``` ## GET /sheets/{sheetId}/proofs/{proofId}/discussions ### Description Retrieves all discussions associated with a specific proof. ### Method GET ### Endpoint `/sheets/{sheetId}/proofs/{proofId}/discussions` ### Parameters #### Path Parameters - **sheetId** (integer) - Required - The ID of the sheet. - **proofId** (integer) - Required - The ID of the proof. ### Response #### Success Response (200) - **discussions** (array) - An array of discussion objects. #### Response Example ```json { "discussions": [ { "id": 201, "comment": "Needs review.", "createdAt": "2023-10-27T10:30:00Z" } ] } ``` ## POST /sheets/{sheetId}/proofs/{proofId}/discussions ### Description Adds a discussion to a specific proof. ### Method POST ### Endpoint `/sheets/{sheetId}/proofs/{proofId}/discussions` ### Parameters #### Path Parameters - **sheetId** (integer) - Required - The ID of the sheet. - **proofId** (integer) - Required - The ID of the proof. #### Request Body - **comment** (string) - Required - The content of the discussion. ### Response #### Success Response (200) - **discussion** (object) - The newly added discussion object. #### Response Example ```json { "discussion": { "id": 202, "comment": "Added a new comment.", "createdAt": "2023-10-27T11:30:00Z" } } ``` ``` -------------------------------- ### Get Update Request cURL Example Source: https://developers.smartsheet.com/api/smartsheet/openapi/updaterequests/sentupdaterequest-get This cURL command demonstrates how to retrieve a specific update request for a sheet using the Smartsheet API. It requires the sheet ID and the update request ID, along with an API token for authentication. The endpoint used is GET /sheets/{sheetId}/updaterequests/{updateRequestId}. ```curl # Example request: get update request curl https://api.smartsheet.com/2.0/sheets/{sheetId}/updaterequests/{updateRequestId} \ -H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789" ``` -------------------------------- ### Get Report Publish Settings (cURL) Source: https://developers.smartsheet.com/api/smartsheet/openapi/reports/getreports Example cURL command to retrieve the publish settings for a specific report using the Smartsheet API. It requires the report ID and an authorization header. ```bash curl https://api.smartsheet.com/2.0/reports/{reportId}/publish \ -H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789" ``` -------------------------------- ### Simple Uploads Source: https://developers.smartsheet.com/api/smartsheet/openapi/tokens This section explains how to perform simple uploads, typically for attaching a single file to a resource. It requires specific headers to identify the file and its properties. ```APIDOC ## Simple Uploads ### Description Allows for direct uploads of files as attachments. Requires specific headers to identify the file and its content. ### Method POST ### Endpoint `https://api.smartsheet.com/2.0/sheets/{sheetId}/attachments` ### Headers - **Content-Disposition** (string) - Must be `attachment; filename="{URL-encoded filename}"`. - **Content-Length** (string) - The size of the file in bytes. - **Content-Type** (string) - The MIME type of the file. Can be blank if unknown, Smartsheet will attempt to guess. ### Request Body The binary content of the file to be uploaded. ### Request Example ``` POST https://api.smartsheet.com/2.0/sheets/4509093797881732/attachments Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789 Content-Disposition: attachment; filename="ProgressReport.docx" Content-Type: application/msword Content-Length: 5463 _< Binary content for file >_ ``` ### Response (Success and error responses depend on the specific operation and its success criteria.) ``` -------------------------------- ### POST /workspaces Source: https://developers.smartsheet.com/api/smartsheet/openapi/workspaces/list-workspaces Creates a new workspace. Requires API authentication. ```APIDOC ## POST /workspaces ### Description Creates a new workspace. Requires API authentication. ### Method POST ### Endpoint /workspaces ### Query Parameters - **accessApiLevel** (number) - Optional - Allows COMMENTER access for inputs and return values. Default is 0 (VIEWER). - **include** (string) - Optional - A comma-separated list of elements to include in the response (e.g., 'all', 'attachments', 'data', 'shares'). - **skipRemap** (string) - Optional - A comma-separated list of references to NOT re-map for the newly created folder (e.g., 'cellLinks', 'reports'). ### Headers - **Authorization** (string) - Required - API Access Token used to authenticate requests. Example: `Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789` - **smartsheet-integration-source** (string) - Optional - Metadata to distinguish between different integration sources. Format: `TYPE,OrgName,SourceName`. Example: `AI,SampleOrg,My-AI-Connector-v2` - **Content-Type** (string) - Required for POST requests. Defines the structure for the request body. Default: `application/json` ### Request Body - **name** (string) - Required - The name of the workspace to create. ### Request Example ```json { "name": "New workspace" } ``` ### Response #### Success Response (200) Returns the newly created workspace object. #### Response Example (Example response structure would typically be provided here, detailing the fields of a created workspace.) ``` -------------------------------- ### Get Column Details from Smartsheet (cURL Request) Source: https://developers.smartsheet.com/api/smartsheet/openapi/columns This example demonstrates how to retrieve the definition of a specific column within a Smartsheet using a cURL command. It includes the necessary endpoint and authorization headers. ```curl curl https://api.smartsheet.com/2.0/sheets/{sheetId}/columns/{columnId} \ -H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789" ``` -------------------------------- ### Get Specific Dashboard cURL Request Example Source: https://developers.smartsheet.com/api/smartsheet/openapi/dashboards/delete-sight This cURL command demonstrates how to retrieve a specific dashboard from the Smartsheet API. It includes the necessary authentication header and a query parameter to specify the API level. ```curl curl https://api.smartsheet.com/2.0/sights/{sightId}?level=4 \ -H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789" ``` -------------------------------- ### Multipart Uploads Source: https://developers.smartsheet.com/api/smartsheet/openapi/groups/add-group Instructions and examples for performing multipart uploads, which involve sending data in multiple parts, typically used for uploading files with associated metadata. ```APIDOC ## Multipart Uploads ### Description Multipart uploads allow sending data in multiple parts, suitable for uploading files with associated JSON metadata. ### Request Headers - **Content-Length** (string) - The length of the request payload. - **Content-Type** (string) - Must be `multipart/form-data` and include the boundary string. ### Request Body The request body consists of one or more parts, each starting with the boundary string. Each part must include: - **Content-Disposition** (string) - `form-data; name='_partname_'; filename='_filename_'` (filename is required for file parts). Values must be URL-encoded. - **Content-Type** (string) - `application/json` for JSON objects or the applicable MIME type for file parts. The last part is followed by the boundary string and two hyphens. ### Example Request (POST /sheets/{sheetId}/discussions/{commentId}/comments) ```http POST https://api.smartsheet.com/2.0/sheets/4509093797881732/discussions/2889925487028100/comments Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789 Content-Length: 29008 Content-Type: multipart/form-data; boundary=----gU8h01zAAp3LagBr ------gU8h01zAAp3LagBr Content-Disposition: form-data; name="comment" Content-Type: application/json { "text": "Please review the attached image." } ------gU8h01zAAp3LagBr Content-Disposition: form-data; name="file"; filename="picture.jpg" Content-Type: image/jpeg < Binary content for file > ------gU8h01zAAp3LagBr-- ``` ### Response (Details depend on the specific operation) ``` -------------------------------- ### Simple Uploads Source: https://developers.smartsheet.com/api/smartsheet/openapi/tokens/token This section describes how to perform simple file uploads by setting specific headers. It outlines the required headers and provides an example for adding a file attachment to a sheet. ```APIDOC ## POST /sheets/{sheetId}/attachments ### Description Adds a file attachment to a specific sheet. ### Method POST ### Endpoint `/sheets/{sheetId}/attachments` ### Headers - **Content-Disposition** (string) - Must be `attachment; filename="_filename_"`, where `_filename_` is the URL-encoded filename. - **Content-Length** (string) - The size of the file in bytes. - **Content-Type** (string) - The MIME type of the file. Can be left blank if unknown. ### Request Body The content of the file to be uploaded. ### Request Example ```http POST https://api.smartsheet.com/2.0/sheets/4509093797881732/attachments Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789 Content-Disposition: attachment; filename="ProgressReport.docx" Content-Type: application/msword Content-Length: 5463 _< Binary content for file >_ ``` ### Response (Details depend on the specific operation) ``` -------------------------------- ### Smartsheet API - Get a Comment Source: https://developers.smartsheet.com/api/smartsheet/openapi/comments/comment Retrieves a specific comment from a sheet using its ID. Requires authentication and specifies sheet ID and comment ID as path parameters. Includes example cURL command. ```HTTP GET /sheets/{sheetId}/comments/{commentId} HTTP/1.1 Host: api.smartsheet.com Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789 smartsheet-integration-source: AI,SampleOrg,My-AI-Connector-v2 ``` ```curl curl https://api.smartsheet.com/2.0/sheets/{sheetId}/comments/{commentId} \ -H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789" ``` -------------------------------- ### Get Sent Update Request cURL Example Source: https://developers.smartsheet.com/api/smartsheet/openapi/updaterequests/sentupdaterequest-get This cURL command demonstrates how to retrieve a specific sent update request from the Smartsheet API. It requires the sheet ID and the sent update request ID, along with an authorization header. ```bash # Example request: get sent update request curl https://api.smartsheet.com/2.0/sheets/{sheetId}/sentupdaterequests/{sentUpdateRequestId} \ -H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789" ``` -------------------------------- ### Workspaces - Create Workspace Source: https://developers.smartsheet.com/api/smartsheet/openapi/workspaces/create-workspace This section covers the creation of new workspaces within Smartsheet. It outlines the necessary request format and expected responses. ```APIDOC ## POST /workspaces ### Description Creates a new workspace in your Smartsheet account. ### Method POST ### Endpoint /workspaces ### Parameters #### Request Body - **name** (string) - Required - The name of the workspace to be created. ### Request Example ```json { "name": "New Project Workspace" } ``` ### Response #### Success Response (200) - **id** (integer) - The unique identifier for the newly created workspace. - **name** (string) - The name of the workspace. - **createdAt** (datetime) - The timestamp when the workspace was created. - **ownerId** (integer) - The ID of the user who owns the workspace. - **ownerSmartsheetId** (integer) - The Smartsheet ID of the workspace owner. - **workspace** (object) - Contains details about the workspace itself. #### Response Example ```json { "id": 1234567890123456, "name": "New Project Workspace", "createdAt": "2023-10-27T10:00:00Z", "ownerId": 9876543210987654, "ownerSmartsheetId": 1122334455667788, "workspace": { "id": 1234567890123456, "name": "New Project Workspace" } } ``` ``` -------------------------------- ### Smartsheet Contacts Response (JSON) Source: https://developers.smartsheet.com/api/smartsheet/openapi/contacts Example JSON response structure for the 'Get List of Smartsheet Contacts' endpoint. It includes pagination details (pageNumber, pageSize, totalPages, totalCount) and an array of Contact objects within the 'data' field. ```json { "pageNumber": 1, "pageSize": 50, "totalPages": 25, "totalCount": 136, "data": [ { "…" } ] } ``` -------------------------------- ### Create Workspace Source: https://developers.smartsheet.com/api/smartsheet/openapi/contacts Creates a new workspace. ```APIDOC ## POST /workspaces ### Description Creates a new workspace. Workspaces are used to organize dashboards, reports, sheets, and templates. ### Method POST ### Endpoint /workspaces ### Parameters #### Request Body - **name** (String) - Required - The name for the new workspace. - **workspaceSharing** (Object) - Optional - Settings for sharing the workspace. - **accessLevel** (String) - Required - The default access level for users invited to the workspace (e.g., "ADMIN", "VIEWER"). - **workspaceBranding** (Object) - Optional - Branding settings for the workspace. - **logoUrl** (String) - Optional - The URL for the workspace logo. - **colorScheme** (String) - Optional - The desired color scheme for the workspace. ### Request Example ```json { "name": "Sales Q4 2023", "workspaceSharing": { "accessLevel": "ADMIN" }, "workspaceBranding": { "logoUrl": "https://example.com/sales_logo.png", "colorScheme": "green" } } ``` ### Response #### Success Response (200) - **id** (Integer) - The unique identifier for the newly created workspace. - **name** (String) - The name of the workspace. - **workspaceSharing** (Object) - Workspace sharing settings. - **accessLevel** (String) - The access level of the current user to the workspace. - **workspaceBranding** (Object) - Workspace branding settings. - **logoUrl** (String) - The URL of the workspace logo. - **colorScheme** (String) - The color scheme applied to the workspace. #### Response Example ```json { "id": 54321, "name": "Sales Q4 2023", "workspaceSharing": { "accessLevel": "OWNER" }, "workspaceBranding": { "logoUrl": "https://example.com/sales_logo.png", "colorScheme": "green" } } ``` ``` -------------------------------- ### Get Smartsheet Report by ID using cURL Source: https://developers.smartsheet.com/api/smartsheet/openapi/reports/getreports Demonstrates how to retrieve a specific Smartsheet report using the cURL command-line tool. Examples show how to include specific data fields and specify output formats like Excel and CSV. ```curl // Sample 1: Get report curl https://api.smartsheet.com/2.0/reports/{reportId}?level=3&include=objectValue \ -H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789" // Sample 2: Get report as Excel curl https://api.smartsheet.com/2.0/reports/{reportId} \ -H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789" \ -H "Accept: application/vnd.ms-excel" \ -o output.xlsx // Sample 3: Get report as CSV curl https://api.smartsheet.com/2.0/reports/{reportId} \ -H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789" \ -H "Accept: text/csv" \ -o output.csv ``` -------------------------------- ### Simple Uploads Source: https://developers.smartsheet.com/api/smartsheet/openapi/groups/add-group Instructions for performing simple uploads, typically used for attaching files directly to a resource. ```APIDOC ## Simple Uploads ### Description Simple uploads attach a file directly to a resource using specific request headers. ### Required Headers - **Content-Disposition** (string) - `attachment; filename="_URL-encoded filename_"`. - **Content-Length** (integer) - The size of the file in bytes. - **Content-Type** (string) - The MIME type of the file. Can be left blank if unknown. ### Example Request (POST /sheets/{sheetId}/attachments) ```http POST https://api.smartsheet.com/2.0/sheets/4509093797881732/attachments Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789 Content-Disposition: attachment; filename="ProgressReport.docx" Content-Type: application/msword Content-Length: 5463 < Binary content for file > ``` ### Response (Details depend on the specific operation) ``` -------------------------------- ### Get Folder Details - cURL Example Source: https://developers.smartsheet.com/api/smartsheet/openapi/folders/get-folder Shows how to retrieve a Folder object using a cURL command. This operation is rate-limited to 60 requests per minute per API token. Optional query parameters can be included to specify which elements to return in the response. ```cURL curl https://api.smartsheet.com/2.0/folders/{folderId} \ -H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789" ``` -------------------------------- ### Simple Uploads Source: https://developers.smartsheet.com/api/smartsheet/openapi/schemas/dashboard_removeworkspaceshare Instructions and examples for performing simple uploads, which are used for directly attaching files to sheets. ```APIDOC ## POST /sheets/{sheetId}/attachments ### Description Attaches a file to a sheet using a simple upload request. ### Method POST ### Endpoint `https://api.smartsheet.com/2.0/sheets/{sheetId}/attachments` ### Parameters #### Path Parameters - **sheetId** (integer) - Required - The ID of the sheet to which the attachment will be added. #### Request Body - **Content-Disposition**: `attachment; filename="_filename_"` (filename must be URL-encoded) - **Content-Length**: (integer) - Required - The size of the file in bytes. - **Content-Type**: (string) - The MIME type of the file. Can be left blank if unknown. ### Request Example ``` POST https://api.smartsheet.com/2.0/sheets/4509093797881732/attachments Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789 Content-Disposition: attachment; filename="ProgressReport.docx" Content-Type: application/msword Content-Length: 5463 _< Binary content for file >_ ``` ### Response #### Success Response (200) - **attachment** (object) - The details of the newly created attachment. #### Response Example ```json { "id": 112233, "name": "ProgressReport.docx", "sizeInBytes": 5463, "mimeType": "application/msword", "createdAt": "2024-01-01T11:00:00Z" } ``` ``` -------------------------------- ### GET /home/folders Source: https://developers.smartsheet.com/api/smartsheet/openapi/crosssheetreferences Retrieves folders in the user's home directory. Deprecated. Use GET /folders/personal to get shared items and GET /workspaces/ to get workspaces. ```APIDOC ## GET /home/folders ### Description Retrieves folders in the user's home directory. Deprecated. Use GET /folders/personal to get shared items and GET /workspaces/ to get workspaces. ### Method GET ### Endpoint /home/folders ### Parameters None ### Request Example None ### Response #### Success Response (200) - **folders** (array) - An array of folder objects. #### Response Example { "folders": [ { "id": 123, "name": "Home Folder" } ] } ``` -------------------------------- ### Search API Source: https://developers.smartsheet.com/api/smartsheet/openapi/tokens/token Allows searching for data within Smartsheet. You can search a specific sheet or across all sheets accessible to the user. Note that initial setup might require up to 24 hours for data provisioning. ```APIDOC ## GET /search ### Description Searches across all sheets that a user can access. ### Method GET ### Endpoint /search ### Parameters #### Query Parameters - **query** (string) - Required - The search term. - **includeAllSheetData** (boolean) - Optional - Set to `true` to include data from all sheets, otherwise searches only accessible sheets. ### Request Example (No request body for GET) ### Response #### Success Response (200) Returns a list of search results. #### Response Example ```json { "results": [ { "sheetId": 123456789, "sheetName": "Example Sheet", "rowId": 1, "rowValue": "Example Row Value", "cellValue": "Matching Cell Content" } ] } ``` ## GET /search/sheets/{sheetId} ### Description Searches within a specific sheet. ### Method GET ### Endpoint /search/sheets/{sheetId} ### Parameters #### Path Parameters - **sheetId** (integer) - Required - The ID of the sheet to search within. #### Query Parameters - **query** (string) - Required - The search term. ### Request Example (No request body for GET) ### Response #### Success Response (200) Returns a list of search results within the specified sheet. #### Response Example ```json { "results": [ { "rowId": 1, "rowValue": "Example Row Value", "cellValue": "Matching Cell Content" } ] } ``` ``` -------------------------------- ### Copy Workspace Request Example (cURL) Source: https://developers.smartsheet.com/api/smartsheet/openapi/workspaces/create-workspace This cURL command demonstrates how to copy a workspace using the Smartsheet API. It includes the necessary authentication header, content type, and a JSON payload specifying the new workspace name and destination. ```curl curl 'https://api.smartsheet.com/2.0/workspaces/{workspaceId}/copy?include=data' \ -H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789" \ -H "Content-Type: application/json" \ -d '{"newName": "newWorkspaceName"}' \ -X POST ``` -------------------------------- ### GET /folders/personal Source: https://developers.smartsheet.com/api/smartsheet/openapi/comments/comment-edit Gets the personal folders. This endpoint is deprecated. Use GET /workspaces/ to get workspaces. ```APIDOC ## GET /folders/personal ### Description Retrieves the personal folders. **Deprecated** ### Method GET ### Endpoint /folders/personal ### Parameters N/A ### Request Example N/A ### Response #### Success Response (200) - **folders** (array) - An array of folder objects. #### Response Example ```json { "folders": [ { "id": "string", "name": "string" } ] } ``` ``` -------------------------------- ### Smartsheet API: Get Comment Response Example (JSON) Source: https://developers.smartsheet.com/api/smartsheet/openapi/comments/comment-edit This JSON structure represents a successful response when retrieving comment details from the Smartsheet API. It includes information about attachments, creation and modification timestamps, the creator's details, discussion ID, comment ID, and the comment text. ```json { "attachments": [ { } ], "createdAt": "2019-08-24T14:15:22Z", "createdBy": { "email": "jane.doe@smartsheet.com", "name": "Jane Doe" }, "discussionId": 0, "id": 0, "modifiedAt": "2019-08-24T14:15:22Z", "text": "string" } ``` -------------------------------- ### Create Workspace Source: https://developers.smartsheet.com/api/smartsheet/openapi/sharing/createsharerequest Creates a new workspace to organize your projects and content. ```APIDOC ## POST /workspaces ### Description Creates a new workspace. ### Method POST ### Endpoint /workspaces ### Parameters #### Request Body - **name** (string) - Required - The name of the workspace. - **description** (string) - Optional - A description for the workspace. - **workspacePermissions** (array) - Optional - Default sharing permissions for the workspace. - **userId** (string) - Required - The ID of the user. - **permission** (string) - Required - The permission level (e.g., "VIEWER", "EDITOR", "OWNER"). ### Request Example ```json { "name": "New Marketing Campaign", "description": "Workspace for the upcoming marketing campaign.", "workspacePermissions": [ { "userId": "user456", "permission": "EDITOR" } ] } ``` ### Response #### Success Response (201) - **id** (string) - The unique identifier for the newly created workspace. - **name** (string) - The name of the workspace. - **ownerId** (string) - The ID of the user who owns the workspace. - **createdAt** (string) - The date and time the workspace was created. - **modifiedAt** (string) - The date and time the workspace was last modified. #### Response Example { "id": "abcdef12-3456-7890-abcd-ef1234567890", "name": "New Marketing Campaign", "ownerId": "user123", "createdAt": "2023-10-27T11:00:00Z", "modifiedAt": "2023-10-27T11:00:00Z" } ``` -------------------------------- ### Search API Source: https://developers.smartsheet.com/api/smartsheet/openapi/discussions/row-discussions-create Search for specific sheets or across all accessible sheets. Note: First-time API users may experience a 24-hour provisioning delay. ```APIDOC ## GET /search ### Description Searches for a specific sheet or across all sheets that a user can access. ### Method GET ### Endpoint /search ### Parameters #### Query Parameters - **query** (string) - Required - The search query string. - **includeAll** (boolean) - Optional - If true, searches across all sheets the user can access. If false, searches only within the user's accessible sheets based on permissions. ### Response #### Success Response (200) - **results** (array) - A list of search results. - **sheet** (object) - Details of the sheet found. - **id** (integer) - The ID of the sheet. - **name** (string) - The name of the sheet. - **permalink** (string) - A direct link to the sheet. ### Response Example ```json { "results": [ { "sheet": { "id": 12345, "name": "Project Alpha", "permalink": "https://app.smartsheet.com/b/home?lx=..." } } ] } ``` ``` ```APIDOC ## GET /search/sheets/{sheetId} ### Description Searches within a specific sheet. ### Method GET ### Endpoint /search/sheets/{sheetId} ### Parameters #### Path Parameters - **sheetId** (integer) - Required - The ID of the sheet to search within. #### Query Parameters - **query** (string) - Required - The search query string. ### Response #### Success Response (200) - **results** (array) - A list of search results within the specified sheet. - **row** (object) - Details of the row matching the search criteria. - **id** (integer) - The ID of the row. - **text** (string) - The content of the row. ### Response Example ```json { "results": [ { "row": { "id": 67890, "text": "Task 1: Complete initial research" } } ] } ``` ```