API V1 · Exports
Request a resource export
curl --request POST \ --url https://api.lingohub.com/v1/WORKSPACE_URL/projects/PROJECT_URL/exports \ --header 'Authorization: Bearer YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{ "filePaths": [ "config/locales/%{locale}/messages.yml" ], "iso2Slugs": [ "en", "de", "fr" ], "exportFormat": "standard_json", "branch": "main"}'import requests
url = "https://api.lingohub.com/v1/WORKSPACE_URL/projects/PROJECT_URL/exports"
payload = { "filePaths": ["config/locales/%{locale}/messages.yml"], "iso2Slugs": ["en", "de", "fr"], "exportFormat": "standard_json", "branch": "main"}headers = { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())const url = 'https://api.lingohub.com/v1/WORKSPACE_URL/projects/PROJECT_URL/exports';const options = { method: 'POST', headers: {Authorization: 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json'}, body: '{"filePaths":["config/locales/%{locale}/messages.yml"],"iso2Slugs":["en","de","fr"],"exportFormat":"standard_json","branch":"main"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.lingohub.com/v1/WORKSPACE_URL/projects/PROJECT_URL/exports"
payload := strings.NewReader("{\n \"filePaths\": [\n \"config/locales/%{locale}/messages.yml\"\n ],\n \"iso2Slugs\": [\n \"en\",\n \"de\",\n \"fr\"\n ],\n \"exportFormat\": \"standard_json\",\n \"branch\": \"main\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer YOUR_API_KEY") req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");RequestBody body = RequestBody.create(mediaType, "{\n \"filePaths\": [\n \"config/locales/%{locale}/messages.yml\"\n ],\n \"iso2Slugs\": [\n \"en\",\n \"de\",\n \"fr\"\n ],\n \"exportFormat\": \"standard_json\",\n \"branch\": \"main\"\n}");Request request = new Request.Builder() .url("https://api.lingohub.com/v1/WORKSPACE_URL/projects/PROJECT_URL/exports") .post(body) .addHeader("Authorization", "Bearer YOUR_API_KEY") .addHeader("Content-Type", "application/json") .build();
Response response = client.newCall(request).execute();<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://api.lingohub.com/v1/WORKSPACE_URL/projects/PROJECT_URL/exports', [ 'body' => '{ "filePaths": [ "config/locales/%{locale}/messages.yml" ], "iso2Slugs": [ "en", "de", "fr" ], "exportFormat": "standard_json", "branch": "main"}', 'headers' => [ 'Authorization' => 'Bearer YOUR_API_KEY', 'Content-Type' => 'application/json', ],]);
echo $response->getBody();require 'uri'require 'net/http'
url = URI("https://api.lingohub.com/v1/WORKSPACE_URL/projects/PROJECT_URL/exports")
http = Net::HTTP.new(url.host, url.port)http.use_ssl = true
request = Net::HTTP::Post.new(url)request["Authorization"] = 'Bearer YOUR_API_KEY'request["Content-Type"] = 'application/json'request.body = "{\n \"filePaths\": [\n \"config/locales/%{locale}/messages.yml\"\n ],\n \"iso2Slugs\": [\n \"en\",\n \"de\",\n \"fr\"\n ],\n \"exportFormat\": \"standard_json\",\n \"branch\": \"main\"\n}"
response = http.request(request)puts response.read_bodyusing System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://api.lingohub.com/v1/WORKSPACE_URL/projects/PROJECT_URL/exports"), Headers = { { "Authorization", "Bearer YOUR_API_KEY" }, }, Content = new StringContent("{\n \"filePaths\": [\n \"config/locales/%{locale}/messages.yml\"\n ],\n \"iso2Slugs\": [\n \"en\",\n \"de\",\n \"fr\"\n ],\n \"exportFormat\": \"standard_json\",\n \"branch\": \"main\"\n}") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}Initiates the creation of a resource export that is assembled asynchronously in the background. Once completed, the export produces a downloadable ZIP file containing the project’s resource files. The optional request body allows filtering by specific file paths, language codes, and overriding the export format. Use the GET endpoint with the returned export ID to poll for completion status and retrieve the download URL.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”WorkspaceUrl
ProjectUrl
Request Body
Section titled “Request Body”Optional request body that acts as filter and may specify the export format
object
An additional filter for requesting the export of particular files. If not given, all files of the project will be exported. File paths (including locale placeholder if applicable) as seen in Resources view.
Example
[ "config/locales/%{locale}/messages.yml"]An additional filter for requesting the export of particular languages. If not given, all files of all languages of the project will be exported. ISO-639-1 codes of project languages.
Example
[ "en", "de", "fr"]Several project types allow to download files in a different format than as defined by the project type. This setting overrides the export format. If not given, the type of the project will be used.
Example
standard_jsonName of the project branch to export from. If omitted, the project’s default branch is used. Returns 422 if the branch name does not exist in the project.
Example
mainResponses
Section titled “Responses”Successfully created the resource export request. The export is being assembled in the background.
Response containing the status and details of a resource export, including individual file entries and download URLs.
object
The unique identifier for this resource export.
The compound status of this resource export. Reflects the overall progress across all entries.
The list of individual resource export entries (one per file/locale combination).
Status and download information for a single file within a resource export.
object
The file path of the exported entry, including locale placeholder if applicable.
The ISO-639-1 language code for this entry.
The processing status of this individual export entry.
The S3 download URL for this individual file. Null while processing or if an error occurred.
Detailed information about the error that occurred, if the export failed. Null on success.
The name of the ZIP file that is or will be generated for this export.
The S3 download URL for the exported ZIP. Null while the export is in progress or if an error occurred.
The trigger that caused this resource export (e.g. manual, webhook).
Timestamp when the resource export was created.
Examples
Newly created export (processing)
ExportCreated
{ "id": "reg_3163-0556-1428-5087674", "status": "PROCESSING", "resourceExports": [], "errorDetails": null, "filePath": null, "downloadUrl": null, "triggerType": "API_V1", "createdAt": "2025-01-15T10:30:00.000+00:00"}Unauthorized: Authentication credentials are missing or invalid.
object
Example generated
{ "url": "example", "message": "example", "text": "example"}Forbidden: The authenticated user does not have resource view permission on this project.
object
Example generated
{ "url": "example", "message": "example", "text": "example"}Not Found: The specified workspace, project, or a filtered resource file path does not exist.
object
Example generated
{ "url": "example", "message": "example", "text": "example"}Unprocessable Entity: The specified branch name does not exist in the project.
object
Example generated
{ "url": "example", "message": "example", "text": "example"}