# Create budget phase Create a new budget phase for a project Endpoint: POST /projects/{projectId}/budget/phases Version: 1.0.0 Security: ApiKeyAuth ## Path parameters: - `projectId` (string, required) Project identifier (alias or ID) Example: "nike-spring-2024" ## Request fields (application/json): - `name` (string, required) Phase name Example: "Post-Production" - `type` (string, required) Phase type Enum: "estimate", "actual", "rollup", "committed" - `color` (string) Phase color for UI display Enum: "red", "rose", "pink", "fuchsia", "purple", "violet", "indigo", "blue", "sky", "cyan", "teal", "green", "yellow", "amber", "orange" - `currency` (object,null) - `currency.code` (string,null) Currency code (e.g., USD, EUR) Example: "USD" - `currency.symbol` (string,null) Currency symbol Example: "$" - `currency.exchangeRate` (number,null) Exchange rate multiplier Example: 1 - `copyPhase` (string) ID of phase to copy data from Example: "estimate" - `isHidden` (boolean) Whether phase is hidden - `phaseIds` (array) For rollup phases - IDs of phases to aggregate Example: ["estimate","contingency"] - `operation` (string) For rollup phases - operation to perform Enum: "sum", "difference" - `idMode` (string) ID interpretation mode - "user" for human-friendly IDs (default), "system" for database IDs Enum: "user", "system" ## Response 201 fields (application/json): - `type` (string, required) Phase type Enum: "estimate", "actual", "rollup", "committed" - `id` (string, required) Phase system identifier Example: "phase-001" - `alias` (string, required) User-friendly phase alias Example: "estimate" - `name` (string,null) Phase display name Example: "Initial Estimate" - `isHidden` (boolean, required) Whether phase is hidden from view - `isLocked` (boolean, required) Whether phase is locked from editing - `currency` (object,null) Currency configuration (for estimate phases) - `currency.code` (string,null) ISO 4217 currency code Example: "USD" - `currency.symbol` (string,null) Currency symbol Example: "$" - `currency.exchangeRate` (number,null) Exchange rate multiplier Example: 1 - `operation` (string) Rollup operation (for rollup phases) Enum: "sum", "difference" - `phaseIds` (array) Phase IDs to aggregate (for rollup phases) Example: ["estimate","actual"] ## Response 400 fields (application/json): - `error` (string, required) Error message Example: "Invalid request parameters" - `details` (object) Additional error details Example: {"field":"projectId","reason":"Project not found"} - `code` (string) Error code Example: "VALIDATION_ERROR" ## Response 401 fields (application/json): - `error` (string, required) Error message Example: "Invalid request parameters" - `details` (object) Additional error details Example: {"field":"projectId","reason":"Project not found"} - `code` (string) Error code Example: "VALIDATION_ERROR" ## Response 404 fields (application/json): - `error` (string, required) Error message Example: "Invalid request parameters" - `details` (object) Additional error details Example: {"field":"projectId","reason":"Project not found"} - `code` (string) Error code Example: "VALIDATION_ERROR" ## Response 500 fields (application/json): - `error` (string, required) Error message Example: "Invalid request parameters" - `details` (object) Additional error details Example: {"field":"projectId","reason":"Project not found"} - `code` (string) Error code Example: "VALIDATION_ERROR"