Skip to Content
APIEndpointsList markets

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/markets

Authorization

HeaderTypeRequired
AuthorizationBearer asky_sk_…required

Path parameters

ParameterTypeRequiredDescription
brand_iduuidrequiredFrom List brands

Query parameters

ParameterTypeRequiredDescription
limitintegeroptionalRows per page, 1 to 100. Defaults to 20
cursorstringoptionalOpaque cursor from the previous response. Treat it as a token, never construct one

Request

curl --request GET \ --url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/localization/markets' \ --header 'Authorization: Bearer <api-key>'

Response

{ "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

FieldTypeDescription
data.markets[].market_iduuidrequired
data.markets[].country_codestringrequired. ISO 3166-1 alpha-2
data.markets[].country_namestringrequired
data.markets[].localesobject[]required. The languages tracked in this market, { locale_code, name }
data.markets[].tracked_promptsintegerrequired. Active prompts running in this country
data.markets[].tracked_localesstring[]required. Locales of the prompts actually tracked there
data.markets[].suggested_localesobject[]required. What the catalog offers for the country, { locale_code, is_default }

Errors

StatusCodeWhen
401invalid_tokenThe key is missing, malformed, or does not exist
403insufficient_scopeThe key does not carry read:prompts
404not_foundThe brand does not exist, or this key is not allowed to reach it
429rate_limitedOver the per-minute limit for this endpoint
Last updated on