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

# Update a department

> Names must be unique within the organization. Requires the `departments:write` scope.



## OpenAPI

````yaml /openapi.json post /departments/{id}
openapi: 3.1.1
info:
  title: A-Char API
  version: 1.0.0
  description: 'Authenticate with `Authorization: Bearer <api key>`.'
servers:
  - url: https://a-char.com/api/v1
security:
  - bearerAuth: []
paths:
  /departments/{id}:
    post:
      tags:
        - Departments
      summary: Update a department
      description: >-
        Names must be unique within the organization. Requires the
        `departments:write` scope.
      operationId: departments.update
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
              required:
                - name
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  name:
                    type: string
                  created_at:
                    type: string
                    format: date-time
                    x-native-type: date
                  updated_at:
                    anyOf:
                      - type: string
                        format: date-time
                        x-native-type: date
                      - type: 'null'
                  organization_id:
                    anyOf:
                      - type: string
                      - type: 'null'
                required:
                  - id
                  - name
                  - created_at
                  - updated_at
                  - organization_id
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````