# Set your own language.

> https://koi.dog/docs/api/costs-and-settings/set-member-locale/

`PUT /api/v1/settings/locale` · Scope: `config`

## Headers.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | `string` | no | Retry the same request with the same key. [Retry rules](https://koi.dog/docs/api/#retries). |

## Body.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `locale` | `enum \| null` | yes | Your language for the dashboard and the text the server writes for you, as a language tag; `null` follows your browser. One of `en`, `ja`, `zh-Hans`, `ko`, `pt-BR`, `es`, `de`, `fr`, `ar`, `hi`, `te`. |

## Response.

200 OK · JSON object

- **422 validation_failed**: Each schema error appears in `details`.

## Request.

```sh
curl -X PUT https://api.koi.dog/api/v1/settings/locale \
    -H "Authorization: Bearer $KOIDOG_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "locale": "en"
    }'
```

```js
const res = await fetch("https://api.koi.dog/api/v1/settings/locale", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.KOIDOG_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    locale: "en",
  }),
});
console.log(await res.json());
```

```python
import os

import requests

r = requests.put(
    "https://api.koi.dog/api/v1/settings/locale",
    headers={
        "Authorization": f"Bearer {os.environ['KOIDOG_API_KEY']}",
    },
    json={
        "locale": "en",
    },
)
r.raise_for_status()
print(r.json())
```

## Response example.

```json
{
  "locale": "en"
}
```
