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

# Replace the languages of the tenant

> Replaces the tenant's languages and default language with the ones sent; the body has the shape `GET /v1/languages` returns. A language left out is removed: data in that language stays, and the language is added again only when a source receives entries in it for the first time. Read the list first, so a language added in the meantime isn't lost. 400 for a missing `items`, duplicate codes, a new code of the wrong form, or a `defaultLanguage` that isn't in `items`.



## OpenAPI

````yaml /api-reference/openapi/configuration.json put /v1/languages
openapi: 3.2.0
info:
  title: Configuration API
  description: >-
    Manages applications, sources, source properties, source folders, managed
    tags and their values, card definitions, their segments and relation
    definitions; manages destinations, their versions and endpoints, and
    publishes versions; and authors, previews and activates card lifecycles.
    Card property changes are saved as pending changes and take effect when the
    card definition is activated. Source property changes and source deletion
    can finish asynchronously. The tenant comes from the access token.
    Successful responses return the resource itself; lists return a page with
    `items`, the `after` cursor for the next page and, when asked for,
    `totalCount` (`limit` default 50, max 200; lifecycle lists default 25, max
    100). Application updates replace the settings and need the latest `etag`;
    secrets are returned only when created. Errors are problem details
    (`application/problem+json`). Values are PascalCase in REST and UPPER_CASE
    in GraphQL.
  version: 1.0.0
servers:
  - url: https://api.occtoo.com
security: []
tags:
  - name: Applications
  - name: Card definitions
  - name: Card exports
  - name: Destination endpoints
  - name: Destination versions
  - name: Destinations
  - name: Languages
  - name: Lifecycles
  - name: Managed tag values
  - name: Managed tags
  - name: Relation definitions
  - name: Segments
  - name: Sources
paths:
  /v1/languages:
    put:
      tags:
        - Languages
      summary: Replace the languages of the tenant
      description: >-
        Replaces the tenant's languages and default language with the ones sent;
        the body has the shape `GET /v1/languages` returns. A language left out
        is removed: data in that language stays, and the language is added again
        only when a source receives entries in it for the first time. Read the
        list first, so a language added in the meantime isn't lost. 400 for a
        missing `items`, duplicate codes, a new code of the wrong form, or a
        `defaultLanguage` that isn't in `items`.
      operationId: ReplaceLanguages
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReplaceLanguagesRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LanguagesResponse'
        '400':
          description: Bad Request
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/HttpValidationProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '409':
          description: Conflict
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '429':
          description: Too Many Requests
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying.
              schema:
                minimum: 1
                type: integer
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - kindeOAuth: []
        - bearerAuth: []
        - apiKey: []
components:
  schemas:
    ReplaceLanguagesRequest:
      required:
        - defaultLanguage
        - items
      type: object
      properties:
        defaultLanguage:
          type:
            - 'null'
            - string
          description: Code of the default language; one of `items`. Null for none.
        items:
          type: array
          items:
            $ref: '#/components/schemas/LanguageRequest'
          description: >-
            All languages of the tenant, at most 500. A language left out is
            removed.
      description: >-
        Holds the languages that replace the tenant's current ones. It has the
        shape `GET /v1/languages` returns.
    LanguagesResponse:
      required:
        - defaultLanguage
        - items
      type: object
      properties:
        defaultLanguage:
          type:
            - 'null'
            - string
          description: >-
            Code of the tenant's default language. Card exports and enrichment
            use it when no language is given. Null when none is set.
        items:
          type: array
          items:
            $ref: '#/components/schemas/LanguageResponse'
          description: The languages of the tenant, ordered by code.
      description: The languages of the tenant and its default language.
    HttpValidationProblemDetails:
      type: object
      properties:
        type:
          type:
            - 'null'
            - string
        title:
          type:
            - 'null'
            - string
        status:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int32
        detail:
          type:
            - 'null'
            - string
        instance:
          type:
            - 'null'
            - string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
    ProblemDetails:
      type: object
      properties:
        type:
          type:
            - 'null'
            - string
        title:
          type:
            - 'null'
            - string
        status:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int32
        detail:
          type:
            - 'null'
            - string
        instance:
          type:
            - 'null'
            - string
    LanguageRequest:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          description: >-
            Language code (e.g. `en`). A code the tenant doesn't have yet must
            be 1-10 characters of a-z, A-Z, 0-9, `_` or `-`.
        name:
          type:
            - 'null'
            - string
          description: >-
            Readable name of the language, 1 to 100 characters, or null for
            none.
      description: One language of the list that replaces the tenant's languages.
    LanguageResponse:
      required:
        - code
        - name
      type: object
      properties:
        code:
          type: string
          description: >-
            Language code, as source entries carry it (e.g. `en`). Matched
            exactly, case included.
        name:
          type:
            - 'null'
            - string
          description: >-
            Readable name of the language. Null for a language added
            automatically from source entries.
      description: One language of the tenant.
  securitySchemes:
    kindeOAuth:
      type: oauth2
      description: >-
        Sign in with the existing Occtoo Studio identity and selected
        organization.
      flows:
        authorizationCode:
          authorizationUrl: >-
            https://auth.occtoo.com/oauth2/auth?audience=https%3A%2F%2Fapi-weu.occtoo.com
          tokenUrl: https://auth.occtoo.com/oauth2/token
          scopes:
            openid: Authenticate the user with OpenID Connect.
            profile: Read the user's basic profile.
            email: Read the user's email address.
            offline: Refresh the access token without another interactive sign-in.
          x-usePkce: SHA-256
          x-scalar-redirect-uri: https://api.occtoo.com/docs/
    bearerAuth:
      type: http
      description: >-
        Tenant-scoped Occtoo access token, including Kinde machine-to-machine
        application tokens.
      scheme: bearer
      bearerFormat: JWT
    apiKey:
      type: apiKey
      description: Occtoo organization API key.
      name: x-api-key
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.