> ## Documentation Index
> Fetch the complete documentation index at: https://www.klavis.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Initialize google_sheets sandbox with data

> Initialize the sandbox with google_sheets-specific data following the defined schema.



## OpenAPI

````yaml post /sandbox/google_sheets/{sandbox_id}/initialize
openapi: 3.1.0
info:
  title: Klavis AI (https://www.klavis.ai)
  description: Klavis AI - Open Source MCP Integrations for AI Applications
  version: 0.1.0
servers:
  - url: https://api.klavis.ai
    description: US Production server
  - url: https://api.eu.klavis.ai
    description: EU Production server
security: []
paths:
  /sandbox/google_sheets/{sandbox_id}/initialize:
    post:
      tags:
        - sandbox
      summary: Initialize google_sheets sandbox with data
      description: >-
        Initialize the sandbox with google_sheets-specific data following the
        defined schema.
      operationId: initialize_sandbox_sandbox_google_sheets__sandbox_id__initialize_post
      parameters:
        - name: sandbox_id
          in: path
          required: true
          schema:
            type: string
            description: The unique sandbox identifier
            title: Sandbox Id
          description: The unique sandbox identifier
        - name: init_default_data
          in: query
          required: false
          schema:
            type: boolean
            description: If true, use default test data for initialization
            default: false
            title: Init Default Data
          description: If true, use default test data for initialization
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/GoogleSheetsData-Input'
                - type: 'null'
              title: Request Body
            examples:
              default:
                summary: Example initialization data
                value:
                  spreadsheets:
                    - title: Sales Data 2025
                      sheets:
                        - title: Q1 Sales
                          index: 0
                          rowCount: 100
                          columnCount: 10
                          cells:
                            - row: 0
                              col: 0
                              value: Date
                            - row: 0
                              col: 1
                              value: Product
                            - row: 0
                              col: 2
                              value: Quantity
                            - row: 0
                              col: 3
                              value: Revenue
                            - row: 0
                              col: 4
                              value: Region
                            - row: 1
                              col: 0
                              value: '2025-01-15'
                            - row: 1
                              col: 1
                              value: Widget A
                            - row: 1
                              col: 2
                              value: 100
                            - row: 1
                              col: 3
                              value: 5000
                            - row: 1
                              col: 4
                              value: North America
                            - row: 2
                              col: 0
                              value: '2025-02-20'
                            - row: 2
                              col: 1
                              value: Widget B
                            - row: 2
                              col: 2
                              value: 150
                            - row: 2
                              col: 3
                              value: 7500
                            - row: 2
                              col: 4
                              value: Europe
                            - row: 3
                              col: 0
                              value: '2025-03-10'
                            - row: 3
                              col: 1
                              value: Widget A
                            - row: 3
                              col: 2
                              value: 200
                            - row: 3
                              col: 3
                              value: 10000
                            - row: 3
                              col: 4
                              value: Asia Pacific
                    - title: Customer Database
                      sheets:
                        - title: Customers
                          index: 0
                          rowCount: 100
                          columnCount: 8
                          cells:
                            - row: 0
                              col: 0
                              value: ID
                            - row: 0
                              col: 1
                              value: Company Name
                            - row: 0
                              col: 2
                              value: Contact Email
                            - row: 0
                              col: 3
                              value: Status
                            - row: 0
                              col: 4
                              value: Account Value
                            - row: 1
                              col: 0
                              value: 1
                            - row: 1
                              col: 1
                              value: Acme Corporation
                            - row: 1
                              col: 2
                              value: contact@acme.com
                            - row: 1
                              col: 3
                              value: Active
                            - row: 1
                              col: 4
                              value: 50000
                            - row: 2
                              col: 0
                              value: 2
                            - row: 2
                              col: 1
                              value: TechStart Inc
                            - row: 2
                              col: 2
                              value: info@techstart.com
                            - row: 2
                              col: 3
                              value: Active
                            - row: 2
                              col: 4
                              value: 75000
                            - row: 3
                              col: 0
                              value: 3
                            - row: 3
                              col: 1
                              value: Global Industries
                            - row: 3
                              col: 2
                              value: sales@global.com
                            - row: 3
                              col: 3
                              value: Pending
                            - row: 3
                              col: 4
                              value: 120000
                    - title: Project Tracker
                      sheets:
                        - title: Projects
                          index: 0
                          rowCount: 50
                          columnCount: 6
                          cells:
                            - row: 0
                              col: 0
                              value: Project Name
                            - row: 0
                              col: 1
                              value: Status
                            - row: 0
                              col: 2
                              value: Owner
                            - row: 0
                              col: 3
                              value: Deadline
                            - row: 0
                              col: 4
                              value: Progress
                            - row: 1
                              col: 0
                              value: Website Redesign
                            - row: 1
                              col: 1
                              value: In Progress
                            - row: 1
                              col: 2
                              value: John Doe
                            - row: 1
                              col: 3
                              value: '2025-04-30'
                            - row: 1
                              col: 4
                              value: 0.65
                            - row: 2
                              col: 0
                              value: Mobile App Development
                            - row: 2
                              col: 1
                              value: Planning
                            - row: 2
                              col: 2
                              value: Jane Smith
                            - row: 2
                              col: 3
                              value: '2025-06-15'
                            - row: 2
                              col: 4
                              value: 0.15
                            - row: 3
                              col: 0
                              value: API Integration
                            - row: 3
                              col: 1
                              value: Completed
                            - row: 3
                              col: 2
                              value: Bob Johnson
                            - row: 3
                              col: 3
                              value: '2025-01-31'
                            - row: 3
                              col: 4
                              value: 1
                        - title: Budget
                          index: 1
                          rowCount: 50
                          columnCount: 5
                          cells:
                            - row: 0
                              col: 0
                              value: Category
                            - row: 0
                              col: 1
                              value: Allocated
                            - row: 0
                              col: 2
                              value: Spent
                            - row: 0
                              col: 3
                              value: Remaining
                            - row: 1
                              col: 0
                              value: Development
                            - row: 1
                              col: 1
                              value: 100000
                            - row: 1
                              col: 2
                              value: 65000
                            - row: 1
                              col: 3
                              formula: '=B2-C2'
                            - row: 2
                              col: 0
                              value: Design
                            - row: 2
                              col: 1
                              value: 30000
                            - row: 2
                              col: 2
                              value: 22000
                            - row: 2
                              col: 3
                              formula: '=B3-C3'
                            - row: 3
                              col: 0
                              value: Marketing
                            - row: 3
                              col: 1
                              value: 50000
                            - row: 3
                              col: 2
                              value: 38000
                            - row: 3
                              col: 3
                              formula: '=B4-C4'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InitializeSandboxResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    GoogleSheetsData-Input:
      properties:
        spreadsheets:
          anyOf:
            - items:
                $ref: '#/components/schemas/GoogleSheetsSpreadsheet-Input'
              type: array
            - type: 'null'
          title: Spreadsheets
          description: List of Google Sheets spreadsheets
      type: object
      title: GoogleSheetsData
      description: Complete Google Sheets sandbox data structure
    InitializeSandboxResponse:
      properties:
        sandbox_id:
          type: string
          title: Sandbox Id
          description: Sandbox identifier
        status:
          $ref: '#/components/schemas/SandboxStatus'
          description: Current status
        message:
          type: string
          title: Message
          description: Initialization result message
      type: object
      required:
        - sandbox_id
        - status
        - message
      title: InitializeSandboxResponse
      description: Response model for sandbox initialization
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    GoogleSheetsSpreadsheet-Input:
      properties:
        title:
          type: string
          title: Title
          description: Spreadsheet title
        sheets:
          anyOf:
            - items:
                $ref: '#/components/schemas/GoogleSheetsSheet'
              type: array
            - type: 'null'
          title: Sheets
          description: List of sheets in the spreadsheet
      type: object
      required:
        - title
      title: GoogleSheetsSpreadsheet
      description: Google Sheets spreadsheet object
    SandboxStatus:
      type: string
      enum:
        - idle
        - occupied
        - error
      title: SandboxStatus
      description: Status of a sandbox instance - matches database enum
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    GoogleSheetsSheet:
      properties:
        title:
          type: string
          minLength: 1
          title: Title
          description: Sheet title
        index:
          anyOf:
            - type: integer
            - type: 'null'
          title: Index
          description: Sheet index position
        rowCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Rowcount
          description: Number of rows in the sheet
        columnCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Columncount
          description: Number of columns in the sheet
        cells:
          anyOf:
            - items:
                $ref: '#/components/schemas/GoogleSheetsCell'
              type: array
            - type: 'null'
          title: Cells
          description: List of cells with data
      type: object
      required:
        - title
      title: GoogleSheetsSheet
      description: A sheet within a spreadsheet
    GoogleSheetsCell:
      properties:
        row:
          type: integer
          title: Row
          description: Row index (0-based)
        col:
          type: integer
          title: Col
          description: Column index (0-based)
        value:
          anyOf:
            - type: string
            - type: integer
            - type: number
            - type: boolean
            - type: 'null'
          title: Value
          description: Cell value (string, number, boolean, or null)
        formula:
          anyOf:
            - type: string
            - type: 'null'
          title: Formula
          description: Formula if the cell contains one (e.g., '=A1+B1')
      type: object
      required:
        - row
        - col
      title: GoogleSheetsCell
      description: A single cell with its position and value
  securitySchemes:
    HTTPBearer:
      type: http
      description: Your Klavis AI API key.
      scheme: bearer
      x-fern-bearer:
        name: api_key

````