> ## Documentation Index
> Fetch the complete documentation index at: https://www.klavis.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Initialize motion sandbox with data

> Initialize the sandbox with motion-specific data following the defined schema.



## OpenAPI

````yaml post /sandbox/motion/{sandbox_id}/initialize
openapi: 3.1.0
info:
  title: Klavis AI (https://www.klavis.ai)
  description: Klavis AI - Open Source MCP Integrations for AI Applications
  version: 0.1.0
servers:
  - url: https://api.klavis.ai
    description: US Production server
  - url: https://api.eu.klavis.ai
    description: EU Production server
security: []
paths:
  /sandbox/motion/{sandbox_id}/initialize:
    post:
      tags:
        - sandbox
      summary: Initialize motion sandbox with data
      description: >-
        Initialize the sandbox with motion-specific data following the defined
        schema.
      operationId: initialize_sandbox_sandbox_motion__sandbox_id__initialize_post
      parameters:
        - name: sandbox_id
          in: path
          required: true
          schema:
            type: string
            description: The unique sandbox identifier
            title: Sandbox Id
          description: The unique sandbox identifier
        - name: init_default_data
          in: query
          required: false
          schema:
            type: boolean
            description: If true, use default test data for initialization
            default: false
            title: Init Default Data
          description: If true, use default test data for initialization
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/MotionData-Input'
                - type: 'null'
              title: Request Body
            examples:
              default:
                summary: Example initialization data
                value:
                  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
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InitializeSandboxResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    MotionData-Input:
      properties:
        workspaces:
          items:
            $ref: '#/components/schemas/MotionWorkspace-Input'
          type: array
          title: Workspaces
          description: List of workspaces with their projects and tasks
      type: object
      title: MotionData
      description: |-
        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)
    InitializeSandboxResponse:
      properties:
        sandbox_id:
          type: string
          title: Sandbox Id
          description: Sandbox identifier
        status:
          $ref: '#/components/schemas/SandboxStatus'
          description: Current status
        message:
          type: string
          title: Message
          description: Initialization result message
      type: object
      required:
        - sandbox_id
        - status
        - message
      title: InitializeSandboxResponse
      description: Response model for sandbox initialization
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MotionWorkspace-Input:
      properties:
        name:
          type: string
          title: Name
          description: Workspace name
        projects:
          anyOf:
            - items:
                $ref: '#/components/schemas/MotionProject-Input'
              type: array
            - type: 'null'
          title: Projects
          description: Projects in this workspace
      type: object
      required:
        - name
      title: MotionWorkspace
      description: Motion Workspace object - typically NOT deleted (organization level)
    SandboxStatus:
      type: string
      enum:
        - idle
        - occupied
        - error
      title: SandboxStatus
      description: Status of a sandbox instance - matches database enum
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    MotionProject-Input:
      properties:
        name:
          type: string
          title: Name
          description: Project name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Project description
        due_date:
          anyOf:
            - type: string
            - type: 'null'
          title: Due Date
          description: Project due date in ISO 8601 format
        priority:
          anyOf:
            - type: string
            - type: 'null'
          title: Priority
          description: 'Project priority: ASAP, HIGH, MEDIUM, or LOW'
        labels:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Labels
          description: Project labels
        tasks:
          anyOf:
            - items:
                $ref: '#/components/schemas/MotionTask-Input'
              type: array
            - type: 'null'
          title: Tasks
          description: Tasks in this project
      type: object
      required:
        - name
      title: MotionProject
      description: Motion Project object - supports DELETE operation
    MotionTask-Input:
      properties:
        name:
          type: string
          title: Name
          description: Task name/title
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Task description (supports Markdown)
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          description: Task status (e.g., 'TODO', 'IN_PROGRESS', 'COMPLETED')
        priority:
          anyOf:
            - type: string
            - type: 'null'
          title: Priority
          description: 'Task priority: ASAP, HIGH, MEDIUM, or LOW'
        due_date:
          anyOf:
            - type: string
            - type: 'null'
          title: Due Date
          description: Due date in ISO 8601 format
        duration:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration
          description: Estimated duration in minutes
        labels:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Labels
          description: Task labels for categorization
        comments:
          anyOf:
            - items:
                $ref: '#/components/schemas/MotionComment-Input'
              type: array
            - type: 'null'
          title: Comments
          description: Comments on this task
      type: object
      required:
        - name
      title: MotionTask
      description: Motion Task object - supports DELETE operation
    MotionComment-Input:
      properties:
        text:
          type: string
          title: Text
          description: Comment text content
      type: object
      required:
        - text
      title: MotionComment
      description: Motion Comment object - supports DELETE operation
  securitySchemes:
    HTTPBearer:
      type: http
      description: Your Klavis AI API key.
      scheme: bearer
      x-fern-bearer:
        name: api_key

````