Add Project Targets
POST
/api/upload/projects/{project_id}/targets
const url = 'https://example.com/api/upload/projects/example/targets';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"targets":["example"]}'};
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/upload/projects/example/targets \ --header 'Content-Type: application/json' \ --data '{ "targets": [ "example" ] }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”project_id
required
Project Id
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
TargetsPayload
object
targets
required
Targets
List of target language codes to add
Array<string>
Examplegenerated
{ "targets": [ "example" ]}Responses
Section titled “Responses”Successful Response
Media typeapplication/json
AddProjectTargetsResponse
Response for POST /api/upload/projects/{project_id}/targets.
object
project_id
required
Project Id
Canonical external string ID for the project (UUID-like)
string
added
required
Added
Target language codes that were actually inserted (normalized)
Array<string>
skipped
required
Skipped
Target language codes that were already present or invalid and thus skipped
Array<string>
Example
{ "added": [ "fra" ], "project_id": "a3f1d4c2-9b85-4b0e-8e32-2b7a9e0c1fcd", "skipped": [ "deu" ]}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}