---
title: "POST /api/v1/google-workspace/imports"
method: POST
path: "/api/v1/google-workspace/imports"
tags: ["Google Workspace"]
---

# POST /api/v1/google-workspace/imports

`POST /api/v1/google-workspace/imports`

## Request

- Base URL: `https://api.korala.ai`
- URL: `https://api.korala.ai/api/v1/google-workspace/imports`
- Auth: one of:
  - API key in header `X-API-Key`
  - `bearer` (a scheme the document does not define)

## Request body

- GoogleImportRequestDto
  - `sandbox` boolean: Dashboard mode. API keys always use their authenticated mode.
  - `collectionIds` string[]: Explicit destination collections. Omission or [] leaves the resource unassigned.
  - `connectionId` string, required
  - `fileId` string, required
  - `target` 'document' | 'template', required
  - `name` string, required
  - `idempotencyKey` string, required: Unique per connection owner. Reusing a key with different input returns 409.

## Response `202`

Durable import accepted. Poll GET /google-workspace/imports/{id}.

- GoogleImportDto
  - `collectionIds` string[]
  - `id` string, required
  - `target` 'document' | 'template', required
  - `name` string, required
  - `sandbox` boolean, required
  - `status` 'queued' | 'processing' | 'awaiting_values' | 'ready' | 'completed' | 'failed', required
  - `variables` GoogleVariableDto[], required
    - `name` string, required
    - `occurrences` number, required
  - `provenance` GoogleProvenanceDto
    - `fileId` string, required
    - `name` string, required
    - `url` string, required
    - `mimeType` string, required
    - `driveVersion` string, required
    - `docsRevision` string
    - `tabCount` number
    - `skipEmptyPages` boolean: Whether conversion suppresses automatic blank parity pages. Absent on older imports, which retain their original pagination.
    - `fetchedAt` string, required
    - `locallyReplacedAt` string: First local file replacement. When present, this provenance describes the original import, not the current template file. Google variable validation no longer applies; the saved pagination policy is retained.
    - `sourceSha256` string, required: SHA-256 of the stored source, after DOCX ZIP normalization.
    - `providerSourceSha256` string: SHA-256 of the original bytes downloaded from Google.
    - `pdfSha256` string, required
    - `dialect` 'korala-simple-v1', required
  - `previewUrl` string
  - `reviewHash` string
  - `documentId` string
  - `templateId` string
  - `errorCode` string

---

[API](https://skmtc.dev/korala/apis/korala-public-api.md) · [All operations](https://skmtc.dev/korala/apis/korala-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/korala/apis/korala-public-api/revisions/5c4d7810c507?raw)
