Skip to content

CDN API · Distributions

Check status of a Distribution Release

POST
/v1/distributions/check
curl --request POST \
--url https://cdn.lingohub.com/v1/distributions/check \
--header 'Authorization: Bearer cdn_eyJhbGciOiJIUz...' \
--header 'Content-Type: application/json' \
--data '{
"clientVersion": "2.1.0",
"clientRelease": "beta-3",
"distributionEnvironment": "DEVELOPMENT",
"distributionType": "NATIVE_FORMAT"
}'

Checks whether a new Distribution Release is available for the given environment, type, and optional version/release filters. Requires a valid CDN key as a Bearer token in the Authorization header. Returns 200 with release details if a matching release exists, or 204 if no release matches.

Media typeapplication/json

Request body for checking the status of a Distribution Release. Requires mandatory distribution environment and type filters. The client version and release optionally narrow it to a version-specific distribution.

object
clientVersion

The semantic version of the client application. Used as an optional filter to match a version-specific distribution.

string | null
0 <= 50 characters

Example

2.1.0
clientRelease

The release identifier of the client application. Used as an optional filter.

string | null
0 <= 50 characters

Example

beta-3
distributionEnvironment
required

The target distribution environment. This is a mandatory filter.

string
Allowed values: DEVELOPMENT TEST STAGING PRODUCTION

Example

PRODUCTION
distributionType
required

The target distribution type. This is a mandatory filter.

string
Allowed values: NATIVE_FORMAT MOBILE_SDK_ANDROID MOBILE_SDK_IOS

Example

MOBILE_SDK_IOS

A matching Distribution Release was found.

Media typeapplication/json

Response containing details of a matching Distribution Release, including its identifier, name, creation timestamp, and a pre-signed download URL.

object
distributionReleaseId
required

The unique identifier of the Distribution Release.

string
name
required

The human-readable name of the Distribution Release.

string
createdAt
required

The timestamp when the Distribution Release was created.

string format: date-time
filesUrl
required

A pre-signed S3 URL to download the Distribution Release files. Valid for 24 hours.

string

Examples

ExampleMatching release found

A distribution release matching the filter

Matching release found

{
"distributionReleaseId": "rel_019f9d57-d0ec-7fa2-99f2-4ac2eb20e671",
"name": "your project release",
"createdAt": "2025-02-24T13:11:30.909+00:00",
"filesUrl": "https://lingohub-exports.s3.amazonaws.com/distributions/rel_019f9d57-d0ec-7fa2-99f2-4ac2eb20e671.zip"
}

No Distribution Release matches the given filter. The response body is empty.

Media type*/*

Response containing details of a matching Distribution Release, including its identifier, name, creation timestamp, and a pre-signed download URL.

object
distributionReleaseId
required

The unique identifier of the Distribution Release.

string

Example

rel_019f9d57-d0ec-7fa2-99f2-4ac2eb20e671
name
required

The human-readable name of the Distribution Release.

string

Example

v2.1.0 Production Release
createdAt
required

The timestamp when the Distribution Release was created.

string format: date-time

Example

2025-02-24T13:11:30
filesUrl
required

A pre-signed S3 URL to download the Distribution Release files. Valid for 24 hours.

string

Example

https://lingohub-exports.s3.amazonaws.com/distributions/rel_019f9d57-d0ec-7fa2-99f2-4ac2eb20e671.zip

Unauthorized: The Authorization header is missing, malformed, or contains an invalid/expired CDN key.

Media typeapplication/json

A structured error detail indicating which field caused the error and the specific error codes.

object
field
required

The field or area that caused the error.

string
Allowed values: AUTHORIZATION DISTRIBUTION DISTRIBUTION_RELEASE USAGE
infos
required

The list of error codes describing what went wrong for this field.

Array<string>
Allowed values: HEADER_INVALID JWT_INVALID CDN_KEY_NOT_FOUND CDN_KEY_EXPIRED DISTRIBUTION_NOT_FOUND DISTRIBUTION_RELEASE_NOT_FOUND USAGE_LIMIT_EXCEEDED

Examples

ExampleInvalid CDN key

CDN key not found or expired

Invalid CDN key

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

Not Found: No distribution or distribution release matches the given environment, type, and version.

Media typeapplication/json

A structured error detail indicating which field caused the error and the specific error codes.

object
field
required

The field or area that caused the error.

string
Allowed values: AUTHORIZATION DISTRIBUTION DISTRIBUTION_RELEASE USAGE
infos
required

The list of error codes describing what went wrong for this field.

Array<string>
Allowed values: HEADER_INVALID JWT_INVALID CDN_KEY_NOT_FOUND CDN_KEY_EXPIRED DISTRIBUTION_NOT_FOUND DISTRIBUTION_RELEASE_NOT_FOUND USAGE_LIMIT_EXCEEDED

Examples

ExampleDistribution not found

No matching distribution exists

Distribution not found

{
"type": "about:blank",
"status": 404,
"detail": "Not Found",
"errors": [
{
"field": "DISTRIBUTION",
"infos": [
"DISTRIBUTION_NOT_FOUND"
]
}
]
}

Unprocessable Entity: The request body failed validation (e.g. invalid language code or semantic version format).

Media typeapplication/json

Too Many Requests: The workspace’s CDN usage budget has been exceeded. Please add more CDN budget.

Media typeapplication/json

A structured error detail indicating which field caused the error and the specific error codes.

object
field
required

The field or area that caused the error.

string
Allowed values: AUTHORIZATION DISTRIBUTION DISTRIBUTION_RELEASE USAGE
infos
required

The list of error codes describing what went wrong for this field.

Array<string>
Allowed values: HEADER_INVALID JWT_INVALID CDN_KEY_NOT_FOUND CDN_KEY_EXPIRED DISTRIBUTION_NOT_FOUND DISTRIBUTION_RELEASE_NOT_FOUND USAGE_LIMIT_EXCEEDED

Examples

ExampleUsage limit exceeded

CDN budget exhausted

Usage limit exceeded

{
"type": "about:blank",
"status": 429,
"detail": "Too Many Requests",
"errors": [
{
"field": "USAGE",
"infos": [
"USAGE_LIMIT_EXCEEDED"
]
}
]
}

Internal Server Error: An unexpected error occurred.

Media typeapplication/json