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

# Initialize microsoft_teams sandbox with data

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

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

- MsTeamsDataInput — Complete Microsoft Teams sandbox data structure
  - `team_channels` TeamsChannel[], nullable — List of team channels
    - `channel_id` string, nullable — Channel ID (read-only, set by Teams)
    - `name` string, required — Channel display name
    - `channel_description` string, nullable — Channel description
    - `channel_messages` TeamsMessage[], nullable — List of messages in the channel
      - `message_id` string, nullable — Message ID (read-only, set by Teams)
      - `content` string, required — Message content
  - `team_chats` TeamsChat[], nullable — List of one-on-one chats
    - `chat_id` string, nullable — Chat ID (read-only, set by Teams)
    - `chat_members` TeamsChatMember[], nullable — List of chat members
      - `member_id` string, nullable — Member ID (read-only, set by Teams)
      - `member_name` string, nullable — Member display name
      - `member_email` string, nullable — User email for creating chats
    - `chat_messages` TeamsMessage[], nullable — List of messages in the chat
      - `message_id` string, nullable — Message ID (read-only, set by Teams)
      - `content` string, required — Message 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/revisions/1f05ced7280f/schema)
