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

# addLanguage

> Adds a language to the current tenant. Returns the tenant. `ConflictError`: the code is already in the list.



**mutation** `addLanguage(input: AddLanguageInput!): AddLanguagePayload!`

## Arguments

**`input`**: `AddLanguageInput!` (required)

## Returns

`AddLanguagePayload!`

**`errors`**: `[AddLanguageError!]`

---

**`tenant`**: `Tenant`

## Examples

```graphql Mutation
mutation AddLanguage($input: AddLanguageInput!) {
  addLanguage(input: $input) {
    errors {
      __typename
      ... on GraphQlError {
        code
        details {
          __typename
        }
        message
      }
    }
    tenant {
      createdAt
      deletedAt
      displayName
      id
      isDeleted
      roles {
        edges {
          __typename
        }
        nodes {
          __typename
        }
        pageInfo {
          __typename
        }
      }
    }
  }
}
```

```json Variables
{
  "input": {
    "code": "string",
    "disabled": true,
    "displayName": "string",
    "isMasterLanguage": true
  }
}
```

```json Response
{
  "data": {
    "addLanguage": {
      "errors": [
        {
          "__typename": "GraphQlError",
          "code": "string",
          "details": [
            {
              "__typename": "KeyValuePairOfStringAndString"
            }
          ],
          "message": "string"
        }
      ],
      "tenant": {
        "createdAt": "value",
        "deletedAt": "value",
        "displayName": "string",
        "id": "id",
        "isDeleted": true,
        "roles": {
          "edges": [
            {
              "__typename": "RolesEdge"
            }
          ],
          "nodes": [
            {
              "__typename": "Role"
            }
          ],
          "pageInfo": {
            "__typename": "PageInfo"
          }
        }
      }
    }
  }
}
```


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