UI Text CDN / API
Access your localized UI Text strings from anywhere via a globally distributed API. Use this to hydrate your app UI at runtime or to prebuild locale bundles.
Authentication
Section titled “Authentication”Your project API key authenticates requests to the UI Text API. You can rotate it any time from your project settings. The key only grants READ access to UI Text translations for your project. It cannot modify data.
Send the key in one of two ways:
- Query param:
?auth=<API_KEY> - Header:
X-Auth-Apptonomy: <API_KEY>
Endpoint
Section titled “Endpoint”The endpoint is specific to each project.
GET https://api.apptonomy.ai/u/v1/{projectId}/uitextWhere {projectId} is your Apptonomy project ID.
Request parameters
Section titled “Request parameters”-
lang (required): Two- or multi-part language code indicating the desired locale, e.g.
en,fr,es-419,zh-CN.- Provide via query string:
?lang=<language-code> - See supported language lists for the stores: App Store · Google Play
- Provide via query string:
-
setid (optional): UI Text Translation Set ID to fetch.
- If omitted, the most recently created translation set is returned
- Provide via query string:
?setid=<set-id>
-
stringid (optional): Request a single string by its ID.
- If provided, the response is a JSON object containing only that string
- Provide via query string:
?stringid=<string-id>
Examples
Section titled “Examples”cURL — header auth
Section titled “cURL — header auth”curl -s \ -H "X-Auth-Apptonomy: $UITEXT_API_KEY" \ "https://api.apptonomy.ai/u/v1/${PROJECT_ID}/uitext?lang=en"cURL — query param auth
Section titled “cURL — query param auth”curl -s \ "https://api.apptonomy.ai/u/v1/${PROJECT_ID}/uitext?lang=fr&auth=${UITEXT_API_KEY}"JavaScript (fetch)
Section titled “JavaScript (fetch)”const url = `https://api.apptonomy.ai/u/v1/${PROJECT_ID}/uitext?lang=es-419`const res = await fetch(url, { headers: { 'X-Auth-Apptonomy': API_KEY } })if (!res.ok) throw new Error(`Request failed: ${res.status}`)const translations = await res.json()// translations['string_0'] → "..."Single string
Section titled “Single string”curl -s \ -H "X-Auth-Apptonomy: $UITEXT_API_KEY" \ "https://api.apptonomy.ai/u/v1/${PROJECT_ID}/uitext?lang=ja&stringid=string_0"Response
Section titled “Response”The response is JSON.
Full set (default)
Section titled “Full set (default)”{ "string_0": "Welcome", "string_1": "Create account", "string_2": "Continue", "cta_primary": "Start"}Single string (when stringid is provided)
Section titled “Single string (when stringid is provided)”{ "string_0": "ようこそ" }Status codes
Section titled “Status codes”- 200: Success
- 400: Missing or invalid parameters (e.g.
lang) - 401: Invalid or missing API key
- 404: Project, set, or string not found
- 429: Rate limit exceeded (includes
Retry-Afterheader) - 5xx: Transient service error
Deployment
Section titled “Deployment”- Performance: The API is deployed on Cloudflare Workers with translations cached in Cloudflare KV for fast global access.
- Caching: Responses are served from edge locations; you may additionally cache responses in your app to reduce round-trips.
- Rate limits: Sensible limits protect the service. On limit exceed, a 429 is returned with a
Retry-Afterheader. Implement exponential backoff or respect the retry hint.
- Prefer header-based auth in public URLs to avoid leaking query params in logs.
- When using
stringid, consider batching string IDs in one request by omittingstringidand filtering client-side if you need many strings. - Keep your API key secret in server-side environments where possible; client-side usage is supported but be mindful of distribution.