Skip to main content
POST
/
sandbox
/
motion
/
{sandbox_id}
/
initialize
Initialize motion sandbox with data
curl --request POST \
  --url https://api.klavis.ai/sandbox/motion/{sandbox_id}/initialize \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "workspaces": [
    {
      "name": "Engineering Team",
      "projects": [
        {
          "name": "Product Launch Q1",
          "description": "Launch new product features for Q1 2024",
          "due_date": "2024-03-31T23:59:59.000Z",
          "priority": "HIGH",
          "labels": [
            "product",
            "launch",
            "q1"
          ],
          "tasks": [
            {
              "name": "Design landing page mockups",
              "description": "Create high-fidelity mockups for the new landing page using Figma",
              "status": "COMPLETED",
              "priority": "HIGH",
              "due_date": "2024-01-15T17:00:00.000Z",
              "duration": 240,
              "labels": [
                "design",
                "frontend"
              ],
              "comments": [
                {
                  "text": "First draft of mockups is ready for review"
                },
                {
                  "text": "Looks great! Just need to adjust the color scheme"
                },
                {
                  "text": "Final version approved by the team"
                }
              ]
            },
            {
              "name": "Implement authentication flow",
              "description": "Build secure authentication with OAuth2 and JWT tokens",
              "status": "IN_PROGRESS",
              "priority": "ASAP",
              "due_date": "2024-01-20T17:00:00.000Z",
              "duration": 480,
              "labels": [
                "backend",
                "security"
              ],
              "comments": [
                {
                  "text": "Starting with OAuth2 provider integration"
                },
                {
                  "text": "Token refresh logic implemented and tested"
                }
              ]
            },
            {
              "name": "Set up CI/CD pipeline",
              "description": "Configure automated testing and deployment workflows",
              "status": "TODO",
              "priority": "HIGH",
              "due_date": "2024-01-25T17:00:00.000Z",
              "duration": 180,
              "labels": [
                "devops",
                "infrastructure"
              ],
              "comments": [
                {
                  "text": "Need to decide between GitHub Actions and CircleCI"
                }
              ]
            },
            {
              "name": "Write API documentation",
              "description": "Document all REST API endpoints with examples",
              "status": "TODO",
              "priority": "MEDIUM",
              "due_date": "2024-01-30T17:00:00.000Z",
              "duration": 120,
              "labels": [
                "documentation",
                "api"
              ],
              "comments": []
            }
          ]
        },
        {
          "name": "Infrastructure Upgrade",
          "description": "Migrate to new cloud infrastructure",
          "due_date": "2024-02-28T23:59:59.000Z",
          "priority": "MEDIUM",
          "labels": [
            "infrastructure",
            "migration"
          ],
          "tasks": [
            {
              "name": "Audit current infrastructure",
              "description": "Document all current services and dependencies",
              "status": "COMPLETED",
              "priority": "HIGH",
              "due_date": "2024-01-10T17:00:00.000Z",
              "duration": 180,
              "labels": [
                "infrastructure",
                "audit"
              ],
              "comments": [
                {
                  "text": "Audit complete - found 23 services to migrate"
                }
              ]
            },
            {
              "name": "Set up Kubernetes cluster",
              "description": "Configure production-ready K8s cluster with monitoring",
              "status": "IN_PROGRESS",
              "priority": "HIGH",
              "due_date": "2024-01-22T17:00:00.000Z",
              "duration": 360,
              "labels": [
                "kubernetes",
                "devops"
              ],
              "comments": [
                {
                  "text": "Cluster is up, working on monitoring setup"
                },
                {
                  "text": "Prometheus and Grafana configured"
                }
              ]
            },
            {
              "name": "Migrate database",
              "description": "Move production database to new infrastructure with zero downtime",
              "status": "TODO",
              "priority": "ASAP",
              "due_date": "2024-02-01T17:00:00.000Z",
              "duration": 480,
              "labels": [
                "database",
                "migration"
              ],
              "comments": [
                {
                  "text": "Need to plan maintenance window with stakeholders"
                }
              ]
            }
          ]
        },
        {
          "name": "Technical Debt Reduction",
          "description": "Address accumulated technical debt",
          "priority": "LOW",
          "labels": [
            "refactoring",
            "maintenance"
          ],
          "tasks": [
            {
              "name": "Refactor legacy authentication module",
              "description": "Update old auth code to use modern patterns",
              "status": "TODO",
              "priority": "MEDIUM",
              "duration": 240,
              "labels": [
                "refactoring",
                "backend"
              ],
              "comments": [
                {
                  "text": "This has been on the backlog for 6 months"
                },
                {
                  "text": "Let's prioritize this after the Q1 launch"
                }
              ]
            },
            {
              "name": "Update dependencies",
              "description": "Update all outdated npm and pip packages",
              "status": "TODO",
              "priority": "LOW",
              "duration": 90,
              "labels": [
                "maintenance",
                "dependencies"
              ],
              "comments": []
            }
          ]
        }
      ]
    },
    {
      "name": "Marketing Team",
      "projects": [
        {
          "name": "Q1 Content Strategy",
          "description": "Plan and execute content marketing for Q1",
          "due_date": "2024-03-31T23:59:59.000Z",
          "priority": "HIGH",
          "labels": [
            "marketing",
            "content"
          ],
          "tasks": [
            {
              "name": "Create blog post calendar",
              "description": "Plan blog posts for January through March",
              "status": "COMPLETED",
              "priority": "HIGH",
              "due_date": "2024-01-05T17:00:00.000Z",
              "duration": 120,
              "labels": [
                "content",
                "planning"
              ],
              "comments": [
                {
                  "text": "Calendar created with 12 blog post ideas"
                },
                {
                  "text": "Topics approved by leadership team"
                }
              ]
            },
            {
              "name": "Write launch announcement",
              "description": "Draft product launch blog post and press release",
              "status": "IN_PROGRESS",
              "priority": "ASAP",
              "due_date": "2024-01-18T17:00:00.000Z",
              "duration": 180,
              "labels": [
                "content",
                "launch"
              ],
              "comments": [
                {
                  "text": "First draft is ready for review"
                }
              ]
            },
            {
              "name": "Design social media graphics",
              "description": "Create graphics for launch announcement across all platforms",
              "status": "TODO",
              "priority": "HIGH",
              "due_date": "2024-01-20T17:00:00.000Z",
              "duration": 150,
              "labels": [
                "design",
                "social-media"
              ],
              "comments": []
            },
            {
              "name": "Schedule email campaign",
              "description": "Set up automated email sequence for product launch",
              "status": "TODO",
              "priority": "MEDIUM",
              "due_date": "2024-01-25T17:00:00.000Z",
              "duration": 90,
              "labels": [
                "email",
                "automation"
              ],
              "comments": [
                {
                  "text": "Need to segment the audience first"
                },
                {
                  "text": "Audience segmentation complete"
                }
              ]
            }
          ]
        },
        {
          "name": "Brand Refresh",
          "description": "Update company branding and visual identity",
          "priority": "MEDIUM",
          "labels": [
            "branding",
            "design"
          ],
          "tasks": [
            {
              "name": "Research competitor branding",
              "description": "Analyze competitor brand positioning and visual identity",
              "status": "COMPLETED",
              "priority": "MEDIUM",
              "duration": 180,
              "labels": [
                "research",
                "competitive-analysis"
              ],
              "comments": [
                {
                  "text": "Analyzed 10 key competitors"
                }
              ]
            },
            {
              "name": "Create new logo concepts",
              "description": "Design 3-5 logo variations for review",
              "status": "IN_PROGRESS",
              "priority": "MEDIUM",
              "duration": 240,
              "labels": [
                "design",
                "logo"
              ],
              "comments": [
                {
                  "text": "Working on the third concept now"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name": "Product Team",
      "projects": [
        {
          "name": "User Research Initiative",
          "description": "Conduct user research to inform product decisions",
          "due_date": "2024-02-15T23:59:59.000Z",
          "priority": "HIGH",
          "labels": [
            "research",
            "ux"
          ],
          "tasks": [
            {
              "name": "Design user survey",
              "description": "Create comprehensive survey to gather user feedback",
              "status": "COMPLETED",
              "priority": "HIGH",
              "due_date": "2024-01-08T17:00:00.000Z",
              "duration": 120,
              "labels": [
                "research",
                "survey"
              ],
              "comments": [
                {
                  "text": "Survey has 25 questions covering all key areas"
                },
                {
                  "text": "Survey reviewed and approved"
                }
              ]
            },
            {
              "name": "Recruit interview participants",
              "description": "Find 15-20 users for in-depth interviews",
              "status": "IN_PROGRESS",
              "priority": "HIGH",
              "due_date": "2024-01-15T17:00:00.000Z",
              "duration": 90,
              "labels": [
                "research",
                "recruitment"
              ],
              "comments": [
                {
                  "text": "12 participants confirmed so far"
                }
              ]
            },
            {
              "name": "Conduct user interviews",
              "description": "Interview users to understand pain points and needs",
              "status": "TODO",
              "priority": "HIGH",
              "due_date": "2024-01-30T17:00:00.000Z",
              "duration": 600,
              "labels": [
                "research",
                "interviews"
              ],
              "comments": []
            },
            {
              "name": "Analyze research findings",
              "description": "Synthesize research data and create insights report",
              "status": "TODO",
              "priority": "MEDIUM",
              "due_date": "2024-02-10T17:00:00.000Z",
              "duration": 240,
              "labels": [
                "research",
                "analysis"
              ],
              "comments": [
                {
                  "text": "Will use Dovetail for analysis"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
EOF
{
  "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 Motion sandbox data structure.

Hierarchical structure for initialization:

  • Workspaces contain Projects
  • Projects contain Tasks
  • Tasks contain Comments

Delete operation support:

  • Tasks: YES
  • Comments: YES
  • Projects: YES
  • Workspaces: NO (organization level, typically not deleted)
workspaces
MotionWorkspace · object[]

List of workspaces with their projects and tasks

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