List markets
Every country the brand has opened as a market, the languages it tracks there, how many prompts run in each, and the locales the catalog suggests for it. Markets open on their own when a prompt is first tracked in a country, and through Open or update market.
A prompt row is one wording in one regional locale (en-GB, de-DE), tracked in one or more countries. A family is the set of versions of one question across languages. A market is a country the brand has opened, listing the languages it tracks there. Coverage is the grid Market Coverage draws from those three: one row per family, one cell per market and language, covered or missing.
Requires the read:prompts scope.
GET /v1/brands/{brand_id}/localization/marketsAuthorization
| Header | Type | Required |
|---|---|---|
Authorization | Bearer asky_sk_… | required |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
brand_id | uuid | required | From List brands |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | optional | Rows per page, 1 to 100. Defaults to 20 |
cursor | string | optional | Opaque cursor from the previous response. Treat it as a token, never construct one |
Request
cURL
curl --request GET \
--url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/localization/markets' \
--header 'Authorization: Bearer <api-key>'Response
200
{
"data": {
"markets": [
{
"market_id": "9c1e5c1a-0b7c-4a2e-8e11-2f5c0c9d7a41",
"country_code": "DE",
"country_name": "Germany",
"locales": [
{
"locale_code": "de-DE",
"name": "German (Germany)"
},
{
"locale_code": "en-US",
"name": "English (US)"
}
],
"tracked_prompts": 202,
"tracked_locales": [
"en-US"
],
"suggested_locales": [
{
"locale_code": "de-DE",
"is_default": true
}
]
}
],
"count": 1
},
"pagination": {
"limit": 20,
"has_more": false,
"next_cursor": null
},
"request_id": "req_2f7b90c14ae8471da3cd"
}Response fields
| Field | Type | Description |
|---|---|---|
data.markets[].market_id | uuid | required |
data.markets[].country_code | string | required. ISO 3166-1 alpha-2 |
data.markets[].country_name | string | required |
data.markets[].locales | object[] | required. The languages tracked in this market, { locale_code, name } |
data.markets[].tracked_prompts | integer | required. Active prompts running in this country |
data.markets[].tracked_locales | string[] | required. Locales of the prompts actually tracked there |
data.markets[].suggested_locales | object[] | required. What the catalog offers for the country, { locale_code, is_default } |
Errors
| Status | Code | When |
|---|---|---|
| 401 | invalid_token | The key is missing, malformed, or does not exist |
| 403 | insufficient_scope | The key does not carry read:prompts |
| 404 | not_found | The brand does not exist, or this key is not allowed to reach it |
| 429 | rate_limited | Over the per-minute limit for this endpoint |
Last updated on