# Create a project

`POST https://api.lingohub.com/v1/{workspaceUrl}/projects`

LingoHub API V1 · [Projects](https://developers.lingohub.com/reference/v1/operations/tags/projects.md) · operation `v1ProjectCreateProject`

Creates a new localization project within the specified workspace. Requires the project title, resource type (file format), source language, and optionally target languages and a description.

## Parameters

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `workspaceUrl` | path | yes | string | workspaceUrl |

## Example request

```sh
curl --request POST \
  --url https://api.lingohub.com/v1/WORKSPACE_URL/projects \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "title": "My Mobile App",
  "description": "Localization project for the mobile application",
  "resourceType": "json.standard",
  "sourceLanguageCode": "en",
  "targetLanguageCodes": [
    "de",
    "fr",
    "es"
  ]
}'
```

## Responses

- `200`: Successfully created the project. Returns the detailed project information.
- `401`: Unauthorized: Authentication credentials are missing or invalid.
- `403`: Forbidden: The authenticated user does not have settings management permission on this workspace.
- `404`: Not Found: The specified workspace does not exist.
- `422`: Unprocessable Entity: Validation failed for the request body (e.g. missing title, invalid resource type, or invalid language code).

## OpenAPI definition

The complete definition of this operation, with every schema it references:

````json
{
  "openapi": "3.1.0",
  "info": {
    "title": "LingoHub API V1",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://api.lingohub.com",
      "description": "Generated server url"
    }
  ],
  "tags": [
    {
      "name": "Projects",
      "description": "Endpoints for the operations that can be performed on projects of a workspace"
    }
  ],
  "paths": {
    "/v1/{workspaceUrl}/projects": {
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Create a project",
        "description": "Creates a new localization project within the specified workspace. Requires the project title, resource type (file format), source language, and optionally target languages and a description.",
        "operationId": "v1ProjectCreateProject",
        "parameters": [
          {
            "name": "workspaceUrl",
            "in": "path",
            "description": "workspaceUrl",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProjectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successfully created the project. Returns the detailed project information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDetails"
                },
                "examples": {
                  "createdProject": {
                    "summary": "Newly created JSON project",
                    "description": "createdProject",
                    "value": {
                      "title": "My Mobile App",
                      "description": "Localization project for our mobile application",
                      "links": [
                        {
                          "rel": "self",
                          "href": "https://api.lingohub.com/v1/my-workspace/projects/my-mobile-app"
                        },
                        {
                          "rel": "resources",
                          "href": "https://api.lingohub.com/v1/my-workspace/projects/my-mobile-app/resources"
                        }
                      ],
                      "owner_email": "user@example.com",
                      "project_locales": [
                        "en",
                        "de",
                        "fr"
                      ],
                      "created_at": "2025-01-15T10:30:00+0000",
                      "updated_at": "2025-01-15T10:30:00+0000"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: Authentication credentials are missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1ErrorInfo"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden: The authenticated user does not have settings management permission on this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1ErrorInfo"
                }
              }
            }
          },
          "404": {
            "description": "Not Found: The specified workspace does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1ErrorInfo"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity: Validation failed for the request body (e.g. missing title, invalid resource type, or invalid language code).",
            "content": {
              "application/json": {}
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "CreateProjectRequest": {
        "type": "object",
        "description": "Request body for creating a new localization project.",
        "properties": {
          "title": {
            "type": "string",
            "description": "The title of the project.",
            "example": "My Mobile App",
            "maxLength": 999,
            "minLength": 0
          },
          "description": {
            "type": "string",
            "description": "Optional project description.",
            "example": "Localization project for the mobile application",
            "maxLength": 512,
            "minLength": 0
          },
          "resourceType": {
            "type": "string",
            "description": "The resource file type for the project. Determines the file format used for import/export.",
            "enum": [
              "arb",
              "properties",
              "windows_resx",
              "gettext_po",
              "markdown",
              "chrome_i18n",
              "properties",
              "qt_linguist_ts",
              "txt",
              "standard_ini",
              "android_xml",
              "ios_strings",
              "twine_txt",
              "rails_yaml",
              "php_define",
              "symfony2_yaml",
              "json_go_i18n",
              "angular_translate_json",
              "react_intl_json",
              "i18next_json",
              "standard_json",
              "csv",
              "xliff",
              "html"
            ],
            "example": "json.standard",
            "minLength": 1
          },
          "sourceLanguageCode": {
            "type": "string",
            "description": "The source (base) language code of the project. This is the language from which translations are made.",
            "example": "en"
          },
          "targetLanguageCodes": {
            "type": "array",
            "description": "The list of target language codes to translate into.",
            "example": [
              "de",
              "fr",
              "es"
            ],
            "items": {
              "type": "string",
              "description": "Language code that uniquely identifies a locale. Valid examples would be 'en', 'en-GB', 'de', 'de-DE' etc. according to [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes)."
            }
          }
        },
        "required": [
          "resourceType",
          "sourceLanguageCode",
          "title"
        ]
      },
      "ProjectDetails": {
        "type": "object",
        "description": "Detailed information about a localization project including its locales, owner, and HATEOAS links.",
        "properties": {
          "title": {
            "type": "string",
            "description": "The title of the project.",
            "example": "My Mobile App"
          },
          "owner_email": {
            "type": "string",
            "description": "Email address of the project's owner.",
            "example": "owner@example.com"
          },
          "description": {
            "type": "string",
            "description": "Project description.",
            "example": "Localization project for the mobile application"
          },
          "project_locales": {
            "type": "array",
            "description": "The list of locale codes configured for the project.",
            "example": [
              "en",
              "de",
              "fr-CA"
            ],
            "items": {
              "type": "string",
              "description": "Language code that uniquely identifies a locale. Valid examples would be 'en', 'en-GB', 'de', 'de-DE' etc. according to [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes)."
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the project was created.",
            "example": "2025-01-15T10:30:00"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the project was last updated.",
            "example": "2025-02-20T14:45:00"
          },
          "links": {
            "type": "array",
            "description": "HATEOAS links for navigating to related resources (e.g. project resources, status).",
            "items": {
              "$ref": "#/components/schemas/Link"
            }
          }
        }
      },
      "Link": {
        "type": "object",
        "properties": {
          "href": {
            "type": "string"
          },
          "hreflang": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "deprecation": {
            "type": "string"
          },
          "profile": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "templated": {
            "type": "boolean"
          }
        }
      },
      "V1ErrorInfo": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "text": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "description": "API key authentication. Create API keys in your LingoHub workspace settings. Keys use the `lh-api_` prefix. Pass the full key as the Bearer token.",
        "scheme": "bearer"
      }
    }
  }
}
````
