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

# Initialize supabase sandbox with data

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

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

- SupabaseDataInput — Complete Supabase sandbox data structure
  - `projects` SupabaseProject[] — List of Supabase projects
    - `id` string, nullable — Project ID (read-only, set by Supabase)
    - `name` string, required — Project name
    - `tables` SupabaseTable[], nullable — List of tables in the project
      - `name` string, required — Table name
      - `columns` object, required — Table schema mapping column names to types
      - `rows` object[], nullable — Table data rows

## 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

## Changes

- **2026-02-09** `522418a391e5` — 1 warning
  - removed the optional property `records_created` from the response with the `200` status

[Change history](https://skmtc.dev/klavis-ai/apis/klavis-ai-https-www-klavis-ai/changes/sandbox/supabase/:sandbox_id/initialize/post.md)

---

[API](https://skmtc.dev/klavis-ai/apis/klavis-ai-https-www-klavis-ai.md) · [All operations](https://skmtc.dev/klavis-ai/apis/klavis-ai-https-www-klavis-ai/llms.txt) · [OpenAPI document](https://skmtc.dev/klavis-ai/apis/klavis-ai-https-www-klavis-ai/revisions/1f05ced7280f?raw)
