---
title: "Create a new locale"
method: POST
path: "/settings/locales"
tags: ["Admin Settings: Locales"]
---

# Create a new locale

`POST /settings/locales`

## Request

- Base URL: `http://localhost:8000/api/admin`
- URL: `http://localhost:8000/api/admin/settings/locales`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bagisto/apis/bagisto-admin-api/docs/settings/locales/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a locale. Code must be unique and consist of lowercase letters/digits.

## Request body

- object
  - `code` string, required
  - `name` string, required
  - `direction` 'ltr' | 'rtl', required
  - `logo_path` string, nullable

## Response `201`

Locale created.

## Other responses

- `400`: Invalid input
- `422`: Validation failure (missing/duplicate code, invalid direction).

---

[API](https://skmtc.dev/bagisto/apis/bagisto-admin-api.md) - [All operations](https://skmtc.dev/bagisto/apis/bagisto-admin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bagisto/apis/bagisto-admin-api/revisions/3198f11be70f?raw)
