---
title: "Initialize google_drive sandbox with data"
method: POST
path: "/sandbox/google_drive/{sandbox_id}/initialize"
tags: ["sandbox"]
---

# Initialize google_drive sandbox with data

`POST /sandbox/google_drive/{sandbox_id}/initialize`

Initialize the sandbox with google_drive-specific data following the defined schema.

## Path parameters

- `sandbox_id` string, required — The unique sandbox identifier

## Query parameters

- `init_default_data` boolean — If true, use default test data for initialization

## Request body

- GoogleDriveData — Complete Google Drive sandbox data structure
  - `files` GoogleDriveFile[], nullable — List of Google Drive files and folders
    - `name` string, required — Name of the file or folder (required)
    - `mimeType` string, required — MIME type of the file (required). Use 'application/vnd.google-apps.folder' for folders
    - `description` string, nullable — Description of the file
    - `parents` string[], nullable — List of parent folder IDs
    - `content` string, nullable — Text content for Google Docs documents

## Response `200`

Successful Response

- InitializeSandboxResponse — Response model for sandbox initialization
  - `sandbox_id` string, required — Sandbox identifier
  - `status` 'idle' | 'occupied' | 'error', required — Status of a sandbox instance - matches database enum
  - `message` string, required — Initialization result message

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/klavis-ai/apis/klavis-ai-https-www-klavis-ai.md) · [All operations](https://skmtc.net/klavis-ai/apis/klavis-ai-https-www-klavis-ai/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/klavis-ai/klavis-ai-https-www-klavis-ai/versions/1f05ced7280f/schema)
