# createCompany

## Overview

Creates a new company and immediately activates it within the same transaction. The resolver calls CreateCompany followed by ActivateCompany so the caller does not need to make a separate activation call.

## Modules Commands Used

- [organization] CreateCompany
- [organization] ActivateCompany

## Exception Handling

| Error Code | Description |
| --- | --- |
| ORGANIZATION_INVALID_LEGAL_NAME | Legal name is empty or missing |
| ORGANIZATION_CURRENCY_NOT_FOUND | The specified base currency does not exist or is inactive |
| ORGANIZATION_COMPANY_NOT_FOUND | Company not found after creation (internal error) |
| ORGANIZATION_INVALID_STATE | Company is not in DRAFT status for activation (internal error) |
| ORGANIZATION_MISSING_REQUIRED_FIELDS | Missing required fields for activation: baseCurrencyId, street, city, postalCode, and country are required |
| ORGANIZATION_INVALID_BASE_CURRENCY | Base currency is not active |
