Distributions

Check for new Distribution Releases and obtain pre-signed download URLs for localization file bundles delivered via the lingohub CDN.

A single endpoint under the /cdn prefix and returns application/json responses.
Authentication is performed via a CDN key passed as a Bearer token in the Authorization header — not the standard user authentication used by other API endpoints.


Authentication

Every request must include a valid CDN key in the Authorization header:

Authorization: Bearer cdn_eyJhbGciOiJIUz...

Note: CDN keys are scoped to a workspace and can be managed in the lingohub application settings. An invalid or expired key results in a 401 response.


Endpoint

POST /cdn/check -- Check for a Distribution Release

Checks whether a new Distribution Release is available that matches the specified environment, type, and optional version/release filters. If a match is found, the response includes release details and a pre-signed S3 download URL.

Request Body — CdnCheckRequest

FieldTypeRequiredDescription
distributionEnvironmentstringYesTarget environment. Values: "DEVELOPMENT", "TEST", "STAGING", "PRODUCTION"
distributionTypestringYesTarget type. Values: "NATIVE_FORMAT", "MOBILE_SDK_ANDROID", "MOBILE_SDK_IOS"
clientVersionstringNoSemantic version of the client app (e.g. "2.1.0"). Used as a version-specific filter
clientReleasestringNoRelease identifier (e.g. "beta-3"). Used as an optional filter
clientUserstringNoEnd-user identifier — logging only
clientAgentstringNoUser-agent string of the client — logging only
clientLanguageCodestringNoISO language code of the client (e.g. "en-US") — logging only

Example Request

{
  "distributionEnvironment": "PRODUCTION",
  "distributionType": "MOBILE_SDK_ANDROID",
  "clientVersion": "2.1.0",
  "clientRelease": "beta-3",
  "clientUser": "user-42",
  "clientAgent": "MyApp/Android",
  "clientLanguageCode": "en-US"
}

Response — CdnCheckResponse (when a release is found)

FieldTypeDescription
distributionReleaseIdstringUnique release identifier (e.g. "rel_13jNfRcOroAN-1024")
namestringHuman-readable name of the release
createdAttimestampWhen the release was created
filesUrlstringPre-signed S3 URL to download the release ZIP file (valid for 24 hours)

Example Response

{
  "distributionReleaseId": "rel_13jNfRcOroAN-1024",
  "name": "your project release",
  "createdAt": "2025-02-24T13:11:30.909+00:00",
  "filesUrl": "https://lingohub-exports.s3.amazonaws.com/distributions/rel_13jNfRcOroAN-1024.zip"
}

If no matching release exists, the endpoint returns 204 No Content with an empty body.


Error Responses

StatusMeaningError FieldError Info
401Unauthorized — CDN key is missing, malformed, invalid, or expiredAUTHORIZATIONCDN_KEY_NOT_FOUND
404Not Found — no distribution matches the given environment, type, and versionDISTRIBUTIONDISTRIBUTION_NOT_FOUND
422Unprocessable Entity — validation failed (e.g. invalid language code or semantic version format)
429Too Many Requests — the workspace's CDN usage budget has been exceededUSAGEUSAGE_LIMIT_EXCEEDED
500Internal Server Error — unexpected failure

Error Response Format — CdnErrorDetailResponse

{
  "type": "about:blank",
  "status": 401,
  "detail": "Unauthorized",
  "errors": [
    { "field": "AUTHORIZATION", "infos": ["CDN_KEY_NOT_FOUND"] }
  ]
}