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.
Endpoints
The Locales API is a collection of the following endpoints:- 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 formatusername: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.
Pagination
The list response returns at most 20 locales per page. Whenpagination.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
Can I create or edit a locale with this API?
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.
How do I look up a single locale?
How do I look up a single locale?
Pass either
name or id to List Locales. Supplying both returns a 400 error. Omit both to list every locale in the workspace.Is there a limit to how many locales I can create?
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.
Understand the Response
What does campaign_count tell me?
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.
What is custom_segment_id?
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.Related Content
- Locales: Add and manage locales from the MoEngage dashboard.
- Localize Campaign Messages: Use locales to deliver campaign content in a user’s language.