---
title: "Initialize hubspot sandbox with data"
method: POST
path: "/sandbox/hubspot/{sandbox_id}/initialize"
tags: ["sandbox"]
---

# Initialize hubspot sandbox with data

`POST /sandbox/hubspot/{sandbox_id}/initialize`

Initialize the sandbox with hubspot-specific data following the defined schema.

## Path parameters

- `sandbox_id` string, required — The unique sandbox identifier

## Query parameters

- `init_default_data` boolean — If true, use default test data for initialization

## Request body

- HubSpotDataInput — Complete HubSpot sandbox data structure (Flat Schema). All object types are top-level lists. Relationships are defined via association fields in the respective objects (e.g. associated_company_names in HubSpotContact).
  - `companies` HubSpotCompanyInput[], nullable — List of companies
    - `company_name` string, required — Company name
    - `website_domain` string, nullable — Company website domain
    - `industry` string, nullable — Company industry
    - `city` string, nullable — Company city
    - `state_region` string, nullable — Company state/region
    - `country` string, nullable — Company country
    - `phone_number` string, nullable — Company phone number
    - `employee_count` string, nullable — Number of employees
    - `yearly_revenue` string, nullable — Yearly revenue
  - `contacts` HubSpotContactInput[], nullable — List of contacts
    - `first_name` string, required — Contact first name
    - `last_name` string, required — Contact last name
    - `email_address` string, required — Contact email address
    - `phone_number` string, nullable — Contact phone number
    - `job_title` string, nullable — Contact job title
  - `deals` HubSpotDealInput[], nullable — List of deals
    - `title` string, required — Deal title
    - `value` string, nullable — Deal value/amount
    - `stage` string, nullable — Deal stage
    - `pipeline` string, nullable — Deal pipeline
    - `expected_close_date` string, nullable — Expected close date
  - `tickets` HubSpotTicketInput[], nullable — List of tickets
    - `title` string, required — Ticket title
    - `description` string, nullable — Ticket description/details
    - `pipeline` string, nullable — Ticket pipeline
    - `workflow_stage` string, nullable — Ticket workflow stage
    - `priority_level` string, nullable — Ticket priority (HIGH, MEDIUM, LOW)
  - `tasks` HubSpotTaskInput[], nullable — List of tasks
    - `title` string, required — Task title
    - `description` string, nullable — Task description/details
    - `task_status` string, nullable — Task status (NOT_STARTED, IN_PROGRESS, COMPLETED, WAITING, DEFERRED)
    - `priority_level` string, nullable — Task priority (HIGH, MEDIUM, LOW)
    - `deadline` string, nullable — Task deadline (ISO 8601 format)

## Response `200`

Successful Response

- InitializeSandboxResponse — Response model for sandbox initialization
  - `sandbox_id` string, required — Sandbox identifier
  - `status` 'idle' | 'occupied' | 'error', required — Status of a sandbox instance - matches database enum
  - `message` string, required — Initialization result message

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/klavis-ai/apis/klavis-ai-https-www-klavis-ai.md) · [All operations](https://skmtc.net/klavis-ai/apis/klavis-ai-https-www-klavis-ai/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/klavis-ai/klavis-ai-https-www-klavis-ai/revisions/1f05ced7280f/schema)
