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

# Initialize airtable sandbox with data

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

Initialize the sandbox with airtable-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

- AirtableDataInput — Complete Airtable sandbox data structure. Hierarchy: - Bases contain Tables - Tables contain Fields (schema) and Records (data) - Records contain field values Note: For sandbox purposes, we typically work with a single base and multiple tables within it.
  - `tables` AirtableTableInput[], nullable — List of tables (simplified, assumes single base)
    - `name` string, required — Table name
    - `description` string, nullable — Table description
    - `fields` AirtableFieldInput[], nullable — Field definitions for this table
      - `name` string, required — Field name
      - `type` string, required — Field type (singleLineText, multilineText, number, singleSelect, multipleSelects, date, checkbox, url, email, phoneNumber, attachment, etc.)
      - `options` object, nullable — Field options (e.g., choices for select fields)
    - `records` AirtableRecordInput[], nullable — Records in this table
      - `fields` object, required — Dictionary of field names to values

## 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/revisions/1f05ced7280f/schema)
