# Create tag Create a new tag for the project. Tags are used to categorize budget line items and enable advanced filtering capabilities. Note: Tag names cannot be changed after creation. Only the color can be updated. Endpoint: POST /projects/{projectId}/tags 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) Tag name (must be unique within project) Example: "Post-Production" - `color` (string) Optional hex color code for visual identification Example: "#3B82F6" - `description` (string) Optional description for documentation purposes Example: "Post-production and VFX expenses" ## Response 201 fields (application/json): - `id` (string, required) Unique tag identifier (same as tag name) Example: "Post-Production" - `name` (string, required) Tag name (1-100 characters, immutable after creation) Example: "Post-Production" - `color` (string) Optional hex color code for visual identification Example: "#3B82F6" - `description` (string) Optional description for documentation purposes Example: "Post-production and VFX expenses" - `totals` (object, required) Financial totals aggregated from all budget line items assigned to this tag - `totals.phaseTotals` (object, required) Total amounts by phase ID. Keys depend on idMode parameter: - idMode=user: phase aliases (e.g., "estimate", "actual") - idMode=system: internal database IDs (UUID strings) Example: {"estimate":15000,"actual":12500} - `totals.fringeTotals` (object, required) Fringe benefit totals by phase ID. Keys follow same format as phaseTotals. Example: {"estimate":2250,"actual":1875} - `totals.actualTotal` (number, required) Total actual expenses for this tag across all phases Example: 14375 ## 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 409 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"