Adds a target language. It starts as inactive.
HTTP
POST /projects/{projectId}/languagesAccess: Session token only. API keys get 403 with insufficient_scope.
Role: Project manager (organisation owners and admins are managers of every project).
Path parameters #
| Parameter | Description |
|---|---|
projectId | The id of the project. |
Request body #
JSON.
| Field | Type | Required | Description |
|---|---|---|---|
code | string | yes | A language code in lower case: two or three letters, optionally followed by a region, such as de, de-de or pt-br. |
JSON
{ "code": "nl-nl" }Response 201 #
The languages, as in List languages.
Errors #
| Status | error | When |
|---|---|---|
| 401 | unauthenticated | The token is missing or not valid. |
| 404 | not_found | The project does not exist in your organisation, you have no access to it, or projectId is not a UUID. |
| 403 | forbidden | You are a member of the project, but not a manager. |
| 422 | invalid_request | code is not a language code (invalid_language), or is the source language (is_source_language). |
| 429 | rate_limited | Too many requests, see Rate limiting. |
See Errors for the error format.
Notes #
Adding a language that the project already has fails with 409 conflict.