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

# Update Language

> Update Language.



## OpenAPI

````yaml PUT /languages/update
openapi: 3.1.0
info:
  title: Blog API
  version: 1.0.0
servers:
  - url: https://api.octaviatech.app/cms
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Tags
    description: Tag management endpoints
paths:
  /languages/update:
    put:
      tags:
        - Languages
      summary: Update a language
      description: >
        Updates an existing language for the current tenant.


        The payload is read from the `bodyData` property of the request body,

        i.e. the validated fields below are nested inside a `bodyData` object.


        Request body (validated):

        - `id` (string, required): The language identifier to update.

        - `code` (string, required): Updated language code. Must be exactly 2
        characters.

        - `name` (string, required): Updated language name. Must be a non-empty
        string.


        Notes:

        - If `id` does not belong to an existing language in the current tenant,
        returns 404.

        - Validation failures (including a missing field) return 409.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - bodyData
              properties:
                bodyData:
                  type: object
                  additionalProperties: false
                  required:
                    - id
                    - code
                    - name
                  properties:
                    id:
                      type: string
                      pattern: ^[a-fA-F0-9]{24}$
                      description: 24-character hex identifier of the language to update.
                      example: 64b1f2c9a7d4f1a2b3c4d5e6
                    code:
                      type: string
                      minLength: 2
                      maxLength: 2
                      description: New language code (unique per tenant).
                      example: es
                    name:
                      type: string
                      description: New human-readable name.
                      example: Español
            examples:
              Update Language:
                value:
                  bodyData:
                    id: 64b1f2c9a7d4f1a2b3c4d5e6
                    code: es
                    name: Español
      responses:
        '200':
          description: Updated
          content:
            application/json:
              example:
                success: true
                statusCode: 200
                message: Language updated successfully
                data:
                  _id: 64b1f2c9a7d4f1a2b3c4d5e6
                  code: es
                  name: Español
        '401':
          description: Unauthorized
        '403':
          description: Forbidden (role limitation)
        '404':
          description: Not found
        '409':
          description: Validation error
        '500':
          description: Server error
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````