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

# List Locales

> Returns all locales in the workspace, or a single locale when you supply `name` or `id`. Use either `name` or `id`, not both. Omit both parameters to list every locale in the workspace (paginated).




## OpenAPI

````yaml /api/locales/locales.yaml get /v5/locales
openapi: 3.0.3
info:
  title: MoEngage Locales API
  version: '5.0'
  description: >
    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.


    Use this endpoint 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](/user-guide/settings/advanced-settings/locales).
servers:
  - url: https://api-{dc}.moengage.com
    description: MoEngage Locales API Server
    variables:
      dc:
        default: '01'
        description: >-
          The 'dc' in the API Endpoint URL refers to the MoEngage Data Center
          (DC). MoEngage hosts each customer in a different DC. You can find
          your DC number and replace the value of 'dc' in the URL by referring
          to the DC and API endpoint mapping
          [here](/api/introduction#data-centers). Your MoEngage Data Center (DC)
          can be 01, 02, 03, 04, 05, 06, or 101.
security:
  - basicAuth: []
tags:
  - name: Locales
    description: List and look up workspace locales for multilingual campaigns.
paths:
  /v5/locales:
    get:
      tags:
        - Locales
      summary: List Locales
      description: >
        Returns all locales in the workspace, or a single locale when you supply
        `name` or `id`. Use either `name` or `id`, not both. Omit both
        parameters to list every locale in the workspace (paginated).
      operationId: listLocales
      parameters:
        - name: name
          in: query
          schema:
            type: string
          description: Exact locale name. Use either `name` or `id`, not both.
          example: es-MX
        - name: id
          in: query
          schema:
            type: string
          description: >-
            Locale ID — a bare 24-character hexadecimal ObjectId, with no
            resource prefix. Pass it exactly as returned in `data[].id`. Use
            either `name` or `id`, not both.
          example: 65f1a2b3c4d5e6f7a8b9c0d1
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Cursor'
        - $ref: '#/components/parameters/RequestId'
      responses:
        '200':
          description: Locale list
          headers:
            X-MOE-Request-Id:
              schema:
                type: string
                format: uuid
              description: >-
                Trace ID echoed from the request. Generated by MoEngage when you
                do not send one.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocaleListResponse'
              example:
                response_id: 9f2c1b7a-4d3e-4a08-b5c6-1e7d02f43a91
                type: locales
                data:
                  - id: 65f1a2b3c4d5e6f7a8b9c0d1
                    name: es-MX
                    custom_segment_id: 66041f7de3b1c24a9d5f8e02
                    campaign_count: 12
                    created_at: '2026-05-01T09:12:00Z'
                    updated_at: '2026-07-10T11:45:30Z'
                  - id: 65f1a2b3c4d5e6f7a8b9c0d2
                    name: pt-BR
                    custom_segment_id: 66041f7de3b1c24a9d5f8e03
                    campaign_count: 4
                    created_at: '2026-05-04T14:20:11Z'
                    updated_at: '2026-06-18T08:03:47Z'
                pagination:
                  has_more: true
                  next_cursor: eyJsYXN0X2lkIjoiNjVmMWEyYjNjNGQ1ZTZmN2E4YjljMGQyIn0=
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - basicAuth: []
components:
  parameters:
    Limit:
      name: limit
      in: query
      schema:
        type: integer
        default: 20
        maximum: 20
      description: Page size. Max 20 per page.
    Cursor:
      name: cursor
      in: query
      schema:
        type: string
      description: Opaque pagination cursor from a previous response.
      example: eyJsYXN0X2lkIjoiNjVmMWEyYjNjNGQ1ZTZmN2E4YjljMGQyIn0=
    RequestId:
      name: X-MOE-Request-Id
      in: header
      required: false
      schema:
        type: string
        format: uuid
      description: >
        Client-supplied trace ID (UUID v4). Echoed back in the
        `X-MOE-Request-Id` response header and returned unchanged as
        `response_id` in the body. When you omit this header, MoEngage generates
        a 12-character hexadecimal identifier instead. Quote it when contacting
        MoEngage Support.
      example: 9f2c1b7a-4d3e-4a08-b5c6-1e7d02f43a91
  schemas:
    LocaleListResponse:
      type: object
      properties:
        response_id:
          type: string
          description: >-
            Unique identifier for this response. Echoes the `X-MOE-Request-Id`
            header you sent, returned unchanged. When you omit it, MoEngage
            generates a 12-character hexadecimal identifier. Quote it when
            contacting MoEngage Support.
          example: 9f2c1b7a-4d3e-4a08-b5c6-1e7d02f43a91
        type:
          type: string
          description: >-
            The resource type contained in `data`. Always `locales` for this
            endpoint.
          enum:
            - locales
        data:
          type: array
          description: The locales matching your filters, up to `limit` per page.
          items:
            $ref: '#/components/schemas/Locale'
        pagination:
          description: Cursor pagination state for this page of results.
          allOf:
            - $ref: '#/components/schemas/Pagination'
    Locale:
      type: object
      description: A locale configured in the workspace.
      properties:
        id:
          type: string
          description: Locale ID. A 24-character hexadecimal MongoDB ObjectId.
          example: 65f1a2b3c4d5e6f7a8b9c0d1
        name:
          type: string
          description: Locale name (unique per workspace).
          example: es-MX
        custom_segment_id:
          type: string
          description: >-
            ID of the custom segment backing this locale, if any. A 24-character
            hexadecimal MongoDB ObjectId, in the same format as `id`.
          example: 66041f7de3b1c24a9d5f8e02
        campaign_count:
          type: integer
          description: Number of campaigns using this locale.
          example: 12
        created_at:
          type: string
          format: date-time
          description: ISO 8601 UTC timestamp of when the locale was created.
          example: '2026-05-01T09:12:00Z'
        updated_at:
          type: string
          format: date-time
          description: ISO 8601 UTC timestamp of when the locale was last updated.
          example: '2026-07-10T11:45:30Z'
    Pagination:
      type: object
      properties:
        has_more:
          type: boolean
          description: >-
            Whether more pages exist. When `true`, pass `next_cursor` back as
            `cursor` on the next request.
          example: true
        next_cursor:
          type: string
          description: >-
            Opaque cursor for the next page. Present only when `has_more` is
            `true`.
          example: eyJsYXN0X2lkIjoiNjVmMWEyYjNjNGQ1ZTZmN2E4YjljMGQyIn0=
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Machine-readable UPPER_SNAKE_CASE code.
              example: INVALID_REQUEST
            message:
              type: string
              description: Human-readable description of the error.
              example: Use either 'name' or 'id', not both.
            target:
              type: string
              description: The query parameter or header that caused the error.
              example: id
            details:
              type: array
              description: Field-level violations. Returned for validation errors only.
              items:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_PARAMETER_COMBINATION
                  target:
                    type: string
                    example: id
                  message:
                    type: string
                    example: The 'id' parameter cannot be combined with 'name'.
        response_id:
          type: string
          description: >-
            Unique identifier for this response. Quote it when contacting
            MoEngage Support.
          example: 9f2c1b7a-4d3e-4a08-b5c6-1e7d02f43a91
  responses:
    BadRequest:
      description: Bad request / validation failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INVALID_REQUEST
              message: Use either 'name' or 'id', not both.
              target: id
              details:
                - code: INVALID_PARAMETER_COMBINATION
                  target: id
                  message: The 'id' parameter cannot be combined with 'name'.
            response_id: 9f2c1b7a-4d3e-4a08-b5c6-1e7d02f43a91
    Unauthorized:
      description: Missing or invalid authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: UNAUTHORIZED
              message: Missing or invalid authentication credentials.
              target: Authorization
            response_id: 9f2c1b7a-4d3e-4a08-b5c6-1e7d02f43a91
    Forbidden:
      description: Missing required scope
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: FORBIDDEN
              message: This API key does not have the scope required to read locales.
              target: Authorization
            response_id: 9f2c1b7a-4d3e-4a08-b5c6-1e7d02f43a91
    RateLimited:
      description: Rate limited
      headers:
        Retry-After:
          schema:
            type: integer
            example: 30
          description: Seconds to wait before retrying.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: RATE_LIMIT_EXCEEDED
              message: Workspace rate limit exceeded. Retry after 30 seconds.
            response_id: 9f2c1b7a-4d3e-4a08-b5c6-1e7d02f43a91
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INTERNAL_ERROR
              message: >-
                An unexpected error occurred while processing the request. Retry
                the request, and quote `response_id` if you contact MoEngage
                Support.
            response_id: 9f2c1b7a-4d3e-4a08-b5c6-1e7d02f43a91
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >
        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](/user-guide/settings/account/api-and-api-keys/api-key-dashboard)
        for details on creating and managing API keys.

````