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

# Initialize moneybird sandbox with data

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

Initialize the sandbox with moneybird-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

- MoneybirdDataInput — Complete Moneybird sandbox data structure - API format Note: Objects are created in dependency order: 1. Ledger accounts (no dependencies) 2. Contacts (no dependencies) 3. Products (no dependencies, but needs tax rates from system) 4. Projects (no dependencies) 5. Time entries (linked to projects and contacts) 6. Sales invoices (linked to contacts)
  - `ledger_accounts` MoneybirdLedgerAccount[], nullable — List of ledger accounts to create
    - `rgs_code` string, nullable — RGS code - required for creation, not returned by GET API
    - `name` string, required — Account name
    - `account_type` string, required — Account type (revenue, expense, etc.)
    - `account_id` string, nullable — Account identifier (optional for system accounts)
  - `contacts` MoneybirdContact[], nullable — List of contacts to create
    - `company_name` string, nullable — Company name
    - `firstname` string, nullable — First name
    - `lastname` string, nullable — Last name
    - `phone` string, nullable — Phone number
    - `address1` string, nullable — Street address
    - `city` string, nullable — City
    - `zipcode` string, nullable — Postal code
    - `country` string, nullable — Country code
    - `sepa_iban` string, nullable — SEPA IBAN
  - `products` MoneybirdProduct[], nullable — List of products to create
    - `description` string, required — Product description
    - `title` string, required — Product title/name
    - `price` string, required — Product price as string
    - `currency` string, required — Currency code (e.g., 'EUR')
    - `identifier` string, required — Product SKU/identifier
    - `frequency` integer, nullable — Billing frequency
    - `frequency_type` string, nullable — Frequency type (month, year)
  - `projects` MoneybirdProject[], nullable — List of projects to create
    - `name` string, required — Project name
    - `state` string — Project state (active, archived)
    - `budget` number, nullable — Project budget
  - `time_entries` MoneybirdTimeEntry[], nullable — List of time entries to create
    - `description` string, required — Description of work performed
    - `hours` number, required — Number of hours worked
    - `billable` boolean — Whether this time is billable
  - `sales_invoices` MoneybirdSalesInvoice[], nullable — List of sales invoices to create
    - `reference` string, required — Invoice reference number
    - `currency` string — Currency code
    - `prices_are_incl_tax` boolean — Whether prices include tax
    - `state` string — Invoice state (draft, open, paid)
    - `details` MoneybirdInvoiceDetail[], required — Invoice line items
      - `description` string, required — Line item description
      - `price` string, required — Unit price as string
      - `amount` string, required — Quantity as string

## 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)
