Skip to main content
POST
/
sandbox
/
microsoft_teams
/
{sandbox_id}
/
initialize
Initialize microsoft_teams sandbox with data
curl --request POST \
  --url https://api.klavis.ai/sandbox/microsoft_teams/{sandbox_id}/initialize \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "team_channels": [
    {
      "name": "Engineering",
      "channel_description": "Channel for engineering team discussions",
      "channel_messages": [
        {
          "content": "Welcome to the Engineering channel! This is where we discuss technical topics and share updates."
        },
        {
          "content": "Reminder: Code review sessions every Tuesday at 10 AM"
        },
        {
          "content": "New deployment pipeline is ready for testing. Please check the documentation in our wiki."
        }
      ]
    },
    {
      "name": "Marketing",
      "channel_description": "Channel for marketing campaigns and strategies",
      "channel_messages": [
        {
          "content": "Q4 campaign planning meeting scheduled for next week"
        },
        {
          "content": "Great job on the recent product launch! The social media engagement exceeded our targets by 40%"
        }
      ]
    },
    {
      "name": "Project Alpha",
      "channel_description": "Dedicated channel for Project Alpha collaboration",
      "channel_messages": [
        {
          "content": "Project kickoff meeting notes: https://docs.example.com/project-alpha/kickoff"
        },
        {
          "content": "Phase 1 milestone completed! Moving to Phase 2 next sprint."
        },
        {
          "content": "Updated timeline shared in the files tab. Please review and provide feedback by EOW."
        }
      ]
    }
  ],
  "team_chats": []
}
'
import requests

url = "https://api.klavis.ai/sandbox/microsoft_teams/{sandbox_id}/initialize"

payload = {
"team_channels": [
{
"name": "Engineering",
"channel_description": "Channel for engineering team discussions",
"channel_messages": [{ "content": "Welcome to the Engineering channel! This is where we discuss technical topics and share updates." }, { "content": "Reminder: Code review sessions every Tuesday at 10 AM" }, { "content": "New deployment pipeline is ready for testing. Please check the documentation in our wiki." }]
},
{
"name": "Marketing",
"channel_description": "Channel for marketing campaigns and strategies",
"channel_messages": [{ "content": "Q4 campaign planning meeting scheduled for next week" }, { "content": "Great job on the recent product launch! The social media engagement exceeded our targets by 40%" }]
},
{
"name": "Project Alpha",
"channel_description": "Dedicated channel for Project Alpha collaboration",
"channel_messages": [{ "content": "Project kickoff meeting notes: https://docs.example.com/project-alpha/kickoff" }, { "content": "Phase 1 milestone completed! Moving to Phase 2 next sprint." }, { "content": "Updated timeline shared in the files tab. Please review and provide feedback by EOW." }]
}
],
"team_chats": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
team_channels: [
{
name: 'Engineering',
channel_description: 'Channel for engineering team discussions',
channel_messages: [
{
content: 'Welcome to the Engineering channel! This is where we discuss technical topics and share updates.'
},
{content: 'Reminder: Code review sessions every Tuesday at 10 AM'},
{
content: 'New deployment pipeline is ready for testing. Please check the documentation in our wiki.'
}
]
},
{
name: 'Marketing',
channel_description: 'Channel for marketing campaigns and strategies',
channel_messages: [
{content: 'Q4 campaign planning meeting scheduled for next week'},
{
content: 'Great job on the recent product launch! The social media engagement exceeded our targets by 40%'
}
]
},
{
name: 'Project Alpha',
channel_description: 'Dedicated channel for Project Alpha collaboration',
channel_messages: [
{
content: 'Project kickoff meeting notes: https://docs.example.com/project-alpha/kickoff'
},
{content: 'Phase 1 milestone completed! Moving to Phase 2 next sprint.'},
{
content: 'Updated timeline shared in the files tab. Please review and provide feedback by EOW.'
}
]
}
],
team_chats: []
})
};

fetch('https://api.klavis.ai/sandbox/microsoft_teams/{sandbox_id}/initialize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
team_channels: [
{
name: 'Engineering',
channel_description: 'Channel for engineering team discussions',
channel_messages: [
{
content: 'Welcome to the Engineering channel! This is where we discuss technical topics and share updates.'
},
{content: 'Reminder: Code review sessions every Tuesday at 10 AM'},
{
content: 'New deployment pipeline is ready for testing. Please check the documentation in our wiki.'
}
]
},
{
name: 'Marketing',
channel_description: 'Channel for marketing campaigns and strategies',
channel_messages: [
{content: 'Q4 campaign planning meeting scheduled for next week'},
{
content: 'Great job on the recent product launch! The social media engagement exceeded our targets by 40%'
}
]
},
{
name: 'Project Alpha',
channel_description: 'Dedicated channel for Project Alpha collaboration',
channel_messages: [
{
content: 'Project kickoff meeting notes: https://docs.example.com/project-alpha/kickoff'
},
{content: 'Phase 1 milestone completed! Moving to Phase 2 next sprint.'},
{
content: 'Updated timeline shared in the files tab. Please review and provide feedback by EOW.'
}
]
}
],
team_chats: []
})
};

fetch('https://api.klavis.ai/sandbox/microsoft_teams/{sandbox_id}/initialize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
  "sandbox_id": "<string>",
  "message": "<string>"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Authorizations

Authorization
string
header
required

Your Klavis AI API key.

Path Parameters

sandbox_id
string
required

The unique sandbox identifier

Query Parameters

init_default_data
boolean
default:false

If true, use default test data for initialization

Body

application/json

Complete Microsoft Teams sandbox data structure

team_channels
TeamsChannel · object[] | null

List of team channels

team_chats
TeamsChat · object[] | null

List of one-on-one chats

Response

Successful Response

Response model for sandbox initialization

sandbox_id
string
required

Sandbox identifier

status
enum<string>
required

Current status

Available options:
idle,
occupied,
error
message
string
required

Initialization result message