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

Authorization

apiKey
headerAuthorizationBearer <snoze_sk_…>

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

Path Parameters

workspaceId*string

Request Body

application/json
  1. body
parentItemId?string|null
label*string
kind*string
Value in"file""provider"
file?|null
provider?|null
fields*array<>
titleFieldKey?string|null
clientMutationId?string|null

Response Body

Success

application/json
  1. response
data*
Example Request
curl -X POST 'https://api.snoze.dev/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"    }  ]}'
Example Response
{  "data": {    "databaseId": "string",    "itemId": "string",    "label": "string",    "fieldCount": 0,    "recordCount": 0,    "skippedRowCount": 0,    "sheetNameUsed": "string"  }}