Skip to main content
POST
/
sandbox
/
linear
/
{sandbox_id}
/
initialize
Initialize linear sandbox with data
curl --request POST \
  --url https://api.klavis.ai/sandbox/linear/{sandbox_id}/initialize \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "projects": [
    {
      "name": "Q1 2024 Product Roadmap",
      "description": "First quarter 2024 product development roadmap",
      "state": "started",
      "issues": [
        {
          "title": "Implement user authentication",
          "description": "Add OAuth2 authentication flow with PKCE support",
          "priority": 1,
          "state_name": "In Progress",
          "comments": [
            {
              "body": "We should use OAuth 2.0 with PKCE for better security"
            },
            {
              "body": "I'll handle the backend implementation"
            }
          ]
        },
        {
          "title": "Design database schema",
          "description": "Create initial database schema for users and projects",
          "priority": 2,
          "state_name": "Done",
          "comments": [
            {
              "body": "Schema design completed and reviewed"
            }
          ]
        },
        {
          "title": "Setup CI/CD pipeline",
          "description": "Configure automated testing and deployment pipeline",
          "priority": 3,
          "state_name": "Todo",
          "comments": []
        },
        {
          "title": "Fix login page responsiveness",
          "priority": 4,
          "state_name": "Backlog",
          "comments": []
        },
        {
          "title": "Research new UI framework",
          "description": "Evaluate modern UI frameworks for future migration",
          "priority": 0,
          "state_name": "Todo",
          "comments": [
            {
              "body": "Looking at React, Vue, and Svelte"
            }
          ]
        }
      ]
    },
    {
      "name": "Customer Dashboard Redesign",
      "state": "completed",
      "issues": [
        {
          "title": "Create wireframes for dashboard",
          "description": "Design initial wireframes and mockups",
          "priority": 2,
          "state_name": "Done",
          "comments": [
            {
              "body": "Wireframes approved by design team"
            },
            {
              "body": "Moving to implementation phase"
            },
            {
              "body": "All stakeholders signed off"
            }
          ]
        },
        {
          "title": "Implement dashboard components",
          "description": "Build reusable dashboard components",
          "priority": 1,
          "state_name": "Done",
          "comments": []
        },
        {
          "title": "Add analytics widgets",
          "priority": 2,
          "state_name": "Done",
          "comments": [
            {
              "body": "Integrated with analytics API"
            }
          ]
        }
      ]
    }
  ]
}
EOF
import requests

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

payload = { "projects": [
        {
            "name": "Q1 2024 Product Roadmap",
            "description": "First quarter 2024 product development roadmap",
            "state": "started",
            "issues": [
                {
                    "title": "Implement user authentication",
                    "description": "Add OAuth2 authentication flow with PKCE support",
                    "priority": 1,
                    "state_name": "In Progress",
                    "comments": [{ "body": "We should use OAuth 2.0 with PKCE for better security" }, { "body": "I'll handle the backend implementation" }]
                },
                {
                    "title": "Design database schema",
                    "description": "Create initial database schema for users and projects",
                    "priority": 2,
                    "state_name": "Done",
                    "comments": [{ "body": "Schema design completed and reviewed" }]
                },
                {
                    "title": "Setup CI/CD pipeline",
                    "description": "Configure automated testing and deployment pipeline",
                    "priority": 3,
                    "state_name": "Todo",
                    "comments": []
                },
                {
                    "title": "Fix login page responsiveness",
                    "priority": 4,
                    "state_name": "Backlog",
                    "comments": []
                },
                {
                    "title": "Research new UI framework",
                    "description": "Evaluate modern UI frameworks for future migration",
                    "priority": 0,
                    "state_name": "Todo",
                    "comments": [{ "body": "Looking at React, Vue, and Svelte" }]
                }
            ]
        },
        {
            "name": "Customer Dashboard Redesign",
            "state": "completed",
            "issues": [
                {
                    "title": "Create wireframes for dashboard",
                    "description": "Design initial wireframes and mockups",
                    "priority": 2,
                    "state_name": "Done",
                    "comments": [{ "body": "Wireframes approved by design team" }, { "body": "Moving to implementation phase" }, { "body": "All stakeholders signed off" }]
                },
                {
                    "title": "Implement dashboard components",
                    "description": "Build reusable dashboard components",
                    "priority": 1,
                    "state_name": "Done",
                    "comments": []
                },
                {
                    "title": "Add analytics widgets",
                    "priority": 2,
                    "state_name": "Done",
                    "comments": [{ "body": "Integrated with analytics API" }]
                }
            ]
        }
    ] }
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({
    projects: [
      {
        name: 'Q1 2024 Product Roadmap',
        description: 'First quarter 2024 product development roadmap',
        state: 'started',
        issues: [
          {
            title: 'Implement user authentication',
            description: 'Add OAuth2 authentication flow with PKCE support',
            priority: 1,
            state_name: 'In Progress',
            comments: [
              {body: JSON.stringify('We should use OAuth 2.0 with PKCE for better security')},
              {body: JSON.stringify('I\'ll handle the backend implementation')}
            ]
          },
          {
            title: 'Design database schema',
            description: 'Create initial database schema for users and projects',
            priority: 2,
            state_name: 'Done',
            comments: [{body: JSON.stringify('Schema design completed and reviewed')}]
          },
          {
            title: 'Setup CI/CD pipeline',
            description: 'Configure automated testing and deployment pipeline',
            priority: 3,
            state_name: 'Todo',
            comments: []
          },
          {
            title: 'Fix login page responsiveness',
            priority: 4,
            state_name: 'Backlog',
            comments: []
          },
          {
            title: 'Research new UI framework',
            description: 'Evaluate modern UI frameworks for future migration',
            priority: 0,
            state_name: 'Todo',
            comments: [{body: JSON.stringify('Looking at React, Vue, and Svelte')}]
          }
        ]
      },
      {
        name: 'Customer Dashboard Redesign',
        state: 'completed',
        issues: [
          {
            title: 'Create wireframes for dashboard',
            description: 'Design initial wireframes and mockups',
            priority: 2,
            state_name: 'Done',
            comments: [
              {body: JSON.stringify('Wireframes approved by design team')},
              {body: JSON.stringify('Moving to implementation phase')},
              {body: JSON.stringify('All stakeholders signed off')}
            ]
          },
          {
            title: 'Implement dashboard components',
            description: 'Build reusable dashboard components',
            priority: 1,
            state_name: 'Done',
            comments: []
          },
          {
            title: 'Add analytics widgets',
            priority: 2,
            state_name: 'Done',
            comments: [{body: JSON.stringify('Integrated with analytics API')}]
          }
        ]
      }
    ]
  })
};

fetch('https://api.klavis.ai/sandbox/linear/{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({
    projects: [
      {
        name: 'Q1 2024 Product Roadmap',
        description: 'First quarter 2024 product development roadmap',
        state: 'started',
        issues: [
          {
            title: 'Implement user authentication',
            description: 'Add OAuth2 authentication flow with PKCE support',
            priority: 1,
            state_name: 'In Progress',
            comments: [
              {body: JSON.stringify('We should use OAuth 2.0 with PKCE for better security')},
              {body: JSON.stringify('I\'ll handle the backend implementation')}
            ]
          },
          {
            title: 'Design database schema',
            description: 'Create initial database schema for users and projects',
            priority: 2,
            state_name: 'Done',
            comments: [{body: JSON.stringify('Schema design completed and reviewed')}]
          },
          {
            title: 'Setup CI/CD pipeline',
            description: 'Configure automated testing and deployment pipeline',
            priority: 3,
            state_name: 'Todo',
            comments: []
          },
          {
            title: 'Fix login page responsiveness',
            priority: 4,
            state_name: 'Backlog',
            comments: []
          },
          {
            title: 'Research new UI framework',
            description: 'Evaluate modern UI frameworks for future migration',
            priority: 0,
            state_name: 'Todo',
            comments: [{body: JSON.stringify('Looking at React, Vue, and Svelte')}]
          }
        ]
      },
      {
        name: 'Customer Dashboard Redesign',
        state: 'completed',
        issues: [
          {
            title: 'Create wireframes for dashboard',
            description: 'Design initial wireframes and mockups',
            priority: 2,
            state_name: 'Done',
            comments: [
              {body: JSON.stringify('Wireframes approved by design team')},
              {body: JSON.stringify('Moving to implementation phase')},
              {body: JSON.stringify('All stakeholders signed off')}
            ]
          },
          {
            title: 'Implement dashboard components',
            description: 'Build reusable dashboard components',
            priority: 1,
            state_name: 'Done',
            comments: []
          },
          {
            title: 'Add analytics widgets',
            priority: 2,
            state_name: 'Done',
            comments: [{body: JSON.stringify('Integrated with analytics API')}]
          }
        ]
      }
    ]
  })
};

fetch('https://api.klavis.ai/sandbox/linear/{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 Linear sandbox data structure.

Relational structure for initialization:

  • Projects contain Issues
  • Issues contain Comments
projects
LinearProject · object[]

List of projects with their issues. At most 50 projects can be included.

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