Skip to navigation

Create a workbook

View as Markdown

This endpoint lets you create an empty workbook in Sigma, letting you start a data analysis project or report without any pre-existing templates or data sources set up.

Usage notes

  • The name parameter is required to provide a name for the new workbook.
  • Use the folderId to specify the folder in which to save the workbook. Retrieve the folderId by calling the /v2/files endpoint and reviewing the id field in the response for files with a type of folder.

Usage scenarios

  • Project initialization: When starting a new project that requires data analysis or reporting, users can quickly generate a new blank workbook to begin structuring their data and analyses.
  • Template preparation: Administrators or team leads might create blank workbooks to set up standardized templates that their teams can use to maintain consistency in data handling and reporting.

Best practices

  • Naming conventions: Establish and follow consistent naming conventions for workbooks to make it easier to manage and identify them within larger projects.
  • Folder organization: Use the folderId to organize workbooks into relevant folders, which helps in maintaining a tidy workspace, especially in environments with multiple users or teams.
  • Access control: Regularly review and manage access permissions for new workbooks, ensuring that only the appropriate personnel can view or edit sensitive data.

Create a workbook from a code representation (Beta)

Beta: This documentation describes a public beta feature and is subject to the Beta features disclaimer.

You can use this endpoint to create a new workbook in Sigma based on a code representation. This allows you to programmatically define the contents of the workbook, which is then accessible from the Sigma UI.

To define elements, data sources, layouts, actions, and more, populate the contents parameter in the request body with a code representation. For more information, see Manage workbooks as code.

Usage notes for the code representation of a workbook

  • The default response format is JSON. To use YAML, add the header Accept: application/yaml.
  • To retrieve the current representation of a workbook, use GET /workbooks/{workbookId}?includeContents=true.

Authentication

AuthorizationBearer

OAuth authentication of the form <token>.

Request

The request body.
folderIdstringRequired
ID of the folder where the new workbook is created.
namestringRequired
Name of the new workbook.
descriptionstringOptional
Description of the workbook.
ownerIdstringOptional

ID of the user (member) to own the workbook.

contentsobjectOptional

The code representation of the workbook to write: its pages, elements, columns, sources, layout, and theme. (Beta)

Beta: This documentation describes a public beta feature and is subject to the Beta features disclaimer.

dryRunbooleanOptional

When true, validates the workbook contents without creating the workbook. (Beta)

Response

The response body.
Workbook metadataobject
The metadata for the newly created workbook.
OR
Successful dry runobject

When dryRun is true, the metadata for the workbook that would be created. Fields that only exist once a workbook is persisted are null. (Beta)

Errors

400
Bad Request Error