Skip to main content
POST
/
sandbox
/
google_sheets
/
{sandbox_id}
/
initialize
Initialize google_sheets sandbox with data
curl --request POST \
  --url https://api.klavis.ai/sandbox/google_sheets/{sandbox_id}/initialize \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "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": "[email protected]"
            },
            {
              "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": "[email protected]"
            },
            {
              "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": "[email protected]"
            },
            {
              "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"
            }
          ]
        }
      ]
    }
  ]
}
'
{
  "sandbox_id": "<string>",
  "status": "idle",
  "message": "<string>",
  "records_created": {}
}

Authorizations

Authorization
string
header
required

Your Klavis AI API key.

Path Parameters

sandbox_id
string
required

The unique sandbox identifier

Query Parameters

init_default_data
boolean
default:false

If true, use default test data for initialization

Body

application/json

Complete Google Sheets sandbox data structure

spreadsheets
GoogleSheetsSpreadsheet · object[] | null

List of Google Sheets spreadsheets

Response

Successful Response

Response model for sandbox initialization

sandbox_id
string
required

Sandbox identifier

status
enum<string>
required

Current status

Available options:
idle,
occupied,
error
message
string
required

Initialization result message

records_created
Records Created · object

Count of records created per object type