> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ibana.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update cost center

> Update an existing cost center.



## OpenAPI

````yaml put /v1/cost-center/{id}
openapi: 3.0.0
info:
  title: ibana public api
  description: Public API for ibana
  version: 1.0.0
  contact:
    name: ibana
    url: https://ibana.io
    email: dev@ibana.io
servers:
  - url: http://localhost:3001
security: []
tags: []
paths:
  /v1/cost-center/{id}:
    put:
      tags:
        - Cost Center
      summary: Update cost center
      description: Update an existing cost center.
      operationId: CostCenterController_update_v1
      parameters:
        - name: id
          required: true
          in: path
          description: Cost Center ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCostCenterDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CostCenterResponseDto'
      security:
        - bearer: []
components:
  schemas:
    UpdateCostCenterDto:
      type: object
      properties:
        code:
          type: string
          description: Code of the cost center
        name:
          type: string
          description: Name of the cost center
        type:
          type: string
          description: Type of the cost center (KOST 1, KOST 2)
    CostCenterResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the entity.
        createdAt:
          format: date-time
          type: string
          description: The date and time the entity was created.
        updatedAt:
          format: date-time
          type: string
          description: The date and time the entity was last updated.
        code:
          type: string
          description: Code of the cost center
        name:
          type: string
          description: Name of the cost center
        type:
          type: string
          description: Type of the cost center (KOST 1, KOST 2)
      required:
        - code
        - name
        - type
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````