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

# Initialize asana sandbox with data

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

## Request

- Base URL: `https://api.klavis.ai`
- URL: `https://api.klavis.ai/sandbox/asana/{sandbox_id}/initialize`
- Auth: HTTP bearer

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

- AsanaDataInput: Complete Asana sandbox data structure. Nested hierarchy for initialization: - Projects contain Tasks - Tasks contain Stories (comments)
  - `projects` AsanaProjectInput[], nullable: List of projects with nested tasks and stories
    - `gid` string, nullable: Project GID (read-only, set by Asana)
    - `name` string, required: Project name
    - `description` string, nullable: Project description
    - `tasks` AsanaTaskInput[], nullable: Tasks in this project
      - `gid` string, nullable: Globally unique identifier of the resource (read-only, set by Asana)
      - `name` string, required: Task name
      - `description` string, nullable: Task description
      - `completed` boolean, nullable: Whether task is completed
      - `assignee` string, nullable: User GID assigned to task
      - `due_date` string, nullable: Due date (YYYY-MM-DD)
      - `due_datetime` string, nullable: Due datetime (ISO 8601)
      - `start_date` string, nullable: Start date (YYYY-MM-DD)
      - `stories` AsanaStoryInput[], nullable: Stories (comments) on this task
        - `gid` string, nullable: Story GID (read-only, set by Asana)
        - `text` string, required: Story text/comment 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

## Changes

- **2026-02-09** `522418a391e5`: 1 warning
  - removed the optional property `records_created` from the response with the `200` status
- **2026-02-08** `d70b82139caa`: 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
- **2026-01-31** `4457a0cdcfab`: 1 warning
  - added the new `error` enum value to the `status` response property for the response status `200`

[Operation history](https://skmtc.dev/klavis-ai/apis/klavis-ai-https-www-klavis-ai/changes/sandbox/asana/: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)
