> ## 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.

# Create Language

> Create Language.



## OpenAPI

````yaml POST /languages/create
openapi: 3.1.0
info:
  title: Blog API
  version: 1.0.0
servers:
  - url: https://api.octaviatech.app/cms
    description: Production
security:
  - ApiKeyAuth: []
tags: []
paths:
  /languages/create:
    post:
      tags:
        - Languages
      summary: Create a language
      description: >
        Creates a new language record for the current tenant.


        Request body (validated):

        - `code` (string, required): Short language code. Must be a non-empty
        string (e.g., "en", "es", "fa").

        - `name` (string, required): Human-readable language name. Must be a
        non-empty string (e.g., "English").


        Uniqueness:

        - The pair `(code, tenant)` must be unique. If a language with the same
        `code` already exists for the current tenant, the request fails with 409
        Conflict.


        Defaults:

        - Newly created records are active (`isActive=true`) and not deleted
        (`isDeleted=false`).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - code
                - name
              properties:
                code:
                  type: string
                  description: Short language code (unique per tenant).
                  example: en
                name:
                  type: string
                  description: Human-readable name.
                  example: English
            examples:
              Create Language:
                value:
                  code: en
                  name: English
      responses:
        '201':
          description: Created
          content:
            application/json:
              example:
                success: true
                statusCode: 201
                message: Create language successfully
                data:
                  language:
                    id: '{{id}}'
                    code: en
                    name: English
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '409':
          description: Validation error or duplicate language code for the tenant
        '500':
          description: Server error
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````