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

# Initialize motion sandbox with data

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

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

- MotionDataInput — Complete Motion sandbox data structure. Hierarchical structure for initialization: - Workspaces contain Projects - Projects contain Tasks - Tasks contain Comments Delete operation support: - Tasks: YES - Comments: YES - Projects: YES - Workspaces: NO (organization level, typically not deleted)
  - `workspaces` MotionWorkspaceInput[] — List of workspaces with their projects and tasks
    - `name` string, required — Workspace name
    - `projects` MotionProjectInput[], nullable — Projects in this workspace
      - `name` string, required — Project name
      - `description` string, nullable — Project description
      - `due_date` string, nullable — Project due date in ISO 8601 format
      - `priority` string, nullable — Project priority: ASAP, HIGH, MEDIUM, or LOW
      - `labels` string[], nullable — Project labels
      - `tasks` MotionTaskInput[], nullable — Tasks in this project
        - `name` string, required — Task name/title
        - `description` string, nullable — Task description (supports Markdown)
        - `status` string, nullable — Task status (e.g., 'TODO', 'IN_PROGRESS', 'COMPLETED')
        - `priority` string, nullable — Task priority: ASAP, HIGH, MEDIUM, or LOW
        - `due_date` string, nullable — Due date in ISO 8601 format
        - `duration` integer, nullable — Estimated duration in minutes
        - `labels` string[], nullable — Task labels for categorization
        - `comments` MotionCommentInput[], nullable — Comments on this task
          - `text` string, required — Comment text content

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