# POST /api/v1/businesses

> Create business

- **Tag:** businesses
- **Operation ID:** `create_business_api_v1_businesses_post`

## Description

Create a new business entity with optional integrations.

## Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

## Request body

Schema: `BusinessCreateRequest`

- `name` (string · required) — Business display name.
- `default_currency` (string) — Default currency for the business (USD, CAD, AUD, EUR, or GBP).
- `tax_year_end_month` (integer) — Month when the tax/fiscal year ends (1-12). Default 12 = calendar year.
- `mailbox` (string · required) — Unique email prefix for bill forwarding.
- `user_id` (string) — UUID of the user who will own this business. Optional for admin-created businesses.
- `create_teal_instance` (boolean) — If true, creates a new Teal accounting instance. Default false since DayZero local engine is now the default.
- `teal_instance` (string) — Existing Teal instance ID to use (if not creating new).
- `coa_template_id` (string) — Pre-built chart of accounts template ID. Mutually exclusive with custom_coa_template.
- `custom_coa_template` (CustomCoaTemplate) — Custom chart of accounts definition. Mutually exclusive with coa_template_id.
- `entries_start` (string) — Date from which to start importing transactions (YYYY-MM-DD).
- `firm_id` (string) — Advisory firm UUID to link this business to.
- `stripe_account_id` (string) — Stripe Connect account ID.
- `stripe_subscription_id` (string) — Stripe subscription ID for billing.
- `stripe_customer_id` (string) — Stripe customer ID (e.g., cus_xxx).
- `subscription_items` (object) — Stripe subscription items/products linked to this business.
- `accounting_engine_type` (string) — Accounting engine: 'local' (DayZero, default), 'teal', or null (inherit from firm).

## Responses

### 201 — Successful Response

Schema: `BusinessResponse`

- `id` (string) — Business UUID.
- `firm_id` (string) — Advisory firm UUID this business belongs to.
- `mailbox` (string) — Email prefix for bill forwarding.
- `name` (string) — Business name.
- `logo_url` (string) — URL to business logo/avatar image.
- `default_currency` (string) — Default currency for the business (USD, CAD, AUD, EUR, or GBP).
- `tax_year_end_month` (integer) — Month when the tax/fiscal year ends (1-12). 12 = calendar year.
- `tax_year_display` (string) — Human-readable tax year description (e.g., 'Calendar Year (Jan-Dec)').
- `created_at` (string · date-time) — Creation timestamp.
- `updated_at` (string · date-time) — Last update timestamp.
- `teal_instance_id` (string) — Teal instance ID (API format).
- `teal_instance` (string) — Teal database ID.
- `entries_start` (string · date-time) — Start date for transaction imports.
- `stripe_account_id` (string) — Connected Stripe account ID.
- `stripe_subscription_id` (string) — Stripe subscription ID.
- `stripe_customer_id` (string) — Stripe customer ID.
- `subscription_items` (object) — Stripe subscription items/products linked to this business.
- `shopify_shop_domain` (string) — Connected Shopify domain.
- `shopify_access_token_id` (string) — Shopify token UUID.
- `ramp_connection_id` (string) — Ramp connection UUID.
- `square_connection_id` (string) — Square connection UUID.
- `finch_connection_id` (string) — Finch payroll connection UUID.
- `hubspot_connection_id` (string) — HubSpot connection UUID.
- `plaid_connections` (array · PlaidConnectionSchema) — Connected bank accounts via Plaid.
- `slack_connected` (boolean) — Whether a Slack webhook URL is configured.
- `sync` (SyncStatus) — Teal sync status.
- `inventory_mode` (string) — Inventory module flavor: 'cpg' or 'finished_goods'.

### 400 — Bad Request - Invalid input

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 409 — Conflict - Resource already exists

### 422 — Validation Error

Schema: `HTTPValidationError`

- `detail` (array · ValidationError) → `ValidationError`
  - `loc` (array · string | integer · required)
  - `msg` (string · required)
  - `type` (string · required)
  - `input` (object)
  - `ctx` (object)

## Code samples

### cURL

```bash
curl -X POST 'https://api.ondayzero.com/api/v1/businesses' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "mailbox": "string"
}'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/businesses', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "string",
  "mailbox": "string"
}),
});
const data = await response.json();
```

### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

payload = {
  "name": "string",
  "mailbox": "string"
}

response = httpx.post("https://api.ondayzero.com/api/v1/businesses", headers=headers, json=payload)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/businesses/create-business
- OpenAPI slice: https://www.ondayzero.com/docs/reference/businesses/create-business/openapi.json
- Other endpoints in **businesses**: https://www.ondayzero.com/docs/reference/businesses
