Initialize outlook_mail sandbox with data
curl --request POST \
--url https://api.klavis.ai/sandbox/outlook_mail/{sandbox_id}/initialize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"messages": [
{
"title": "Welcome to the Team!",
"content": {
"contentType": "HTML",
"content": "<p>Hi there!</p><p>Welcome to our team. We're excited to have you on board. Please feel free to reach out if you have any questions.</p><p>Best regards,<br>HR Team</p>"
},
"to_addresses": [
"newemployee@company.com"
],
"cc_addresses": [
"hr@company.com",
"manager@company.com"
]
},
{
"title": "Q4 Budget Review Meeting",
"content": {
"contentType": "Text",
"content": "Hi,\n\nThis is a reminder about our Q4 budget review meeting scheduled for next Tuesday at 2 PM. Please come prepared with your department's spending reports.\n\nThanks,\nFinance Team"
},
"to_addresses": [
"team@company.com"
],
"cc_addresses": [
"cfo@company.com"
]
},
{
"title": "Project Alpha - Status Update",
"content": {
"contentType": "HTML",
"content": "<h3>Project Alpha Status Report</h3><p>Current Status: <strong>On Track</strong></p><ul><li>Phase 1: Completed</li><li>Phase 2: 75% complete</li><li>Phase 3: Planning</li></ul><p>Next milestone: December 15th</p>"
},
"to_addresses": [
"projectteam@company.com",
"stakeholders@company.com"
],
"cc_addresses": []
},
{
"title": "Action Required: Security Policy Update",
"content": {
"contentType": "Text",
"content": "IMPORTANT: Please review and acknowledge the updated security policy by end of week.\n\nKey changes:\n- Password complexity requirements\n- 2FA mandatory for all accounts\n- VPN usage guidelines\n\nClick the link in your security portal to acknowledge.\n\nIT Security Team"
},
"to_addresses": [
"allstaff@company.com"
],
"cc_addresses": [
"compliance@company.com",
"legal@company.com"
]
},
{
"title": "Team Lunch - Friday 12:30 PM",
"content": {
"contentType": "HTML",
"content": "<p>Hey team! </p><p>Let's grab lunch together this Friday at 12:30 PM. I've made a reservation at the Italian place downtown.</p><p>Please RSVP by Wednesday so I can confirm the headcount.</p><p>Looking forward to it!<br>Sarah</p>"
},
"to_addresses": [
"dev-team@company.com"
],
"cc_addresses": [
"sarah.manager@company.com"
]
}
]
}
EOFimport requests
url = "https://api.klavis.ai/sandbox/outlook_mail/{sandbox_id}/initialize"
payload = { "messages": [
{
"title": "Welcome to the Team!",
"content": {
"contentType": "HTML",
"content": "<p>Hi there!</p><p>Welcome to our team. We're excited to have you on board. Please feel free to reach out if you have any questions.</p><p>Best regards,<br>HR Team</p>"
},
"to_addresses": ["newemployee@company.com"],
"cc_addresses": ["hr@company.com", "manager@company.com"]
},
{
"title": "Q4 Budget Review Meeting",
"content": {
"contentType": "Text",
"content": "Hi,
This is a reminder about our Q4 budget review meeting scheduled for next Tuesday at 2 PM. Please come prepared with your department's spending reports.
Thanks,
Finance Team"
},
"to_addresses": ["team@company.com"],
"cc_addresses": ["cfo@company.com"]
},
{
"title": "Project Alpha - Status Update",
"content": {
"contentType": "HTML",
"content": "<h3>Project Alpha Status Report</h3><p>Current Status: <strong>On Track</strong></p><ul><li>Phase 1: Completed</li><li>Phase 2: 75% complete</li><li>Phase 3: Planning</li></ul><p>Next milestone: December 15th</p>"
},
"to_addresses": ["projectteam@company.com", "stakeholders@company.com"],
"cc_addresses": []
},
{
"title": "Action Required: Security Policy Update",
"content": {
"contentType": "Text",
"content": "IMPORTANT: Please review and acknowledge the updated security policy by end of week.
Key changes:
- Password complexity requirements
- 2FA mandatory for all accounts
- VPN usage guidelines
Click the link in your security portal to acknowledge.
IT Security Team"
},
"to_addresses": ["allstaff@company.com"],
"cc_addresses": ["compliance@company.com", "legal@company.com"]
},
{
"title": "Team Lunch - Friday 12:30 PM",
"content": {
"contentType": "HTML",
"content": "<p>Hey team! </p><p>Let's grab lunch together this Friday at 12:30 PM. I've made a reservation at the Italian place downtown.</p><p>Please RSVP by Wednesday so I can confirm the headcount.</p><p>Looking forward to it!<br>Sarah</p>"
},
"to_addresses": ["dev-team@company.com"],
"cc_addresses": ["sarah.manager@company.com"]
}
] }
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({
messages: [
{
title: 'Welcome to the Team!',
content: {
contentType: 'HTML',
content: '<p>Hi there!</p><p>Welcome to our team. We\'re excited to have you on board. Please feel free to reach out if you have any questions.</p><p>Best regards,<br>HR Team</p>'
},
to_addresses: ['newemployee@company.com'],
cc_addresses: ['hr@company.com', 'manager@company.com']
},
{
title: 'Q4 Budget Review Meeting',
content: {
contentType: 'Text',
content: 'Hi,\n\nThis is a reminder about our Q4 budget review meeting scheduled for next Tuesday at 2 PM. Please come prepared with your department\'s spending reports.\n\nThanks,\nFinance Team'
},
to_addresses: ['team@company.com'],
cc_addresses: ['cfo@company.com']
},
{
title: 'Project Alpha - Status Update',
content: {
contentType: 'HTML',
content: '<h3>Project Alpha Status Report</h3><p>Current Status: <strong>On Track</strong></p><ul><li>Phase 1: Completed</li><li>Phase 2: 75% complete</li><li>Phase 3: Planning</li></ul><p>Next milestone: December 15th</p>'
},
to_addresses: ['projectteam@company.com', 'stakeholders@company.com'],
cc_addresses: []
},
{
title: 'Action Required: Security Policy Update',
content: {
contentType: 'Text',
content: 'IMPORTANT: Please review and acknowledge the updated security policy by end of week.\n\nKey changes:\n- Password complexity requirements\n- 2FA mandatory for all accounts\n- VPN usage guidelines\n\nClick the link in your security portal to acknowledge.\n\nIT Security Team'
},
to_addresses: ['allstaff@company.com'],
cc_addresses: ['compliance@company.com', 'legal@company.com']
},
{
title: 'Team Lunch - Friday 12:30 PM',
content: {
contentType: 'HTML',
content: '<p>Hey team! </p><p>Let\'s grab lunch together this Friday at 12:30 PM. I\'ve made a reservation at the Italian place downtown.</p><p>Please RSVP by Wednesday so I can confirm the headcount.</p><p>Looking forward to it!<br>Sarah</p>'
},
to_addresses: ['dev-team@company.com'],
cc_addresses: ['sarah.manager@company.com']
}
]
})
};
fetch('https://api.klavis.ai/sandbox/outlook_mail/{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({
messages: [
{
title: 'Welcome to the Team!',
content: {
contentType: 'HTML',
content: '<p>Hi there!</p><p>Welcome to our team. We\'re excited to have you on board. Please feel free to reach out if you have any questions.</p><p>Best regards,<br>HR Team</p>'
},
to_addresses: ['newemployee@company.com'],
cc_addresses: ['hr@company.com', 'manager@company.com']
},
{
title: 'Q4 Budget Review Meeting',
content: {
contentType: 'Text',
content: 'Hi,\n\nThis is a reminder about our Q4 budget review meeting scheduled for next Tuesday at 2 PM. Please come prepared with your department\'s spending reports.\n\nThanks,\nFinance Team'
},
to_addresses: ['team@company.com'],
cc_addresses: ['cfo@company.com']
},
{
title: 'Project Alpha - Status Update',
content: {
contentType: 'HTML',
content: '<h3>Project Alpha Status Report</h3><p>Current Status: <strong>On Track</strong></p><ul><li>Phase 1: Completed</li><li>Phase 2: 75% complete</li><li>Phase 3: Planning</li></ul><p>Next milestone: December 15th</p>'
},
to_addresses: ['projectteam@company.com', 'stakeholders@company.com'],
cc_addresses: []
},
{
title: 'Action Required: Security Policy Update',
content: {
contentType: 'Text',
content: 'IMPORTANT: Please review and acknowledge the updated security policy by end of week.\n\nKey changes:\n- Password complexity requirements\n- 2FA mandatory for all accounts\n- VPN usage guidelines\n\nClick the link in your security portal to acknowledge.\n\nIT Security Team'
},
to_addresses: ['allstaff@company.com'],
cc_addresses: ['compliance@company.com', 'legal@company.com']
},
{
title: 'Team Lunch - Friday 12:30 PM',
content: {
contentType: 'HTML',
content: '<p>Hey team! </p><p>Let\'s grab lunch together this Friday at 12:30 PM. I\'ve made a reservation at the Italian place downtown.</p><p>Please RSVP by Wednesday so I can confirm the headcount.</p><p>Looking forward to it!<br>Sarah</p>'
},
to_addresses: ['dev-team@company.com'],
cc_addresses: ['sarah.manager@company.com']
}
]
})
};
fetch('https://api.klavis.ai/sandbox/outlook_mail/{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": {}
}
]
}Outlook Mail
Initialize outlook_mail sandbox with data
Initialize the sandbox with outlook_mail-specific data following the defined schema.
POST
/
sandbox
/
outlook_mail
/
{sandbox_id}
/
initialize
Initialize outlook_mail sandbox with data
curl --request POST \
--url https://api.klavis.ai/sandbox/outlook_mail/{sandbox_id}/initialize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"messages": [
{
"title": "Welcome to the Team!",
"content": {
"contentType": "HTML",
"content": "<p>Hi there!</p><p>Welcome to our team. We're excited to have you on board. Please feel free to reach out if you have any questions.</p><p>Best regards,<br>HR Team</p>"
},
"to_addresses": [
"newemployee@company.com"
],
"cc_addresses": [
"hr@company.com",
"manager@company.com"
]
},
{
"title": "Q4 Budget Review Meeting",
"content": {
"contentType": "Text",
"content": "Hi,\n\nThis is a reminder about our Q4 budget review meeting scheduled for next Tuesday at 2 PM. Please come prepared with your department's spending reports.\n\nThanks,\nFinance Team"
},
"to_addresses": [
"team@company.com"
],
"cc_addresses": [
"cfo@company.com"
]
},
{
"title": "Project Alpha - Status Update",
"content": {
"contentType": "HTML",
"content": "<h3>Project Alpha Status Report</h3><p>Current Status: <strong>On Track</strong></p><ul><li>Phase 1: Completed</li><li>Phase 2: 75% complete</li><li>Phase 3: Planning</li></ul><p>Next milestone: December 15th</p>"
},
"to_addresses": [
"projectteam@company.com",
"stakeholders@company.com"
],
"cc_addresses": []
},
{
"title": "Action Required: Security Policy Update",
"content": {
"contentType": "Text",
"content": "IMPORTANT: Please review and acknowledge the updated security policy by end of week.\n\nKey changes:\n- Password complexity requirements\n- 2FA mandatory for all accounts\n- VPN usage guidelines\n\nClick the link in your security portal to acknowledge.\n\nIT Security Team"
},
"to_addresses": [
"allstaff@company.com"
],
"cc_addresses": [
"compliance@company.com",
"legal@company.com"
]
},
{
"title": "Team Lunch - Friday 12:30 PM",
"content": {
"contentType": "HTML",
"content": "<p>Hey team! </p><p>Let's grab lunch together this Friday at 12:30 PM. I've made a reservation at the Italian place downtown.</p><p>Please RSVP by Wednesday so I can confirm the headcount.</p><p>Looking forward to it!<br>Sarah</p>"
},
"to_addresses": [
"dev-team@company.com"
],
"cc_addresses": [
"sarah.manager@company.com"
]
}
]
}
EOFimport requests
url = "https://api.klavis.ai/sandbox/outlook_mail/{sandbox_id}/initialize"
payload = { "messages": [
{
"title": "Welcome to the Team!",
"content": {
"contentType": "HTML",
"content": "<p>Hi there!</p><p>Welcome to our team. We're excited to have you on board. Please feel free to reach out if you have any questions.</p><p>Best regards,<br>HR Team</p>"
},
"to_addresses": ["newemployee@company.com"],
"cc_addresses": ["hr@company.com", "manager@company.com"]
},
{
"title": "Q4 Budget Review Meeting",
"content": {
"contentType": "Text",
"content": "Hi,
This is a reminder about our Q4 budget review meeting scheduled for next Tuesday at 2 PM. Please come prepared with your department's spending reports.
Thanks,
Finance Team"
},
"to_addresses": ["team@company.com"],
"cc_addresses": ["cfo@company.com"]
},
{
"title": "Project Alpha - Status Update",
"content": {
"contentType": "HTML",
"content": "<h3>Project Alpha Status Report</h3><p>Current Status: <strong>On Track</strong></p><ul><li>Phase 1: Completed</li><li>Phase 2: 75% complete</li><li>Phase 3: Planning</li></ul><p>Next milestone: December 15th</p>"
},
"to_addresses": ["projectteam@company.com", "stakeholders@company.com"],
"cc_addresses": []
},
{
"title": "Action Required: Security Policy Update",
"content": {
"contentType": "Text",
"content": "IMPORTANT: Please review and acknowledge the updated security policy by end of week.
Key changes:
- Password complexity requirements
- 2FA mandatory for all accounts
- VPN usage guidelines
Click the link in your security portal to acknowledge.
IT Security Team"
},
"to_addresses": ["allstaff@company.com"],
"cc_addresses": ["compliance@company.com", "legal@company.com"]
},
{
"title": "Team Lunch - Friday 12:30 PM",
"content": {
"contentType": "HTML",
"content": "<p>Hey team! </p><p>Let's grab lunch together this Friday at 12:30 PM. I've made a reservation at the Italian place downtown.</p><p>Please RSVP by Wednesday so I can confirm the headcount.</p><p>Looking forward to it!<br>Sarah</p>"
},
"to_addresses": ["dev-team@company.com"],
"cc_addresses": ["sarah.manager@company.com"]
}
] }
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({
messages: [
{
title: 'Welcome to the Team!',
content: {
contentType: 'HTML',
content: '<p>Hi there!</p><p>Welcome to our team. We\'re excited to have you on board. Please feel free to reach out if you have any questions.</p><p>Best regards,<br>HR Team</p>'
},
to_addresses: ['newemployee@company.com'],
cc_addresses: ['hr@company.com', 'manager@company.com']
},
{
title: 'Q4 Budget Review Meeting',
content: {
contentType: 'Text',
content: 'Hi,\n\nThis is a reminder about our Q4 budget review meeting scheduled for next Tuesday at 2 PM. Please come prepared with your department\'s spending reports.\n\nThanks,\nFinance Team'
},
to_addresses: ['team@company.com'],
cc_addresses: ['cfo@company.com']
},
{
title: 'Project Alpha - Status Update',
content: {
contentType: 'HTML',
content: '<h3>Project Alpha Status Report</h3><p>Current Status: <strong>On Track</strong></p><ul><li>Phase 1: Completed</li><li>Phase 2: 75% complete</li><li>Phase 3: Planning</li></ul><p>Next milestone: December 15th</p>'
},
to_addresses: ['projectteam@company.com', 'stakeholders@company.com'],
cc_addresses: []
},
{
title: 'Action Required: Security Policy Update',
content: {
contentType: 'Text',
content: 'IMPORTANT: Please review and acknowledge the updated security policy by end of week.\n\nKey changes:\n- Password complexity requirements\n- 2FA mandatory for all accounts\n- VPN usage guidelines\n\nClick the link in your security portal to acknowledge.\n\nIT Security Team'
},
to_addresses: ['allstaff@company.com'],
cc_addresses: ['compliance@company.com', 'legal@company.com']
},
{
title: 'Team Lunch - Friday 12:30 PM',
content: {
contentType: 'HTML',
content: '<p>Hey team! </p><p>Let\'s grab lunch together this Friday at 12:30 PM. I\'ve made a reservation at the Italian place downtown.</p><p>Please RSVP by Wednesday so I can confirm the headcount.</p><p>Looking forward to it!<br>Sarah</p>'
},
to_addresses: ['dev-team@company.com'],
cc_addresses: ['sarah.manager@company.com']
}
]
})
};
fetch('https://api.klavis.ai/sandbox/outlook_mail/{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({
messages: [
{
title: 'Welcome to the Team!',
content: {
contentType: 'HTML',
content: '<p>Hi there!</p><p>Welcome to our team. We\'re excited to have you on board. Please feel free to reach out if you have any questions.</p><p>Best regards,<br>HR Team</p>'
},
to_addresses: ['newemployee@company.com'],
cc_addresses: ['hr@company.com', 'manager@company.com']
},
{
title: 'Q4 Budget Review Meeting',
content: {
contentType: 'Text',
content: 'Hi,\n\nThis is a reminder about our Q4 budget review meeting scheduled for next Tuesday at 2 PM. Please come prepared with your department\'s spending reports.\n\nThanks,\nFinance Team'
},
to_addresses: ['team@company.com'],
cc_addresses: ['cfo@company.com']
},
{
title: 'Project Alpha - Status Update',
content: {
contentType: 'HTML',
content: '<h3>Project Alpha Status Report</h3><p>Current Status: <strong>On Track</strong></p><ul><li>Phase 1: Completed</li><li>Phase 2: 75% complete</li><li>Phase 3: Planning</li></ul><p>Next milestone: December 15th</p>'
},
to_addresses: ['projectteam@company.com', 'stakeholders@company.com'],
cc_addresses: []
},
{
title: 'Action Required: Security Policy Update',
content: {
contentType: 'Text',
content: 'IMPORTANT: Please review and acknowledge the updated security policy by end of week.\n\nKey changes:\n- Password complexity requirements\n- 2FA mandatory for all accounts\n- VPN usage guidelines\n\nClick the link in your security portal to acknowledge.\n\nIT Security Team'
},
to_addresses: ['allstaff@company.com'],
cc_addresses: ['compliance@company.com', 'legal@company.com']
},
{
title: 'Team Lunch - Friday 12:30 PM',
content: {
contentType: 'HTML',
content: '<p>Hey team! </p><p>Let\'s grab lunch together this Friday at 12:30 PM. I\'ve made a reservation at the Italian place downtown.</p><p>Please RSVP by Wednesday so I can confirm the headcount.</p><p>Looking forward to it!<br>Sarah</p>'
},
to_addresses: ['dev-team@company.com'],
cc_addresses: ['sarah.manager@company.com']
}
]
})
};
fetch('https://api.klavis.ai/sandbox/outlook_mail/{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
Your Klavis AI API key.
Path Parameters
The unique sandbox identifier
Query Parameters
If true, use default test data for initialization
Body
application/json
Complete Outlook Mail sandbox data structure
List of mail messages
Show child attributes
Show child attributes
⌘I
