Skip to main content
POST
/
sandbox
/
slack
/
{sandbox_id}
/
initialize
Initialize slack sandbox with data
curl --request POST \
  --url https://api.klavis.ai/sandbox/slack/{sandbox_id}/initialize \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "channels": [
    {
      "name": "sandbox-test",
      "description": "Company-wide announcements and work-based matters",
      "is_private": false,
      "messages": [
        {
          "text": "Welcome to the new Slack workspace!",
          "reactions": [
            {
              "name": "wave"
            },
            {
              "name": "tada"
            }
          ]
        },
        {
          "text": "Thanks! Excited to be here.",
          "reactions": [
            {
              "name": "+1"
            }
          ]
        }
      ]
    },
    {
      "name": "project-alpha",
      "description": "Discussion for Project Alpha",
      "is_private": false,
      "messages": [
        {
          "text": "Has anyone seen the latest specs?",
          "reactions": [],
          "replies": [
            {
              "text": "I have them, will share in a moment",
              "reactions": [
                {
                  "name": "eyes"
                }
              ]
            },
            {
              "text": "Thanks! That would be great."
            }
          ]
        },
        {
          "text": "Here are the project specs...",
          "reactions": [
            {
              "name": "rocket"
            }
          ]
        }
      ]
    },
    {
      "name": "sandbox-test-private",
      "description": "Top secret stuff",
      "is_private": true,
      "messages": [
        {
          "text": "This is confidential information",
          "reactions": [
            {
              "name": "shushing_face"
            }
          ],
          "replies": [
            {
              "text": "Got it, keeping this private"
            }
          ]
        }
      ]
    }
  ]
}
'
{
  "sandbox_id": "<string>",
  "status": "idle",
  "message": "<string>",
  "records_created": {}
}

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 Slack sandbox data structure.

Hierarchy:

  • Channels contain Messages
  • Messages can have Reactions and Replies (threads)
channels
SlackChannel · object[] | null

List of channels

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

records_created
Records Created · object

Count of records created per object type