Grist Octri Preview
POST/workspaces/{workspaceId}/import

Import an existing document

Imports an existing document into a workspace. Provide the .grist file in upload and use documentName to set the imported document's name.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 2 body fields
workspaceIdintegerrequired
The integer identifier of the workspace where you want to import the document.

Settings and file contents for the document to import.

documentNamestringoptional
The name for the imported document.
uploadstringoptional
Contents of a .grist file, as a standard multipart/form-data file entry

1 status code
200Returns an object containing the unique identifier of the imported document.
idstringoptional
a unique identifier for the document

Error handling

The workspaceId path parameter must be an integer that identifies an existing workspace. upload must be a multipart file entry containing the contents of a .grist file; if provided, documentName must be a string.