Creates a project with a protected main branch. You become its manager, and teams that have access to all projects become managers too.
HTTP
POST /projectsAccess: Session token only. API keys get 403 with insufficient_scope.
Request body #
JSON.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | At most 80 characters. |
sourceLanguage | 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. |
targetLanguages | list of string | yes | Language codes like sourceLanguage. The source language is left out if it is in the list, and at least one other language must remain. |
description | string | no | At most 400 characters. |
type | string | no | game, mobile, web, ecommerce or other. Without it the project has no type. |
JSON
{ "name": "Shop", "sourceLanguage": "en-gb", "targetLanguages": ["de-de", "fr-fr"] }Response 201 #
The project.
JSON
{
"id": "0197a3c6-4d53-7a44-87fb-9b3e5c0a2d64",
"name": "Shop",
"description": "The web shop",
"icon": null,
"accent": "#7c3aed",
"type": "web",
"status": "active",
"sourceLanguage": "en-gb",
"targetLanguages": ["de-de", "fr-fr"],
"progress": 42,
"keys": 318,
"members": [{ "initials": "AL", "from": "#06b6d4", "to": "#7c3aed" }],
"extraMembers": 0,
"ageMinutes": 15
}Response fields #
| Field | Type | Description |
|---|---|---|
id | string | The id of the project. |
name | string | The name. |
description | string | The description. |
icon | string or null | An emoji. The app shows an abbreviation of the name instead. |
accent | string | A colour such as #7c3aed. |
type | string or null | What the project is translated for: game, mobile, web, ecommerce or other. null when none was given. |
status | string | active or archived. |
sourceLanguage | string | The language code of the source text. |
targetLanguages | list of string | The language codes of every language of the project, whatever its status. |
progress | integer | Percent of keys on the protected branch that are published, across all languages. |
keys | integer | Number of keys on the protected branch. |
members | list of object | Up to 3 people with access, as initials, from and to for an avatar. |
extraMembers | integer | How many more people have access. |
ageMinutes | integer | Minutes since the project last changed. |
Errors #
| Status | error | When |
|---|---|---|
| 401 | unauthenticated | The token is missing or not valid. |
| 402 | plan_limit | The plan has no room for another active project. |
| 422 | invalid_request | name is empty or too long, a language is not valid (invalid_language), targetLanguages has no language besides the source language (required), or type is not one of the listed values. |
| 429 | rate_limited | Too many requests, see Rate limiting. |
See Errors for the error format.