Add Source Language
const url = 'https://example.com/api/continuous/projects/example/sources';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"source_lang":"en"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/continuous/projects/example/sources \ --header 'Content-Type: application/json' \ --data '{ "source_lang": "en" }'Add source language to continuous project.
Creates virtual source file for language. Language code is normalized to ISO 639-2 format (eng, fra, spa, etc).
Path Parameters: project_id: Project UUID
Request Body: { “source_lang”: “en” // or “eng” }
Response: { “id”: 123, “project_id”: 45, “name”: “eng_source”, “source_lang”: “eng”, “is_virtual”: true, “created_at”: “2025-01-15T10:30:00” }
Errors: 400: Invalid language code or non-continuous project 404: Project not found 403: Access denied 409: Source language already exists
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Request to add source language.
object
Source language code (e.g., en, eng, english)
Responses
Section titled “Responses”Successful Response
Response for source file operations.
object
Source file ID
Project ID
File name
Source language code (ISO 639-2)
Whether file is virtual
Creation timestamp (ISO format)
Example
{ "create_time": "2025-10-02T12:00:00", "id": 123, "is_virtual": true, "name": "eng_source_1", "project_id": 42, "source_lang": "eng"}Validation error
Unauthorized
Forbidden
Not found
Conflict
Validation Error
object
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}Internal server error