SnozeDevelopers
API referenceData sources

Import a spreadsheet into a new database

Parses an uploaded or provider-hosted spreadsheet once and creates a database with the mapped fields and rows, returning the created database with its field, record, and skipped-row counts. Requires `databases:write`, plus `files:read` when importing an uploaded file. Malformed or oversized workbooks are rejected as validation errors; passing a `clientMutationId` makes the import replay-safe, and reusing one while its import is still running, or with different input, is reported as an in-progress or conflicting-mutation error. Send an `Idempotency-Key` header to make retries safe; a replay within the window returns the original response.

POST
/v1/workspaces/{workspaceId}/data-sources/import-spreadsheet
AuthorizationBearer <token>

Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.

In: header

Path Parameters

workspaceId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/workspaces/string/data-sources/import-spreadsheet" \  -H "Content-Type: application/json" \  -d '{    "label": "string",    "kind": "file",    "fields": [      {        "sourcePath": "string",        "fieldKey": "string",        "label": "string",        "kind": "text"      }    ]  }'
{  "data": {    "databaseId": "string",    "itemId": "string",    "label": "string",    "fieldCount": 0,    "recordCount": 0,    "skippedRowCount": 0,    "sheetNameUsed": "string"  }}