Skip to content

Add Project Targets

POST
/api/upload/projects/{project_id}/targets
curl --request POST \
--url https://example.com/api/upload/projects/example/targets \
--header 'Content-Type: application/json' \
--data '{ "targets": [ "example" ] }'
project_id
required
Project Id
string
Media typeapplication/json
TargetsPayload
object
targets
required
Targets

List of target language codes to add

Array<string>
Examplegenerated
{
"targets": [
"example"
]
}

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>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}