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

# Locales Overview

> List the locales configured in your workspace and look up a single locale by name or ID.

A locale is a named audience definition — built from user-property filters — that you use to localize campaign messages for a language, culture, or region. For example, a locale named `es-MX` might target users whose last known country is Mexico.

The MoEngage Locales API allows you to list the locales configured in your workspace and look up a single locale by name or ID. To create or edit a locale, use the MoEngage dashboard. For more information, see [Locales](/docs/user-guide/settings/advanced-settings/locales).

## Endpoints

The Locales API is a collection of the following endpoints:

* [List Locales](/docs/api/locales/list-locales): Returns all locales in the workspace, or a single one specified by name or ID.

## Authentication

Authentication is done via Basic Auth. This requires a Base64-encoded string of your credentials in the format `username:password`.

* **Username**: Use your MoEngage Workspace ID (also known as the App ID). Find it in the MoEngage dashboard at **Settings** > **Account** > **API keys**.
* **Password**: Use an API key from **Settings** > **Account** > **API keys**.

Refer to [API Key Dashboard](/docs/user-guide/settings/account/api-and-api-keys/api-key-dashboard) for details on creating and managing API keys.

## Pagination

The list response returns at most 20 locales per page. When `pagination.has_more` is `true`, pass `pagination.next_cursor` back as the `cursor` query parameter to fetch the next page. Treat the cursor as opaque — do not decode or modify it.

## FAQs

### Manage Locales

<AccordionGroup>
  <Accordion title="Can I create or edit a locale with this API?">
    No. This endpoint is read-only. Create and edit locales from the MoEngage dashboard. For more information, see [Locales](/docs/user-guide/settings/advanced-settings/locales).
  </Accordion>

  <Accordion title="How do I look up a single locale?">
    Pass either `name` or `id` to [List Locales](/docs/api/locales/list-locales). Supplying both returns a `400` error. Omit both to list every locale in the workspace.
  </Accordion>

  <Accordion title="Is there a limit to how many locales I can create?">
    No. There is no limit to the number of locales you can create in your workspace.
  </Accordion>

  <Accordion title="Can two locales share the same name?">
    No. Locale names are unique within a workspace, which is why you can look up a locale by its exact name.
  </Accordion>
</AccordionGroup>

### Understand the Response

<AccordionGroup>
  <Accordion title="What does campaign_count tell me?">
    It is the number of campaigns currently using the locale. This matches the **Campaigns associated** column on the Locales page in the dashboard.
  </Accordion>

  <Accordion title="What is custom_segment_id?">
    A locale is defined by user-property filters, which MoEngage stores as a custom segment. `custom_segment_id` identifies that segment. It is returned only for locales that have one.
  </Accordion>
</AccordionGroup>

## Related Content

* [Locales](/docs/user-guide/settings/advanced-settings/locales): Add and manage locales from the MoEngage dashboard.
* [Localize Campaign Messages](/docs/user-guide/campaigns-and-channels/getting-started/campaign-content/localize-campaign-messages): Use locales to deliver campaign content in a user's language.

## Postman Collection

Test this endpoint using our pre-configured Postman collection: [View MoEngage Locales Collection](https://www.postman.com/moengage-dev/api-docs/collection/q8t2fuz/moengage-locale-list-api-v5?action=share\&source=copy-link\&creator=3486165).
